Closed
Bug 1451378
Opened 6 years ago
Closed 6 years ago
Enable ESLint rule no-undef for more test files in devtools
Categories
(DevTools :: General, enhancement)
DevTools
General
Tracking
(firefox61 fixed)
RESOLVED
FIXED
Firefox 61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(1 file)
The patch I'm attaching fixes no-undef for the majority of the remaining devtools folders, there's still a couple left, which I'll handle in a later bug.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8964972 [details] Bug 1451378 - Enable ESLint rule no-undef for more test files in devtools. https://reviewboard.mozilla.org/r/233706/#review239396 Thanks again! Works for me if try is green. ::: devtools/server/tests/browser/browser_actor_error.js:29 (Diff revision 2) > await gClient.connect(); > > let { errorActor } = await gClient.listTabs(); > ok(errorActor, "Found the error actor."); > > - try { > + Assert.rejects(gClient.request({ to: errorActor, type: "error" }), Thanks for fixing that! I should have use Assert.rejects from the beginning here. The actual error we should check here is async: await Assert.rejects(gClient.request({ to: errorActor, type: "error" }), err => err.error == "unknownError" && /error occurred while processing 'error/.test(err.message), "The request should be rejected"); I can handle it in a follow up, given it's already not testing anything relevant right now. ::: devtools/shared/heapsnapshot/tests/unit/head_heapsnapshot.js:114 (Diff revision 2) > filePrePath += "/"; > } > > path = path.slice(filePrePath.length); > > - if (sePlatformPathSeparator && path.match(/^\w:/)) { > + if (usePlatformPathSeparator && path.match(/^\w:/)) { logically, this argument was never used.
Attachment #8964972 -
Flags: review?(jdescottes) → review+
Assignee | ||
Comment 4•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8964972 [details] Bug 1451378 - Enable ESLint rule no-undef for more test files in devtools. https://reviewboard.mozilla.org/r/233706/#review239396 > Thanks for fixing that! I should have use Assert.rejects from the beginning here. The actual error we should check here is async: > > await Assert.rejects(gClient.request({ to: errorActor, type: "error" }), > err => err.error == "unknownError" && > /error occurred while processing 'error/.test(err.message), > "The request should be rejected"); > > I can handle it in a follow up, given it's already not testing anything relevant right now. I'll fix it here, since I should have included the await - which also has helped me spot there's more awaits missing in the tree for Assert.rejects (!). > logically, this argument was never used. Yeah, since this was also in devtools/server/tests/unit/head_dbg.js, I think I decided to keep this the same.
Comment hidden (mozreview-request) |
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8b603bf3ea53 Enable ESLint rule no-undef for more test files in devtools. r=jdescottes
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8b603bf3ea53
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 61
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•