From fa5f4d9f06d03276d2df2a01515afaa1b30955c1 Mon Sep 17 00:00:00 2001 From: martinkrulltott Date: Mon, 19 Jun 2023 14:16:58 +0200 Subject: [PATCH] test: add comment for prev commit --- cypress/support/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cypress/support/index.js b/cypress/support/index.js index 525b7426e1..385c6ab0b5 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -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 } })