Merge "resources: Strip '$' and 'mw' from file closures"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.base.test.js
index c415953..33423d8 100644 (file)
@@ -1,4 +1,4 @@
-( function ( mw ) {
+( function () {
        QUnit.module( 'mediawiki.base' );
 
        QUnit.test( 'mw.hook - basic', function ( assert ) {
                );
        } );
 
-}( mediaWiki ) );
+       QUnit.test( 'RLQ.push', function ( assert ) {
+               /* global RLQ */
+               var loaded = 0,
+                       done = assert.async();
+               mw.loader.testCallback = function () {
+                       loaded++;
+                       delete mw.loader.testCallback;
+               };
+               mw.loader.implement( 'test.rlq-push', [ QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + '/tests/qunit/data/mwLoaderTestCallback.js' ) ] );
+
+               RLQ.push( [ 'test.rlq-push', function () {
+                       assert.strictEqual( loaded, 1, 'Load the required module' );
+                       done();
+               } ] );
+       } );
+
+}() );