From: Brion Vibber Date: Wed, 1 Jun 2011 01:24:45 +0000 (+0000) Subject: Follow-up to r89243 to fix the async qunit test X-Git-Tag: 1.31.0-rc.0~29814 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=10b660306ac4afb2784da34f0a0b042b2e0fdc97;p=lhc%2Fweb%2Fwiklou.git Follow-up to r89243 to fix the async qunit test Per CR & IRC discussion; added the missing stop() & start() calls, and using the timeout parameter for stop() so we can actually detect the regression (original bug caused neither the success nor failure callbacks to fire, so the test runner would just stop) --- diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.js b/tests/qunit/suites/resources/mediawiki/mediawiki.js index 7bace45944..6b890b55ad 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.js @@ -176,8 +176,13 @@ test( 'mw.loader', function(){ test( 'mw.loader.bug29107' , function() { expect( 1 ); + // Async! Include a timeout, as failure on this bug lead to neither the + // success nor failure callbacks getting called. + stop(1500); + mw.loader.implement( 'bug29107.messages-only', [], {}, {'bug29107': 'loaded'} ); mw.loader.using( 'bug29107.messages-only', function() { + start(); ok( mw.messages.exists( 'bug29107' ), 'Bug 29107: messages-only module should load ok' ); }, function(){ start();