Explorar o código

ignore ResizeObserver exception

Yuki Takei %!s(int64=4) %!d(string=hai) anos
pai
achega
91f9717b59
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      packages/app/test/cypress/support/index.ts

+ 10 - 0
packages/app/test/cypress/support/index.ts

@@ -20,6 +20,16 @@ import './screenshot'
 // Alternatively you can use CommonJS syntax:
 // Alternatively you can use CommonJS syntax:
 // require('./commands')
 // require('./commands')
 
 
+// Ignore 'ResizeObserver loop limit exceeded' exception
+// https://github.com/cypress-io/cypress/issues/8418
+const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/
+Cypress.on('uncaught:exception', (err) => {
+    /* returning false here prevents Cypress from failing the test */
+    if (resizeObserverLoopErrRe.test(err.message)) {
+        return false
+    }
+})
+
 declare global {
 declare global {
   // eslint-disable-next-line @typescript-eslint/no-namespace
   // eslint-disable-next-line @typescript-eslint/no-namespace
   namespace Cypress {
   namespace Cypress {