Skip to content

Commit 09732da

Browse files
committed
Update QUnit to latest, reverting the bad reset 'patch'
1 parent 72023dd commit 09732da

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

external/qunit.css

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

external/qunit.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* QUnit v1.3.0 - A JavaScript Unit Testing Framework
2+
* QUnit v1.4.0pre - A JavaScript Unit Testing Framework
33
*
44
* http://docs.jquery.com/QUnit
55
*
@@ -579,15 +579,15 @@ extend(QUnit, {
579579
/**
580580
* Resets the test setup. Useful for tests that modify the DOM.
581581
*
582-
* If jQuery is available, uses jQuery's replaceWith(), otherwise use replaceChild
582+
* If jQuery is available, uses jQuery's html(), otherwise just innerHTML.
583583
*/
584584
reset: function() {
585-
var main = id( 'qunit-fixture' );
586-
if ( main ) {
587-
if ( window.jQuery ) {
588-
jQuery( main ).replaceWith( config.fixture.cloneNode(true) );
589-
} else {
590-
main.parentNode.replaceChild(config.fixture.cloneNode(true), main);
585+
if ( window.jQuery ) {
586+
jQuery( "#qunit-fixture" ).html( config.fixture );
587+
} else {
588+
var main = id( 'qunit-fixture' );
589+
if ( main ) {
590+
main.innerHTML = config.fixture;
591591
}
592592
}
593593
},
@@ -798,7 +798,7 @@ QUnit.load = function() {
798798

799799
var main = id('qunit-fixture');
800800
if ( main ) {
801-
config.fixture = main.cloneNode(true);
801+
config.fixture = main.innerHTML;
802802
}
803803

804804
if (config.autostart) {

0 commit comments

Comments
 (0)