mediawiki-extensions-Popups/tests/node-qunit
joakin e865409593 Hygiene: Don't rely on .fail, use Promises/A+
Instead of using the non-standard old Promise implementation by relying
on .fail, migrate it to .catch.

In this specific case, where we were chaining promises with $.when, the
semantics from going from fail to catch actually change. .fail keeps the
promise in a rejected state, while .catch will change it to resolved
unless another error is thrown.

As such, when changing it to .catch, the catched error will be re-thrown
to keep the promise in a rejected state, so that $.when.then is not
executed.

Additional changes:
* Make actions.js#fetch return its promise for ease of testing.
* Test FETCH_FAILED, which was fully untested.

Bug: T173819
Change-Id: Ibd380b714586979c6e60b4c969d17f36a0796b52
2017-08-23 19:36:05 +02:00
..
changeListeners Remove event logging duplication detection and logging 2017-08-16 11:46:35 -04:00
gateway Hygiene: Use promises A/A+ everywhere 2017-08-22 13:36:00 +02:00
instrumentation Popups A/B test infrastructure 2017-08-17 21:07:07 +00:00
integrations Hygiene: make integrations/mwpopups pure 2017-08-09 16:07:08 +02:00
preview Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
reducers Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
ui Hygiene: Use promises A/A+ everywhere 2017-08-22 13:36:00 +02:00
actions.test.js Hygiene: Don't rely on .fail, use Promises/A+ 2017-08-23 19:36:05 +02:00
changeListener.test.js Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
container.test.js Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
counts.test.js getPreviewCountBucket should return unknown when no bucket is found 2017-08-15 16:12:26 +02:00
experiments.test.js Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
formatter.test.js Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
getUserBucket.test.js Popups A/B test infrastructure 2017-08-17 21:07:07 +00:00
integration.test.js Return promises from QUnit test 2017-08-17 14:34:39 +00:00
isEnabled.test.js Popups A/B test infrastructure 2017-08-17 21:07:07 +00:00
previewBehavior.test.js Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
run.js Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
stubs.js Popups A/B test infrastructure 2017-08-17 21:07:07 +00:00
title.test.js Use EcmaScript modules instead of common.js modules 2017-07-31 23:05:44 +00:00
userSettings.test.js if preview count stored in localStorage is not a number override it 2017-08-17 18:29:56 +02:00
wait.test.js Hygiene: Use promises A/A+ everywhere 2017-08-22 13:36:00 +02:00