How to turn off Velocity unit testing in Meteor? [duplicate]

放肆的年华 提交于 2019-12-19 09:26:31

问题


I'm using the mike:mocha package and I'm trying to figure out how to disable testing.

There are times when I have to demo the app I'm working on in my local machine. For those situations, I would like to run the application without the green dot on the top right.


回答1:


After some googling I found that running

meteor --production run

takes care of this.

Note: As @cannotto90 noted below, running this command will minifiy the client code and code refresh will not be in effect. To get back to coding, you will need to stop meteor first ctrl+c and run meteor again using the meteor command.




回答2:


Here's a cheap work-around trick from the spiritually perverse :

veloff.sh

 #!/bin/bash
 #
 meteor remove xolvio:cucumber
 meteor run

velon.sh

 #!/bin/bash
 #
 meteor add xolvio:cucumber
 meteor run

Works for me. In your case swap in mike:mocha instead of xolvio:cucumber, of course. I'm guessing it'll work the same.

Your tests directory will be ignored.




回答3:


I'm developing a mocha-esque alternative for testing Meteor app, that doesn't use Velocity and only runs tests under demand. It's only server-side currently. You might find it useful: https://github.com/taromero/latte.



来源:https://stackoverflow.com/questions/28243106/how-to-turn-off-velocity-unit-testing-in-meteor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!