Open
Bug 1655422
Opened 4 years ago
Updated 2 years ago
List for allowMatchingRejectionsGlobally is never emptied
Categories
(Testing :: Mochitest, task)
Tracking
(Not tracked)
NEW
People
(Reporter: jdescottes, Unassigned)
References
(Blocks 1 open bug)
Details
The helper allowMatchingRejectionsGlobally
allows to ignore promise rejections matching a given regexp:
allowMatchingRejectionsGlobally(regExp) {
this._globalRejectionIgnoreFns.push(rejection =>
regExp.test(rejection.message)
);
},
However, _globalRejectionIgnoreFns
is never emptied. This means that if any test calls allowMatchingRejectionsGlobally
, all the subsequent tests in the suite will be impacted. This means also some tests can fail in isolation, but succeed in a suite (example: Bug 1655411).
I don't know if we should modify the behavior, or just add an API to cleanup the array so that individual tests can cleanup the state on demand.
Comment 1•2 years ago
|
||
CC'ing Joel in case it's something we want to see fixed. It will also affect some Remote Agent mochitests soon, and a workaround would be to put these specific files into their own manifest file.
You need to log in
before you can comment on or make changes to this bug.
Description
•