nathanboktae / mocha-phantomjs-core

Easiest way to run client-side Mocha tests in PhantomJS or SlimerJS :ghost:
MIT License
34 stars 11 forks source link

exit code 0 on slimerjs #32

Open xi opened 7 years ago

xi commented 7 years ago

If I have a failing test and run it with phantomjs, I get exit code 1:

$ phantomjs mocha-phantomjs-core.js test/index.html
…
  7 passing (52ms)
  1 failing
…
$ echo $?
1

When I run the same tests with slimerjs, I get exit code 0:

$ slimerjs mocha-phantomjs-core.js test/index.html
…
  7 passing (52ms)
  1 failing
…
$ echo $?
0

I have not tested explicitly, but this should break many tools, e.g. travis.

Note that I tested with slimerjs 0.9 due to #25.

nathanboktae commented 7 years ago

Yeah you should be using slimerjs 0.9.6 to ensure you include laurentj/slimerjs#78 otherwise the exit code will always be 0.

xi commented 7 years ago

Thanks for the quick reply. Unfortunately I do not understand how the referenced issue relates to mine. Could you please elaborate?

nathanboktae commented 7 years ago

slimerjs exit codes were always 0 before that change, which landed in 0.9.6. Make sure you are using exactly 0.9.6. I do need to take another look at slimerjs now that it has an alpha of 1.0.0

xi commented 7 years ago

Yes, I am using exactly 0.9.6.