Open Bug 1655422 Opened 4 years ago Updated 2 years ago

List for allowMatchingRejectionsGlobally is never emptied


(Testing :: Mochitest, task)



(Not tracked)


(Reporter: jdescottes, Unassigned)


(Blocks 1 open bug)


The helper allowMatchingRejectionsGlobally allows to ignore promise rejections matching a given regexp:

  allowMatchingRejectionsGlobally(regExp) {
    this._globalRejectionIgnoreFns.push(rejection =>

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.

See Also: → 1655411

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.