Skip to content

Commit

Permalink
fix(dsfr): ignore les exceptions d'hydratation
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot committed Sep 10, 2024
1 parent f7ccd02 commit f146a58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/code-du-travail-frontend/cypress/support/errors.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Cypress.on("uncaught:exception", (err) => {
console.log("Uncaught exception: ", err);
console.log("Uncaught exception: ", err.message);
// Cypress and React Hydrating the document don't get along
// for some unknown reason. Hopefully, we figure out why eventually
// so we can remove this.
return false;
if (
/hydrat/i.test(err.message) ||
/Wrong assertion encountered/i.test(err.message) ||
/Minified React error #418/.test(err.message) ||
/Minified React error #423/.test(err.message)
) {
Expand Down

0 comments on commit f146a58

Please sign in to comment.