Closed Bug 1240165 Opened 4 years ago Closed 4 years ago

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

Categories

(Firefox Build System :: Lint and Formatting, defect)

defect
Not set
normal

Tracking

(firefox52 fixed)

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: tromey, Assigned: standard8)

References

Details

Attachments

(1 file)

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: 4 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.