Closed Bug 1465530 Opened Last year Closed Last year
Enable ESLint rule require-expected-throws-or-rejects for testing/marionette/
59 bytes, text/x-review-board-request
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
Duplicate of this bug: 1408042
(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.
I see. Thanks.
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/3e9d04bbec91 Enable ESLint rule require-expected-throws-or-rejects for testing/marionette/. r=ato
You need to log in before you can comment on or make changes to this bug.