Closed Bug 1245779 Opened 4 years ago Closed 2 years ago

ESLint custom no-cpows-in-tests rule shouldn't report errors when 'content' is used in a contentTask

Categories

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

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1264063

People

(Reporter: pbro, Unassigned)

References

Details

The no-cpows-in-tests rule [1] tends to report false positives unfortunately.
One of the ways it does that is when you use 'content' in a 'ContentTask.spawn' block, it warns against it anyway.

The rule should be aware of ContentTasks and not warn about 'content' then.

[1] https://dxr.mozilla.org/mozilla-central/source/testing/eslint-plugin-mozilla/lib/rules/no-cpows-in-tests.js
Component: General → ESLint
Mike, do you know how important this bug and bug 1246896 are now? Are cpows banned via other means, or are we moving towards that?

I'm trying to work out if we should fix up no-cpows-in-tests and expand it further across the tree, or if other work in progress is going to make it obsolete.
Flags: needinfo?(mconley)
(In reply to Mark Banner (:standard8) (afk 11 - 20 Aug) from comment #1)
> Mike, do you know how important this bug and bug 1246896 are now? Are cpows
> banned via other means, or are we moving towards that?
>

CPOWs are still used and allowed in mochitests, and we _should_ strive to avoid them - certainly, we should strive to avoid adding new CPOWs. I know of no active efforts to drive CPOWs in tests down to zero.

So I think this is still important to do, if at least to avoid adding more CPOWs over time.
Flags: needinfo?(mconley)
Ok, thanks.
Priority: -- → P3
Bug 1264063 has already fixed the ContentTask.spawn issue, I'll mark this as a dupe.
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1264063
Product: Testing → Firefox Build System
You need to log in before you can comment on or make changes to this bug.