Page MenuHomePhabricator

View.test.js should call JSDom before initializing jQuery
Closed, ResolvedPublic2 Estimated Story Points

Description

View.test.js initializes jQuery before calling JSDom.

This should result in a failing test, however, because the previous test, Skin.test.js, doesn't tear down jQuery, View.test.js still has access to that old jQuery instance, and the tests pass.

When the order of the tests changes however, View.test.js no longer has access to the old jQuery instance and the View.test.js test fails.

Event Timeline

Change 479593 had a related patch set uploaded (by Jdrewniak; owner: Jdrewniak):
[mediawiki/extensions/MobileFrontend@master] Ensure View.test.js sets up JSDom before jQuery

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

Change 479593 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Ensure View.test.js sets up JSDom before jQuery

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

Jdlrobson set the point value for this task to 2.Dec 14 2018, 6:13 PM