Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/365864 )
Change subject: Backport 'qunit: Update testrunner' from Wikibase to Wikidata
......................................................................
Backport 'qunit: Update testrunner' from Wikibase to Wikidata
Bug: T170515
Change-Id: I3cd1b2f6c9edb74fb9369398da2b9d4097784ebd
---
M extensions/Wikibase/lib/tests/qunit/data/testrunner.js
1 file changed, 7 insertions(+), 15 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata
refs/changes/64/365864/1
diff --git a/extensions/Wikibase/lib/tests/qunit/data/testrunner.js
b/extensions/Wikibase/lib/tests/qunit/data/testrunner.js
index bf8eace..06d5124 100644
--- a/extensions/Wikibase/lib/tests/qunit/data/testrunner.js
+++ b/extensions/Wikibase/lib/tests/qunit/data/testrunner.js
@@ -14,7 +14,7 @@
*
* @see QUnit.newMwEnvironment
*
- * @param {Object} custom test environment variables according to
QUnit.newMwEnvironment
+ * @param {Object} custom Test environment variables according to
QUnit.newMwEnvironment
*
* @example
* <code>
@@ -53,36 +53,28 @@
}
// init a new MW environment first, so we clean up the basic
config stuff
- var mwEnv = new QUnit.newMwEnvironment( {
+ return QUnit.newMwEnvironment( {
config: custom.config,
- messages: custom.messages
- } );
-
- return {
+ messages: custom.messages,
setup: function () {
- var globalConfig = mw.config.values;
-
- mwEnv.setup();
-
// The MediaWiki test environment does a deep
extend of the mw.config map with
// the custom config. We just want to check
against our custom config, if
// defined.
if ( custom.config ) {
- mw.config.values = $.extend( {},
globalConfig, custom.config );
+ mw.config.set( custom.config );
}
wb.sites._siteList = null; // empty cache of
wikibases site details
- if ( custom.setup !== undefined ) {
+ if ( custom.setup ) {
custom.setup.apply( this, arguments );
}
},
teardown: function () {
- mwEnv.teardown();
- if ( custom.teardown !== undefined ) {
+ if ( custom.teardown ) {
custom.teardown.apply( this, arguments
);
}
}
- };
+ } );
};
}( jQuery, mediaWiki, wikibase, QUnit ) );
--
To view, visit https://gerrit.wikimedia.org/r/365864
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cd1b2f6c9edb74fb9369398da2b9d4097784ebd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits