mocha-phantomjs-core icon indicating copy to clipboard operation
mocha-phantomjs-core copied to clipboard

exit code 0 on slimerjs

Open xi opened this issue 7 years ago • 4 comments

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.

xi avatar Mar 17 '17 13:03 xi

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

nathanboktae avatar Mar 17 '17 15:03 nathanboktae

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

xi avatar Mar 18 '17 06:03 xi

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

nathanboktae avatar Mar 20 '17 22:03 nathanboktae

Yes, I am using exactly 0.9.6.

xi avatar Mar 22 '17 06:03 xi