SpecialJavaScriptTest: Make sure we don't catch our own exception
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 27 Apr 2017 18:22:41 +0000 (20:22 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 27 Apr 2017 18:22:41 +0000 (20:22 +0200)
commitd214edb945494a882d72c588e07b47736f9075fd
tree2b8801f79406638f2f568ea68dd778f026726af9
parent01d04fa014d73f5468ba80ef908b0331deaba662
SpecialJavaScriptTest: Make sure we don't catch our own exception

If the jQuery promise returned by mw.loader.using() is rejected
synchronously (e.g. because one of the modules has a dependency on
non-existent module), the function passed to fail() also executes
synchronously. Note that this is true also with jQuery 3.

The exception it throws was caught by the catch() below, which
resulted in start() being called twice, which resulted in QUnit
throwing 'Uncaught Error: Called start() outside of a test
context too many times' rather than actually starting.

Change-Id: I5c6b50647c0af0fdec6547aaa59165f6b4a42642
includes/specials/SpecialJavaScriptTest.php