在完成所有测试后退出Meteor Tinytest

时间:2014-11-30 03:45:39

标签: meteor tinytest

从自动化测试(例如grunt文件)运行meteor test-packages ./时,如果测试运行后流星退出,将会有所帮助。有没有办法做到这一点?命令行帮助不会提出任何类似的建议,this issue表明它不可能。

1 个答案:

答案 0 :(得分:4)

Tinytest旨在持续运行并反应性地测试一组软件包。

对于持续集成方案,有一个名为spacejam的工具,它调用meteor-testpackages,等待测试完成,然后向流星发送SIGTERM信号。

$ npm install -g spacejam
$ spacejam test-packages ./

spacejam: spawning meteor
[[[[[ Tests ]]]]]

=> Started proxy.
=> Started MongoDB.
spacejam: meteor mongodb is ready
I20141129-21:12:34.361(-8)? test-in-console listening
=> Started your app.

=> App running at: http://localhost:4096/
spacejam: meteor is ready
spacejam: spawning phantomjs
phantomjs: Running tests at http://localhost:4096/ using test-in-console
S: tinytest - Moment.is : OK
C: tinytest - Moment.is : OK
passed/expected/failed/total 2 / 0 / 0 / 2
##_meteor_magic##state: done
spacejam: phantomjs exited with code: 0
spacejam: killing meteor
spacejam: meteor killed with signal: SIGTERM
相关问题