Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Fix uncaught errors while testing on Cast (#7345)
We get strange uncaught errors sometimes on Cast devices. These are unreadable "script error" events that have nothing to do with our tests (see https://sentry.io/answers/script-error/), and we intend to ignore them. However, our existing logic to ignore those is not sufficient, because in addition to our own error handler (via window.addEventListener("error")), Jasmine has its own unconditional error handler (via window.onerror). To take complete control over how these are handled, we need to remove Jasmine's handler. Jasmine's handler is installed at the top of its execute() function, so our top-level beforeAll() is the best place to remove it.
- Loading branch information