Router.js, InfiniteScroll and mobile settings tests have been disabled due to causing problems in the Jenkins environment.
- we cannot easily stub localStorage. Look at mediawiki.storage for details.
The culprit is QUnit.start and QUnit.stop not working as before on teardown of the test_Router.js.
From what I've been investigating, there is now way we can stop and start QUnit in setup & teardown, and stop and start are being deprecated. The test suite for the router needs to be re-thought and the Router itself should be decoupled from the browser (it is completely coupled to window/window.location/etc making it super hard to test without messing with the browser).
What this should be:
- Decouple the Router.js from window and browser details. Maybe use an intermediate event emitter that provides the hash and emits the hashchange events, etc. Provide one by default that covers what the window does.
- Refactor the tests (enable them) and use a fake event emitter to trigger and set router behavior, and test the Router properly.