Update bundled QUnit to version 1.5.0

redux
David Majda 13 years ago
parent 8d74248251
commit 6d624a89bd

@ -3,7 +3,7 @@
var util = require("util"); var util = require("util");
var fs = require("fs"); var fs = require("fs");
var PEG = require("../lib/peg"); var PEG = require("../lib/peg");
var QUnit = require("./vendor/qunit/qunit").QUnit; var QUnit = require("./vendor/qunit/qunit");
function bold(s) { return "\u001B[1m" + s + "\u001B[22m"; }; function bold(s) { return "\u001B[1m" + s + "\u001B[22m"; };
function message(s) { return "\u001B[35m" + s + "\u001B[39m"; }; function message(s) { return "\u001B[35m" + s + "\u001B[39m"; };
@ -18,18 +18,18 @@ QUnit.init();
QUnit.config.blocking = true; QUnit.config.blocking = true;
QUnit.config.updateRate = 0; QUnit.config.updateRate = 0;
QUnit.moduleStart = function(details) { QUnit.moduleStart(function(details) {
util.puts(""); util.puts("");
util.puts(bold(details.name)); util.puts(bold(details.name));
}; });
var failedAssertions = []; var failedAssertions = [];
QUnit.testStart = function(details) { QUnit.testStart(function(details) {
failedAssertions = []; failedAssertions = [];
}; });
QUnit.testDone = function(details) { QUnit.testDone(function(details) {
if (details.failed == 0) { if (details.failed == 0) {
util.puts('✔ ' + details.name); util.puts('✔ ' + details.name);
} else { } else {
@ -39,9 +39,9 @@ QUnit.testDone = function(details) {
util.puts(assertion); util.puts(assertion);
}); });
} }
}; });
QUnit.log = function(details) { QUnit.log(function(details) {
if (details.result) { return; } if (details.result) { return; }
var output = "" var output = ""
@ -56,9 +56,9 @@ QUnit.log = function(details) {
} }
failedAssertions.push(output); failedAssertions.push(output);
}; });
QUnit.done = function(details) { QUnit.done(function(details) {
util.puts(""); util.puts("");
if (details.failed > 0) { if (details.failed > 0) {
util.puts(bold(error("FAILURES: ")) util.puts(bold(error("FAILURES: "))
@ -72,7 +72,7 @@ QUnit.done = function(details) {
+ details.runtime + " ms)" + details.runtime + " ms)"
) )
} }
}; });
[ [
"helpers.js", "helpers.js",

@ -1,9 +1,9 @@
/** /**
* QUnit - A JavaScript Unit Testing Framework * QUnit v1.5.0 - A JavaScript Unit Testing Framework
* *
* http://docs.jquery.com/QUnit * http://docs.jquery.com/QUnit
* *
* Copyright (c) 2011 John Resig, Jörn Zaefferer * Copyright (c) 2012 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt) * Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses. * or GPL (GPL-LICENSE.txt) licenses.
*/ */
@ -54,6 +54,10 @@
color: #fff; color: #fff;
} }
#qunit-header label {
display: inline-block;
}
#qunit-banner { #qunit-banner {
height: 5px; height: 5px;
} }
@ -216,6 +220,9 @@
border-bottom: 1px solid white; border-bottom: 1px solid white;
} }
#qunit-testresult .module-name {
font-weight: bold;
}
/** Fixture */ /** Fixture */
@ -223,4 +230,6 @@
position: absolute; position: absolute;
top: -10000px; top: -10000px;
left: -10000px; left: -10000px;
width: 1000px;
height: 1000px;
} }

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save