/*global QUnit, console */ (function() { var module, moduleStart, testStart, testCases = [], current_test_assertions = []; console.log(''); console.log(''); QUnit.begin(function() { // That does not work when invoked in PhantomJS }); QUnit.moduleStart(function(context) { // context = { name } moduleStart = new Date(); module = context.name; testCases = []; }); QUnit.moduleDone(function(context) { // context = { name, failed, passed, total } var xml = '\t\n'; current_test_assertions.push(xml); }); QUnit.done(function(result) { // result = { failed, passed, total, runtime } console.log(''); return result.failed > 0 ? 1 : 0; }); }());