- var runTime = new Date() - startTime;
- var result = document.createElement("div");
- result.innerHTML = 'Tests completed in ' + runTime + ' milliseconds.<br/>' +
- stats.bad + ' tests of ' + stats.all + ' failed.';
- document.getElementsByTagName("body")[0].appendChild(result);
+ time = new Date() - time;
+ $("<div>").html(['<p class="result">Tests completed in ',
+ time, ' milliseconds.<br/>',
+ _config.stats.bad, ' tests of ', _config.stats.all, ' failed.</p>']
+ .join(''))
+ .appendTo("body");
+ $("#banner").addClass(_config.stats.bad ? "fail" : "pass");