allowMatchingRejectionsGlobally no longer persists after each browser-chrome mochitest

4 views
Skip to first unread message

Julian Descottes

unread,
Jul 10, 2026, 9:08:40 AM (3 days ago) Jul 10
to firefox-dev
Hi all,

With https://bugzilla.mozilla.org/show_bug.cgi?id=1655422, exceptions added by PromiseTestUtils.allowMatchingRejectionsGlobally are now removed after each browser-chrome mochitest. This corresponds to the behavior of xpcshell-tests and reduces surprising side effects between tests.

Previously, if test_A.js called allowMatchingRejectionsGlobally(/foo/), it would leak to all subsequent tests within the same test suite. Meaning that uncaught rejections containing "foo" would be also ignored for any test running after test_A.js.

This might result in new intermittent failures starting with "uncaught rejection:". Considering most tests are now successfully running in standalone, we expect the number of regressions to be low, but if this affects one of your tests, it most likely means it needs to call allowMatchingRejectionsGlobally explicitly.

Let me know if you have any questions.

Julian Descottes

Reply all
Reply to author
Forward
0 new messages