Skip to content

Commit 41424bc

Browse files
jenkins-botGerrit Code Review
authored andcommitted
Merge "Don’t load Tainted References during QUnit tests"
2 parents 9ab7e8e + c0bb33d commit 41424bc

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

view/resources/wikibase/view/ControllerViewFactory.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,13 @@ wikibase.view.ControllerViewFactory = ( function ( wb ) {
202202

203203
// dynamically load wikibase.tainted-ref, originally added as dependency of this module in change I9a244a36fe (commit 5fed25ce15);
204204
// it’s not directly related to ControllerViewFactory, but we want to load it at the same time,
205-
// and the dependency can’t be in resources.php because then TR’s es6-ness “infects” regular Wikibase (T298001)
206-
mw.loader.using( 'wikibase.tainted-ref' ).catch( function () {
207-
// ignore errors (but avoid unhandled promise rejection)
208-
} );
205+
// and the dependency can’t be in resources.php because then TR’s es6-ness “infects” regular Wikibase (T298001);
206+
// however, don’t load TR during QUnit tests, we don’t need it there and it causes problems (T330293)
207+
if ( !window.QUnit ) {
208+
mw.loader.using( 'wikibase.tainted-ref' ).catch( function () {
209+
// ignore errors (but avoid unhandled promise rejection)
210+
} );
211+
}
209212

210213
return SELF;
211214

0 commit comments

Comments
 (0)