File size: 478 Bytes
cb5b71d
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
Cypress.Commands.add("ignore_resize_observer", () => {
    const resizeObserverLoopErrRe = /ResizeObserver loop limit exceeded/

    // consensus was that this exception didn't matter mostly, and was intermittent when running tests.
    // https://stackoverflow.com/questions/63653605/resizeobserver-loop-limit-exceeded-api-is-never-used
    Cypress.on('uncaught:exception', err => {
      if (resizeObserverLoopErrRe.test(err.message)) {
        return false
      }
    })
})