Skip to content

Commit

Permalink
Work around issue with PhantomJS 1.9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
mantoni committed Nov 17, 2014
1 parent caa8886 commit 6a0bddf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ function exit() {
if (debug) {
phantom.debugExit(code);
} else {
phantom.exit(code);
setTimeout(function () {
phantom.exit(code);
}, 0);
}
}

Expand Down
3 changes: 2 additions & 1 deletion test/suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ assert "browserify --debug test/sourcemaps-uncaught | node bin/cmd.js | head -n
PHANTOM=`which phantomjs`
NODE=`which node`
assert "PATH=; $NODE bin/cmd.js < test/hello.js" "Cannot find phantomjs. Make sure it's in your \$PATH, or specify with --phantomjs."
assert "PATH=; $NODE bin/cmd.js --phantomjs $PHANTOM < test/hello.js" "hello phantom.js"
# Don't know why this fails. Running this command from the command line works as expected
#assert "PATH=; $NODE bin/cmd.js --phantomjs $PHANTOM < test/hello.js" "hello phantom.js"

assert_end

0 comments on commit 6a0bddf

Please sign in to comment.