-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
During a test run, if Cypress encounters an unhandled exception, it fails the test run. Sometimes the exception relates to custom code, but sometimes it relates to third-party code and it might only happen intermittently.
Cypress provides some advice for handling these scenarios: https://docs.cypress.io/api/events/catalog-of-events#To-turn-off-all-uncaught-exception-handling
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})
You can add that to a describe()
or it()
block's scope or try to handle them more globally. What should the guidance be for encountering uncaught exceptions?
dmundra
Metadata
Metadata
Assignees
Labels
No labels