mediawiki.jqueryMsg: Abort test if a language request fails
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 16 Apr 2015 00:28:28 +0000 (01:28 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 16 Apr 2015 01:40:38 +0000 (02:40 +0100)
commit132b38eccdbb7b50e0082546ba2b890f55e6ef18
treee6759f5de4793781067ab95f152d994c134add6d
parente7d4b84f7bc7533f96cd2c1a6625ff40924b05c9
mediawiki.jqueryMsg: Abort test if a language request fails

Follows-up 365b6f3.

If one of the requests fails, stop the test. This avoids one test
from leaking into the next test if it times out. And also makes
the error in question easier to handle. Most subsequent errors
tend to be cascading failures from earlier ones in this case.

It will still run other qunit tests within this module and other modules,
it only aborts the subtest for "Match PHP parser" in mediawiki.jqueryMsg.

To test:
* Change getMwLanguage() and append a bogus string to the request url,
  e.g. 'load.fail.php'.
* It will fail as expected with 'Language "en" failed to load.' and QUnit
  reports that it expected 49 more assertions, and moves on to the next test.

Change-Id: Id77bf43ef0b7a031db2fdb1d6c1bb8b2c64e689c
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js