This change avoids a failure when running Special:JavaScriptTest with
the option noglobals.
Change-Id: Id61fca5ccedbd793f7786ad95681eaebb9feafb6
QUnit.test( '.implement( package files )', function ( assert ) {
var done = assert.async(),
QUnit.test( '.implement( package files )', function ( assert ) {
var done = assert.async(),
+ initJsRan = false,
+ counter = 41;
mw.loader.implement(
'test.implement.packageFiles',
{
mw.loader.implement(
'test.implement.packageFiles',
{
files: {
'resources/src/foo/data/hello.json': { hello: 'world' },
'resources/src/foo/foo.js': function ( require, module ) {
files: {
'resources/src/foo/data/hello.json': { hello: 'world' },
'resources/src/foo/foo.js': function ( require, module ) {
- window.mwTestFooJsCounter = window.mwTestFooJsCounter || 41;
- window.mwTestFooJsCounter++;
- module.exports = { answer: window.mwTestFooJsCounter };
+ counter++;
+ module.exports = { answer: counter };
},
'resources/src/bar/bar.js': function ( require, module ) {
var core = require( './core.js' );
},
'resources/src/bar/bar.js': function ( require, module ) {
var core = require( './core.js' );