qunit: Use jQuery.getScript instead of document.write

TestSwarm jobs were breaking because this runs after the
document is ready, thus causing the page to be blanked by
document.write.

Change-Id: I5e1c331d72ac364c9cd970a9b085f0b986b26a14
This commit is contained in:
Timo Tijhof 2013-05-06 20:55:04 +02:00 committed by Gerrit Code Review
parent 334958ee45
commit 05f6edc903

View file

@ -50,7 +50,7 @@
// of MediaWiki has actually been configured with the required url to that inject.js
// script. By default it is false.
if ( QUnit.urlParams.swarmURL && mw.config.get( 'QUnitTestSwarmInjectJSPath' ) ) {
document.write( '<scr' + 'ipt src="' + QUnit.fixurl( mw.config.get( 'QUnitTestSwarmInjectJSPath' ) ) + '"></scr' + 'ipt>' );
jQuery.getScript( QUnit.fixurl( mw.config.get( 'QUnitTestSwarmInjectJSPath' ) ) );
}
/**