Closed
Bug 1032327
Opened 10 years ago
Closed 10 years ago
[Settings] Fix unit tests with a newer mocha
Categories
(Firefox OS Graveyard :: Gaia::Settings, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: julienw, Assigned: julienw)
References
Details
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #1016429 +++
In Bug 874510, we try to upgrade mocha and there is yet another issue:
1) [settings-test/unit/panels/display/display_test.js] start testing > start test display module > initBrightnessItems without ambientLight:
ReferenceError: MockNavigatorSettings is not defined
at set (app://settings.gaiamobile.org/shared/test/unit/mocks/mock_settings_listener.js?bust=1404151664157:13:5)
at d_init_brightness_items (app://settings.gaiamobile.org/js/panels/display/display.js?bust=1404151664157:57:9)
at (anonymous) (app://settings.gaiamobile.org/test/unit/panels/display/display_test.js:63:7)
I'll use the same fix than in bug 1016429.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8448136 -
Flags: review?(arthur.chen)
Comment 2•10 years ago
|
||
Hi Julien,
Could you try if adding "deps: ['shared_mocks/mock_navigator_moz_settings']" after this line [1] helps?
[1] https://github.com/mozilla-b2g/gaia/blob/master/apps/settings/test/unit/setup.js#L55
Flags: needinfo?(felash)
Assignee | ||
Comment 3•10 years ago
|
||
Yes, this works fine
I'll add it and also revert the change I did in bug 1016429 then :)
Flags: needinfo?(felash)
Assignee | ||
Updated•10 years ago
|
Attachment #8448136 -
Flags: review?(arthur.chen)
Assignee | ||
Comment 4•10 years ago
|
||
pushed a new version.
Will wait for the Travis run with the patch for bug 874510 before requesting a review.
https://travis-ci.org/mozilla-b2g/gaia/builds/29308895
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8448136 [details] [review]
github PR
Green on master: https://travis-ci.org/mozilla-b2g/gaia/builds/29308837
Green with the new mocha: https://travis-ci.org/mozilla-b2g/gaia/builds/29308895
Thanks for the tip with "deps", it looks a lot cleaner !
Attachment #8448136 -
Flags: review?(arthur.chen)
Comment 6•10 years ago
|
||
Comment on attachment 8448136 [details] [review]
github PR
Cool! r=me, thanks.
Attachment #8448136 -
Flags: review?(arthur.chen) → review+
Assignee | ||
Comment 7•10 years ago
|
||
master: 1e6083654b2bdd9cf12b6d05b7dacff1e4d159cc
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•