ariya/phantomjs — pull request #179 by v1o (2011-11-29 09:45:24+00:00)
Title: Passed test results failed count as exit code

I needed to automate the tests and I couldn't get a non-zero exit code from the run-tests.js in the event of a failure.
This way the number of failed tests is passed as an exit code.
If all tests pass the exit code will be 0, if not it will be the number of failed tests.