qunit: Abort unfinished AJAX requests in test teardown
authorTimo Tijhof <krinklemail@gmail.com>
Thu, 16 Apr 2015 00:19:09 +0000 (01:19 +0100)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 16 Apr 2015 00:19:54 +0000 (01:19 +0100)
commite7d4b84f7bc7533f96cd2c1a6625ff40924b05c9
treee1f6d35c2fbcbf540f0e88f015cda504ca8043ec
parenta84714ce4c4bace4d7920d325dc6fbd41b8b2728
qunit: Abort unfinished AJAX requests in test teardown

Similar to what we do with animations already, ensure we give
the next test a clean start by aborting any requests that were
made during the test that are still pending.

Also log the details of the request (ajax options, e.g. url) to
the console.

To test:
* Add "sleep( 1 );" to LocalSettings.php.
* add "$.ajax( mw.util.wikiScript() )" to a test in mediawiki.util.test.js.
* Run Special:JavaScriptTest/qunit/plain?module=mediawiki.util

Change-Id: Iefef89effc092d296baa9df68a86d95497730708
tests/qunit/data/testrunner.js