Page MenuHomePhabricator

Add test coverage for rlModuleLoader.js
Closed, ResolvedPublic3 Estimated Story Points

Description

Currently rlModuleLoader.js is our only non-View code which has no test coverage and this makes me a sad panda. This task aims to make this 100%.

The rlModuleLoader wraps mw.loader.using and shows a spinner overlay until the module has finished loading

Developer notes

Add test coverage for rlModuleLoader.js

Risks:
1 function with various different code paths with async behaviour (with reject/done resolution behaviour), 1 optional parameter, use of new keyword

Sign off steps

Coverage should be 100%. If not, please make a note on the table.

Event Timeline

Change 473943 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Add test coverage for rlModuleLoader.js

https://gerrit.wikimedia.org/r/473943

There was a conversation on https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/473943/ about changing the loadModule function. Let's see if we can do this as part of this task. If it proves more complicated and merits a new task, please flag!

the proposal is to make loadModule take a second parameter - a LoadingOverlay.

Change 473943 merged by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Add test coverage for rlModuleLoader.js

https://gerrit.wikimedia.org/r/473943

Change 474397 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Add assertions for resolved value of promises in rlModuleLoader.test.js

https://gerrit.wikimedia.org/r/474397

Change 474398 had a related patch set uploaded (by Nray; owner: Nray):
[mediawiki/extensions/MobileFrontend@master] Change/Deprecate rlModuleLoader params

https://gerrit.wikimedia.org/r/474398

Change 474397 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Add assertions for resolved value of promises in rlModuleLoader.test.js

https://gerrit.wikimedia.org/r/474397

Jdlrobson added a subscriber: nray.
Jdlrobson claimed this task.
Jdlrobson updated the task description. (Show Details)