Skip to content

Commit 392c003

Browse files
committed
Update QUnit.
1 parent 94c6f9e commit 392c003

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

external/qunit.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* QUnit v1.4.0 - A JavaScript Unit Testing Framework
2+
* QUnit v1.5.0pre - A JavaScript Unit Testing Framework
33
*
44
* http://docs.jquery.com/QUnit
55
*

external/qunit.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* QUnit v1.4.0 - A JavaScript Unit Testing Framework
2+
* QUnit v1.5.0pre - A JavaScript Unit Testing Framework
33
*
44
* http://docs.jquery.com/QUnit
55
*
@@ -370,7 +370,7 @@ var QUnit = {
370370
}
371371

372372
try {
373-
block();
373+
block.call(config.current.testEnvironment);
374374
} catch (e) {
375375
actual = e;
376376
}
@@ -873,9 +873,11 @@ function done() {
873873

874874
// clear own sessionStorage items if all tests passed
875875
if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
876-
for (var key in sessionStorage) {
877-
if (sessionStorage.hasOwnProperty(key) && key.indexOf("qunit-test-") === 0 ) {
878-
sessionStorage.removeItem(key);
876+
var key;
877+
for ( var i = 0; i < sessionStorage.length; i++ ) {
878+
key = sessionStorage.key( i++ );
879+
if ( key.indexOf("qunit-test-") === 0 ) {
880+
sessionStorage.removeItem( key );
879881
}
880882
}
881883
}
@@ -912,8 +914,9 @@ function validTest( name ) {
912914
return run;
913915
}
914916

915-
// so far supports only Firefox, Chrome and Opera (buggy)
916-
// could be extended in the future to use something like https://github.com/csnover/TraceKit
917+
// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions)
918+
// Later Safari and IE10 are supposed to support error.stack as well
919+
// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
917920
function extractStacktrace( e, offset ) {
918921
offset = offset || 3;
919922
if (e.stacktrace) {

0 commit comments

Comments
 (0)