mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-17 20:41:32 +00:00
e865409593
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 |
||
---|---|---|
.. | ||
changeListeners | ||
gateway | ||
instrumentation | ||
integrations | ||
preview | ||
reducers | ||
ui | ||
actions.test.js | ||
changeListener.test.js | ||
container.test.js | ||
counts.test.js | ||
experiments.test.js | ||
formatter.test.js | ||
getUserBucket.test.js | ||
integration.test.js | ||
isEnabled.test.js | ||
previewBehavior.test.js | ||
run.js | ||
stubs.js | ||
title.test.js | ||
userSettings.test.js | ||
wait.test.js |