Restrict Cypress uncaught exception suppression to known benign errors
Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
@@ -20,9 +20,11 @@
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import "./commands";
|
||||
Cypress.on("uncaught:exception", (err, runnable) => {
|
||||
// returning false here prevents Cypress from failing the test
|
||||
return false;
|
||||
import { getCypressUncaughtExceptionDecision } from "./uncaughtExceptionPolicy";
|
||||
|
||||
Cypress.on("uncaught:exception", (error) => {
|
||||
// Ignore only known benign browser/runtime noise; fail all other app errors.
|
||||
return getCypressUncaughtExceptionDecision(error);
|
||||
});
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
|
||||
Reference in New Issue
Block a user