From 10b660306ac4afb2784da34f0a0b042b2e0fdc97 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 1 Jun 2011 01:24:45 +0000 Subject: [PATCH] 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) --- tests/qunit/suites/resources/mediawiki/mediawiki.js | 5 +++++ 1 file changed, 5 insertions(+) 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(); -- 2.20.1