diff --git a/tests/cypress/support/index.js b/tests/cypress/support/index.js index 2a064b04..55b780d9 100644 --- a/tests/cypress/support/index.js +++ b/tests/cypress/support/index.js @@ -17,10 +17,10 @@ before(() => { cy.closeModalUnsupportedPlatform(); }); -const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/; +const resizeObserverLoopErr = 'ResizeObserver loop limit exceeded'; Cypress.on('uncaught:exception', (err) => { - if (resizeObserverLoopErrRe.test(err.message)) { - // the exception is generated by cypress in some browsers + // the exception is generated by cypress in some browsers + if (err.message.includes(resizeObserverLoopErr)) { return false; } });