They were being called as properties of localEnv, which is a
shallow copy of the real one. When other callbacks add
properties to the object, they weren't visible in the local
"this" of the module teardown/setup.
Change-Id: I01e2031e1e2bfcedc7aa3480ce7d9915c8fff7f1
mw.config.values = freshConfigCopy( localEnv.config );
mw.messages.values = freshMessagesCopy( localEnv.messages );
- localEnv.setup();
+ localEnv.setup.call( this );
},
teardown: function () {
log( 'MwEnvironment> TEARDOWN for "' + QUnit.config.current.module
+ ': ' + QUnit.config.current.testName + '"' );
- localEnv.teardown();
+ localEnv.teardown.call( this );
// Farewell, mock environment!
mw.config.values = liveConfig;