During code review of the [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/455052/ |
Hygiene: introduce headless QUnit tests ]] a couple of us were surprised to see qunit listed in package.json of MobileFrontend, given that Popups uses [[ https://github.com/wikimedia/mw-node-qunit | node-qunit ]] which provides a wrapper around qunit and some of the scaffolding e.g. [[ https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MobileFrontend/+/455052/11/tests/node-qunit/MockMediaWiki.test.js | MockMediaWiki ]] that now lives inside MobileFrontend.
Stephen later explained mw-node-qunit adds jsdom, sinon, and wraps QUnit and since @Jhernandez wrote it and the team is not familiar with it we may want to revisit it.
Possible options down the road include
* Spinning out wikimedia/mock-mediawiki for handling MediaWiki dependencies
* Use qunit in all extensions using webpack
* Expanding/adapting mw-node-qunit
= Acceptance criteria
[] Use of headless qunit runner is consistent between Popups and MobileFrontend