Write test status to dom rather than console

This commit is contained in:
Marijn Haverbeke 2012-10-02 18:03:22 +02:00
parent 5db60dcac9
commit 4472608994

View File

@ -16,8 +16,9 @@
window.onload = function(){ window.onload = function(){
var t0 = +new Date; var t0 = +new Date;
runTests(report); runTests(report);
console.log(testsRun + " tests run in " + (+new Date - t0) + "ms"); var out = testsRun + " tests run in " + (+new Date - t0) + "ms\n";
if (failed) console.log(failed + " failures."); if (failed) out += failed + " failures.\n";
else console.log("All passed."); else out += "All passed.\n";
document.body.appendChild(document.createElement("pre")).appendChild(document.createTextNode(out));
}; };
</script> </script>