diff --git a/test/js/dumpdata.js b/test/js/dumpdata.js index 8ef919f4cd..2dec443edf 100644 --- a/test/js/dumpdata.js +++ b/test/js/dumpdata.js @@ -61,12 +61,13 @@ function processTree(data){ return jQuery.getScript(filename); }); - jQuery.when.apply(jQuery, jqxhrs).done(resultsToDOM); + jQuery.when.apply(jQuery, jqxhrs).done(function(){ + QUnit.start(); + resultsToDOM(); + }); } - function resultsToDOM(){ - var modOutput = document.createElement('div'), ref = document.getElementById('qunit-testresult') || document.getElementById('qunit-tests'); @@ -77,7 +78,6 @@ function resultsToDOM(){ // Modernizr object as text document.getElementsByTagName('textarea')[0].innerHTML = JSON.stringify(Modernizr); - } /* uno */ resultsToDOM(); diff --git a/test/js/unit.js b/test/js/unit.js index a907ba84c9..af0263fd30 100644 --- a/test/js/unit.js +++ b/test/js/unit.js @@ -1,21 +1,7 @@ -QUnit.begin = function() { - console.log("Starting test suite"); - console.log("================================================\n"); -}; - -QUnit.moduleDone = function(opts) { - if(opts.failed === 0) { - console.log("\u2714 All tests passed in '"+opts.name+"' module"); - } else { - console.log("\u2716 "+ opts.failed +" tests failed in '"+opts.name+"' module"); - } -}; - -QUnit.done = function(opts) { - console.log("\n================================================"); - console.log("Tests completed in "+opts.runtime+" milliseconds"); - console.log(opts.passed + " tests of "+opts.total+" passed, "+opts.failed+" failed."); -}; +// PhantomJS timesout so leave autostart on +if(navigator.userAgent.indexOf("PhantomJS") === -1) { + QUnit.config.autostart = false; +} module('Basics', { setup:function() {