-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cypress): fix ResizeObserver loop error handling and make it gl…
…obal
- Loading branch information
Showing
4 changed files
with
18 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
components/tab/src/tab-bar/features/auto_hides_scroll_buttons/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
components/transfer/src/features/notify_at_end_of_list/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Cypress.on('uncaught:exception', (err) => { | ||
/* This prevents a benign error: | ||
* This error means that ResizeObserver was not able to deliver all | ||
* observations within a single animation frame. It is benign (your site | ||
* will not break). | ||
* | ||
* Source: https://stackoverflow.com/a/50387233/1319140 | ||
*/ | ||
const errMsg = err.toString() | ||
if ( | ||
errMsg.match(/ResizeObserver loop limit exceeded/) || | ||
errMsg.match(/ResizeObserver loop completed with undelivered notifications/) | ||
) { | ||
return false | ||
} | ||
}) |