dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "HTMLSelectAndOtherField/HTMLSelectOrOtherField: Add OOUI implementation"
[lhc/web/wiklou.git]
/
tests
/
qunit
/
data
/
testrunner.js
diff --git
a/tests/qunit/data/testrunner.js
b/tests/qunit/data/testrunner.js
index
39baf17
..
f023ddd
100644
(file)
--- a/
tests/qunit/data/testrunner.js
+++ b/
tests/qunit/data/testrunner.js
@@
-64,6
+64,12
@@
var orgModule = QUnit.module;
QUnit.module = function ( name, localEnv, executeNow ) {
var orgModule = QUnit.module;
QUnit.module = function ( name, localEnv, executeNow ) {
+ if ( QUnit.config.moduleStack.length ) {
+ // When inside a nested module, don't add our Sinon
+ // setup/teardown a second time.
+ return orgModule.apply( this, arguments );
+ }
+
if ( arguments.length === 2 && typeof localEnv === 'function' ) {
executeNow = localEnv;
localEnv = undefined;
if ( arguments.length === 2 && typeof localEnv === 'function' ) {
executeNow = localEnv;
localEnv = undefined;
@@
-85,9
+91,7
@@
localEnv.teardown.call( this );
}
localEnv.teardown.call( this );
}
- if ( this.sandbox ) {
- this.sandbox.verifyAndRestore();
- }
+ this.sandbox.verifyAndRestore();
}
}, executeNow );
};
}
}, executeNow );
};
@@
-202,7
+206,6
@@
return {
setup: function () {
return {
setup: function () {
-
// Greetings, mock environment!
mw.config = new MwMap();
mw.config.set( freshConfigCopy( localEnv.config ) );
// Greetings, mock environment!
mw.config = new MwMap();
mw.config.set( freshConfigCopy( localEnv.config ) );