Closed
Bug 1016393
Opened 10 years ago
Closed 10 years ago
[Camera] Fix unit tests with a newer mocha
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: julienw, Assigned: wilsonpage)
References
Details
Attachments
(1 file)
Wilson already kindly provided a commit in [1] so assigning to him. I also previously made commit in [2]. [1] https://github.com/wilsonpage/gaia/tree/julienw-874510-upgrade-mocha [2] https://github.com/wilsonpage/gaia/commit/81b00222ac24519e13a63e3a22d72a01210e6939 Even with these commits, I still see some issues locally: 1) [camera-test/unit/lib/setting-alias_test.js] lib/setting-alias SettingAlias#get() Should get the current setting: Error: expected false to be truthy at chaiAssert (http://camera.gaiamobile.org:8080/common/test/helper.js:33:1) at get (http://camera.gaiamobile.org:8080/common/vendor/chai/chai.js:352:1) at ok (http://camera.gaiamobile.org:8080/common/vendor/chai/chai.js:1225:5) at (anonymous) (http://camera.gaiamobile.org:8080/test/unit/lib/setting-alias_test.js:51:7) at wrapper (http://camera.gaiamobile.org:8080/common/test/mocha_generators.js:62:13) at run (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4311:7) at runTest (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4728:5) at (anonymous) (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4806:7) at next (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4653:7) at (anonymous) (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4663:7) at next (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4601:16) at (anonymous) (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4630:5) at timeslice (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:5763:5) 2) [camera-test/unit/lib/camera/focus_test.js] lib/camera/focus Focus#reset() "before each" hook: wrapper: TypeError: this.focus is undefined at (anonymous) (http://camera.gaiamobile.org:8080/test/unit/lib/camera/focus_test.js:174:7) at wrapper (http://camera.gaiamobile.org:8080/common/test/mocha_generators.js:62:13) at run (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4311:7) at next (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4613:5) at (anonymous) (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4630:5) at timeslice (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:5763:5) 3) [camera-test/unit/lib/camera/focus_test.js] lib/camera/focus Focus#resume() "before each" hook: wrapper: TypeError: this.focus is undefined at (anonymous) (http://camera.gaiamobile.org:8080/test/unit/lib/camera/focus_test.js:194:7) at wrapper (http://camera.gaiamobile.org:8080/common/test/mocha_generators.js:62:13) at run (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4311:7) at next (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4613:5) at (anonymous) (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4630:5) at timeslice (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:5763:5) 4) [camera-test/unit/lib/camera/focus_test.js] lib/camera/focus Focus#isTouchFocusSupported() "before each" hook: wrapper: TypeError: this.focus is undefined at (anonymous) (http://camera.gaiamobile.org:8080/test/unit/lib/camera/focus_test.js:212:7) at wrapper (http://camera.gaiamobile.org:8080/common/test/mocha_generators.js:62:13) at run (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4311:7) at next (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4613:5) at (anonymous) (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4630:5) at timeslice (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:5763:5) 5) [camera-test/unit/lib/camera/focus_test.js] lib/camera/focus Focus#updateFocusArea() "before each" hook: wrapper: TypeError: this.focus is undefined at (anonymous) (http://camera.gaiamobile.org:8080/test/unit/lib/camera/focus_test.js:231:7) at wrapper (http://camera.gaiamobile.org:8080/common/test/mocha_generators.js:62:13) at run (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4311:7) at next (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4613:5) at (anonymous) (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:4630:5) at timeslice (http://camera.gaiamobile.org:8080/common/vendor/mocha/mocha.js:5763:5) Thanks !
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8430667 -
Flags: review?(felash)
Assignee | ||
Updated•10 years ago
|
Attachment #8430667 -
Flags: review?(jdarcangelo)
Comment 2•10 years ago
|
||
Comment on attachment 8430667 [details] [review] pull-request (master) Wilson: A couple of small comments in GitHub for you to address. I had started commenting on the PR but moved over to comment directly on just your commit.
Attachment #8430667 -
Flags: review?(jdarcangelo) → review-
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8430667 [details] [review] pull-request (master) Might be because of my conflict resolving, I have this issue 4 times when running the camera tests: Uncaught Error: Error: Load failed: lib/activity: http://camera.gaiamobile.org:8080/js/lib/activity.js (http://camera.gaiamobile.org:8080/js/vendor/alameda.js?time=1401713504299:893) The files where this happens are: * controllers/viewfinder_test.js * controllers/controls_test.js * controllers/camera_test.js * app_test.js
Attachment #8430667 -
Flags: review?(felash)
Reporter | ||
Comment 4•10 years ago
|
||
I still have this issue, but only on top of the new mocha; it doesn't happen on master with your changes. I don't know alameda enough to help you here :( don't you reproduce at home?
Assignee | ||
Comment 5•10 years ago
|
||
julienw: I think I know the cause of the failures, just pushed a fix. I have no idea why they weren't failing locally for me. Perhaps small local environment differences...?
Reporter | ||
Comment 6•10 years ago
|
||
Comment on attachment 8430667 [details] [review] pull-request (master) Thanks, Will look at it tomorrow again
Attachment #8430667 -
Flags: feedback?(felash)
Reporter | ||
Comment 7•10 years ago
|
||
Comment on attachment 8430667 [details] [review] pull-request (master) fixes the issue, thanks it's green, land it ! :)
Attachment #8430667 -
Flags: feedback?(felash) → feedback+
Assignee | ||
Updated•10 years ago
|
Attachment #8430667 -
Flags: review- → review?(jdarcangelo)
Updated•10 years ago
|
Attachment #8430667 -
Flags: review?(jdarcangelo) → review+
Assignee | ||
Comment 8•10 years ago
|
||
Landed on 'master' https://github.com/mozilla-b2g/gaia/commit/716ce8fe45e61d842cae1f290fac74c0c8d72134
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
•