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)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julienw, Assigned: julienw)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
arthurcc
: review+
Details | Review
+++ 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.
Attached file github PR
Attachment #8448136 - Flags: review?(arthur.chen)
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)
Yes, this works fine I'll add it and also revert the change I did in bug 1016429 then :)
Flags: needinfo?(felash)
Attachment #8448136 - Flags: review?(arthur.chen)
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
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 on attachment 8448136 [details] [review] github PR Cool! r=me, thanks.
Attachment #8448136 - Flags: review?(arthur.chen) → review+
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.

Attachment

General

Created:
Updated:
Size: