gruntjs/grunt-contrib-qunit — pull request #12 by sbrandwoo (2013-01-09 09:45:57+00:00)
Title: Do not exit on fail

I think this is best explained by the commit message:

> When stopOnFailure is true, upon completion of all tests, any test that failed will cause the whole task to fail. This can be set to false when you always want other tasks in the queue to be executed.

> This is effectively implements --force at a task-specific level, where it is common to want to continue even when tests fail.

> Certain PhantomJS error conditions have also been changed to raise test failures rather than exiting the task immediately.

Effectively I have the need for the QUnit task to not fail when a test fails, for the following two use cases:
- As part of a CI build the test errors are written to XML and reported in Jenkins, but you still want to continue with the rest of the build.
- For the grunt-qunit-junit unit test system I wanted to be able to run tests that I expected to fail

The alternative fix is to use --force, but that will force everything, not just this one task.

Alongside this, I changed the PhantomJS exit conditions for not being able to load, and for a test timing out to be generic test failures rather than exiting the build completely, as these kind of events happen from bad coding, and I don't want a bad test file to destroy the whole CI process. (We have a use case for delaying the call to `start()`, so timeouts do happen).

Note: This PR happens to include the changes from https://github.com/gruntjs/grunt-contrib-qunit/pull/8 as I don't want to see them forgotten about and see them as being very important to building a proper QUnit based test system.