When running meteor test-packages ./
from automated tests (e.g. grunt files), it would help if meteor exited after the tests were run. Is there a way to do that? The command line help doesn't suggest anything of that sort and this issue suggests it's not possible.
Asked
Active
Viewed 225 times
4

Dan Dascalescu
- 143,271
- 52
- 317
- 404
1 Answers
4
Tinytest is designed to run continuously and reactively test a set of packages.
For continuous integration scenarios, there's a tool called spacejam, which calls meteor-testpackages
, waits for the tests to complete, then sends a SIGTERM signal to meteor.
$ 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

Dan Dascalescu
- 143,271
- 52
- 317
- 404
-
Now if `spacejam` would only [also] [output JUnit XML](https://github.com/practicalmeteor/spacejam/issues/19), it would be even more useful for CI! – Adam Monsen Jan 02 '15 at 04:33
-
By the way, putting this file in your repo will allow you to integrate with circleci.com, which is free for small needs: – Chris Jan 21 '16 at 11:13
-
dependencies: cache_directories: - ~/.meteor override: - meteor || curl https://install.meteor.com | /bin/sh - npm install -g spacejam test: override: - spacejam test-packages – Chris Jan 21 '16 at 11:13