Skip to content

Commit 24a6932

Browse files
author
Andrea Barbasso
committed
[DSC-2774] do not fail e2e tests on uncaught exceptions
1 parent 4b242e9 commit 24a6932

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

cypress/support/e2e.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ before(() => {
5757
cy.task('saveRestBaseDomain', baseDomain);
5858

5959
});
60+
61+
// We might receive uncaught exceptions from external libraries (e.g. it happened before with a broken
62+
// version of the addToAny plugin). These should not cause our tests to fail, so we catch them here.
63+
Cypress.on('uncaught:exception', (err, runnable) => {
64+
// returning false here prevents Cypress from failing the test
65+
return false;
66+
});
6067
});
6168

6269
// Runs once before the first test in each "block"

0 commit comments

Comments
 (0)