Closed Bug 1465530 Opened 6 years ago Closed 6 years ago

Enable ESLint rule require-expected-throws-or-rejects for testing/marionette/

Categories

(Remote Protocol :: Marionette, enhancement)

Version 3
enhancement
Not set
normal

Tracking

(firefox62 fixed)

RESOLVED FIXED
mozilla62
Tracking Status
firefox62 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

This is continuing roll-out of require-expected-throws-or-rejects as per bug 1452706.
Comment on attachment 8981957 [details] Bug 1465530 - Enable ESLint rule require-expected-throws-or-rejects for testing/marionette/. https://reviewboard.mozilla.org/r/247970/#review254096 This is great! We have had real bugs in our test suite as a result of incorrect Assert.throws usage in the past, so I’m very grateful you took the time to write this rule.
Attachment #8981957 - Flags: review?(ato) → review+
So this only adds the tests but not any js file under testing/marionette directly. Or do I miss something?
Assignee: nobody → standard8
Status: NEW → ASSIGNED
Flags: needinfo?(standard8)
(In reply to Henrik Skupin (:whimboo) from comment #3) > So this only adds the tests but not any js file under testing/marionette > directly. Or do I miss something? The ESLint configuration is controlled from the top-level srcdir .eslintrc.js file (sub directories can set extra rules, but they're either extending the top-level one or overriding it, generally I prefer not overriding). In this case the ESLint rule is set in recommended.js (which the top-level extends), but was whitelisted for certain directories in that file whilst we roll it out. If you mean the Assert.throws/rejects calls, then they're just being updated to be explicit about which exception is expected (we've had lots of cases of these catching the wrong thing, or just passing because of broken code). The exceptions are already thrown in the code.
Flags: needinfo?(standard8)
I see. Thanks.
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3e9d04bbec91 Enable ESLint rule require-expected-throws-or-rejects for testing/marionette/. r=ato
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla62
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: