gruntjs/grunt-contrib-qunit — pull request #61 by graue (2014-03-17 21:13:17+00:00)
Title: Only call jsDump.parse() if a test failed

`jsDump.parse()` can be very slow in cases of deeply-nested objects. Normal in-browser QUnit only calls it on the arguments to failing tests, but grunt-contrib-qunit calls it on all arguments to *all* tests. On a work project, we've been seeing a 150x slowdown using grunt-contrib-qunit versus executing the QUnit tests in Chromium.

This patch makes grunt-contrib-qunit's test runner match QUnit's behavior: objects are only dumped if the test fails. This has no effect on the test runner's behavior (the dumped object was never actually used if a test passed), and eliminates the discrepancy in performance.