mocha-phantomjs-core - slimerjs hangs without any error

185 views Asked by At

Using mocha-phantomjs-core with slimerjs I manage to run my tests successfully from CMD:

slimerjs mocha-phantomjs-core.js tests.html tap

Slimerjs window opens, I see the a browser window and all seems good, but the CMD doesn't finish (seems to wait for something). nothing is happening until I close the slimerjs window. I want to output the test result (using TAP reporter) as a file.

is that possible?

1

There are 1 answers

0
vsync On

https://github.com/nathanboktae/mocha-phantomjs-core/issues/25

system.stderr.writeLine doesn't work on CMD or GIT bash... I've changed mocha-phantomjs-core.js fail function stderr to do stdout instead. now I get the error:

Likely due to external resource loading and timing, your tests require calling window.initMochaPhantomJS() before calling any mocha setup functions. See #12

So I had to add window.initMochaPhantomJS() before the setup function.. how silly! all this because I couldn't see any error due to the stderr issue not printed