$code = $rl->makeModuleResponse( $startupContext, [
'startup' => $rl->getModule( 'startup' ),
] );
+ $code .= <<<JAVASCRIPT
+ // Disable module storage.
+ // The unit test for mw.loader.store will enable it
+ // explicitly with a mock timer.
+ mw.loader.store.enabled = false;
+JAVASCRIPT;
// The following has to be deferred via RLQ because the startup module is asynchronous.
$code .= ResourceLoader::makeLoaderConditionalScript(
// Embed page-specific mw.config variables.
// Things like "dependency missing" or "unknown module".
// Re-throw so that they are reported as global exceptions by QUnit and Karma.
setTimeout( function () {
- throw e;
+ throw err;
} );
} );
JAVASCRIPT
// load before qunit/export.
$scripts = $out->makeResourceLoaderLink( 'jquery.qunit',
ResourceLoaderModule::TYPE_SCRIPTS,
- [ 'raw' => true, 'sync' => true ]
+ [ 'raw' => '1', 'sync' => '1' ]
);
$head = implode( "\n", [ $styles, $scripts ] );