Cypress.on uncaught:exception send logs to console.log only and NOT command log #23463
Unanswered
dlavigneNBguy
asked this question in
Questions and Help
Replies: 1 comment 1 reply
-
It looks like you have a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We have this in our support/index.js as per many other recommendations:
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 } return true })
But on runs, it still will output "(uncaught exception)Error: ResizeObserver loop limit exceeded" so the reports and command logs every time it is hit. We know about it and just don't want to see it in the command log or reports. I've tried many different ways to stop it from going to command log but nothing worked. We just want it to go to console log only (for this particular message)
ps, it does retry twice, as a bonus, how can we disconnect the retries on that particular Cypress.on being used there.
Thanks
DL
Beta Was this translation helpful? Give feedback.
All reactions