Skip to content

Commit

Permalink
test: add comment for prev commit
Browse files Browse the repository at this point in the history
  • Loading branch information
martinkrulltott committed Jun 19, 2023
1 parent 456a404 commit fa5f4d9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cypress/support/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ enableAutoLogin()

const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/
Cypress.on('uncaught:exception', (err) => {
/* returning false here prevents Cypress from failing the test */
// 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
if (resizeObserverLoopErrRe.test(err.message)) {
// returning false here prevents Cypress from failing the test
return false
}
})

0 comments on commit fa5f4d9

Please sign in to comment.