Closed
Bug 1125108
Opened 10 years ago
Closed 10 years ago
Disable blanket by default in watcher
Categories
(Firefox OS Graveyard :: Gaia::TestAgent, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: julienw, Assigned: rickychien)
References
Details
Attachments
(3 files)
STR:
1. have the test-agent browser + server running in background
2. save a syntax error in a file that's monitored by the test-agent
Expected:
* an error shows up in the console
* when I save the file removing the syntax error, it's now run again
Actual:
* an error shows up in the console
* when I save the file removing the syntax error, nothing runs. And actually the same happens for all files. I need to reload the test-agent window to make it work again.
The blanket error is:
JavaScript error: app://sms.gaiamobile.org/common/vendor/blanket/blanket.js?time=1422018172628, line 41: Error: Line 41: Unexpected token :
I think we need to catch those errors so that the test-agent can run subsequent tests.
Reporter | ||
Comment 1•10 years ago
|
||
Hey Ricky, do you have an idea for this?
Flags: needinfo?(ricky060709)
Assignee | ||
Comment 2•10 years ago
|
||
Werid :(
My test-agent can automatically re-trigger when I save the file with removing a syntax error.
In order to catch those errors, I think we can add Error.prototype.stack [1] to do so. However, I hope that patch will not change anything in blanket.js.
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/Stack
Flags: needinfo?(ricky060709)
Reporter | ||
Comment 3•10 years ago
|
||
Humm if it works for you maybe I'm doing something wrong. I'll look further.
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ricky060709
Status: NEW → ASSIGNED
Comment 4•10 years ago
|
||
Assignee | ||
Comment 5•10 years ago
|
||
Hi Julien, so far unit testing is hard to debug for a while since enabling blanket by default output so many dara-uri instead of proper error messages.
I'd like to disable it for reducing such trouble. Please review it kindly thanks! =)
Attachment #8565399 -
Flags: review?(felash)
Reporter | ||
Comment 6•10 years ago
|
||
Comment on attachment 8565399 [details] [review]
Js-test-agent PR
This fixes the issue for me but because it doesn't fix the root issue we might want to land this in a separate bug?
r=me for this patch
Attachment #8565399 -
Flags: review?(felash) → review+
Assignee | ||
Comment 7•10 years ago
|
||
I'd like to address the root issue in another bug because it seems not so easy to fix if it turns out that we have to patch blanket.js.
Comment 8•10 years ago
|
||
Assignee | ||
Comment 9•10 years ago
|
||
Landed in master:
gaia: https://github.com/mozilla-b2g/gaia/commit/123e7e33965c5bfca3238913f2b2828fe77eee9e
js-test-agent: https://github.com/mozilla-b2g/js-test-agent/commit/45d78a8231cad1a261d2401435d5b1e1eeff8083
gaia-node-modules: https://github.com/mozilla-b2g/gaia-node-modules/commit/800b5b4505221e620b9a68ab966ad562827e3eaf
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 10•10 years ago
|
||
(In reply to Ricky Chien [:rickychien] from comment #7)
> I'd like to address the root issue in another bug because it seems not so
> easy to fix if it turns out that we have to patch blanket.js.
2 thoughts:
* IMO it would have been easier to just file a separate bug to disable blanket and have your patch there... Now I need to clone this bug...
* I think we just need to try/catch somewhere in our code when we instrument using blanket before launching the tests.
Comment 11•10 years ago
|
||
Renaming the bug based on comment and the commit messages.
Summary: When a test file has a syntax error, blanket fails and then the test-agent can't run anything → Disable blanket by default in watcher
You need to log in
before you can comment on or make changes to this bug.
Description
•