Skip to content

Commit 3eda502

Browse files
committed
Update QUnit
1 parent caca915 commit 3eda502

File tree

2 files changed

+24
-11
lines changed

2 files changed

+24
-11
lines changed

external/qunit.css

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1+
/**
2+
* QUnit - A JavaScript Unit Testing Framework
3+
*
4+
* http://docs.jquery.com/QUnit
5+
*
6+
* Copyright (c) 2011 John Resig, Jörn Zaefferer
7+
* Dual licensed under the MIT (MIT-LICENSE.txt)
8+
* or GPL (GPL-LICENSE.txt) licenses.
9+
*/
10+
111
/** Font Family and Sizes */
212

313
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
4-
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial;
14+
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
515
}
616

717
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }

external/qunit.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/**
22
* QUnit - A JavaScript Unit Testing Framework
33
*
44
* http://docs.jquery.com/QUnit
@@ -154,9 +154,9 @@ Test.prototype = {
154154
// store result when possible
155155
if ( QUnit.config.reorder && defined.sessionStorage ) {
156156
if (bad) {
157-
sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad)
157+
sessionStorage.setItem("qunit-" + this.module + "-" + this.testName, bad);
158158
} else {
159-
sessionStorage.removeItem("qunit-" + this.testName);
159+
sessionStorage.removeItem("qunit-" + this.module + "-" + this.testName);
160160
}
161161
}
162162

@@ -536,9 +536,9 @@ extend(QUnit, {
536536
*/
537537
reset: function() {
538538
if ( window.jQuery ) {
539-
jQuery( "#main, #qunit-fixture" ).html( config.fixture );
539+
jQuery( "#qunit-fixture" ).html( config.fixture );
540540
} else {
541-
var main = id( 'main' ) || id( 'qunit-fixture' );
541+
var main = id( 'qunit-fixture' );
542542
if ( main ) {
543543
main.innerHTML = config.fixture;
544544
}
@@ -730,7 +730,7 @@ addEvent(window, "load", function() {
730730
toolbar.appendChild( label );
731731
}
732732

733-
var main = id('main') || id('qunit-fixture');
733+
var main = id('qunit-fixture');
734734
if ( main ) {
735735
config.fixture = main.innerHTML;
736736
}
@@ -778,6 +778,11 @@ function done() {
778778
id( "qunit-testresult" ).innerHTML = html;
779779
}
780780

781+
if ( typeof document !== "undefined" && document.title ) {
782+
// TODO what are the unicode codes for these? as-is fails if qunit.js isn't served with the right mimetype/charset
783+
document.title = (config.stats.bad ? "✖" : "✔") + " " + document.title;
784+
}
785+
781786
QUnit.done( {
782787
failed: config.stats.bad,
783788
passed: passed,
@@ -881,16 +886,14 @@ function checkPollution( name ) {
881886
var old = config.pollution;
882887
saveGlobal();
883888

884-
var newGlobals = diff( old, config.pollution );
889+
var newGlobals = diff( config.pollution, old );
885890
if ( newGlobals.length > 0 ) {
886891
ok( false, "Introduced global variable(s): " + newGlobals.join(", ") );
887-
config.current.expected++;
888892
}
889893

890-
var deletedGlobals = diff( config.pollution, old );
894+
var deletedGlobals = diff( old, config.pollution );
891895
if ( deletedGlobals.length > 0 ) {
892896
ok( false, "Deleted global variable(s): " + deletedGlobals.join(", ") );
893-
config.current.expected++;
894897
}
895898
}
896899

0 commit comments

Comments
 (0)