From e9cc4e4d7533130ddd42bc5a5d9c3ac9fe4f58eb Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Tue, 21 Sep 2021 14:36:33 +0200 Subject: [PATCH] test: ignore ChunkLoadError (#43512) They only seem to occur during testing at the moment. If we get a user report, we can investigate, but until then they're a distraction. --- cypress/support/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cypress/support/index.js b/cypress/support/index.js index 37a498fb5b..0e2a795461 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -18,3 +18,14 @@ import './commands'; // Alternatively you can use CommonJS syntax: // require('./commands') + +Cypress.on('uncaught:exception', err => { + // Rapidly cy.visiting pages seems to cause an uncaught exception. This seems + // to be a testing artifact, since users can't click fast enough to cause this + // (to our knowledge). + if (err.name === 'ChunkLoadError') { + return false; + } + // We are still interested in other errors. + return true; +});