Page MenuHomePhabricator

View.test.js should call JSDom before initializing jQuery
Closed, ResolvedPublic2 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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 14 2018, 9:08 AM

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

This comment was removed by Jdlrobson.
Jdlrobson set the point value for this task to 2.Dec 14 2018, 6:13 PM
nray closed this task as Resolved.Dec 18 2018, 6:08 PM