eslint mark-test-function-used rule does not work for xpcshell

RESOLVED FIXED in Firefox 52

Status

defect
RESOLVED FIXED
4 years ago
Last year

People

(Reporter: tromey, Assigned: standard8)

Tracking

unspecified
mozilla52
Dependency tree / graph

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

The eslint mark-test-function rule does not work for xpcshell tests,
but should.  Currently it only works for browser mochitests.

To work for xpcshell tests it should look for a file named test_*.js
and it should mark the function "run_test" as used.
Component: General → ESLint
Assignee: nobody → standard8
Note: these changes resolves 941 no-unused-vars errors out of 3955ish when no-unused-vars is turned on in the toolkit eslint.
Blocks: 1312407
The update I've just pushed includes removal of a few places where run_test was being exported or handled especially.
Comment on attachment 8804651 [details]
Bug 1240165 - Expand the eslint rule 'mark-test-function-used' to cover xpcshell tests as well as gecko tests and apply to the whole tree.

https://reviewboard.mozilla.org/r/88564/#review88696
Attachment #8804651 - Flags: review?(mratcliffe) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/141c1a49b1b1
Expand the eslint rule 'mark-test-function-used' to cover xpcshell tests as well as gecko tests and apply to the whole tree. r=miker
https://hg.mozilla.org/mozilla-central/rev/141c1a49b1b1
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Product: Testing → Firefox Build System
You need to log in before you can comment on or make changes to this bug.