Skip to content

Commit 2bacba5

Browse files
author
Andrea Barbasso
committed
[DSC-2730] do not fail e2e tests on uncaught exceptions
1 parent 453eedc commit 2bacba5

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
@@ -50,6 +50,13 @@ before(() => {
5050
cy.task('saveRestBaseDomain', baseDomain);
5151

5252
});
53+
54+
// We might receive uncaught exceptions from external libraries (e.g. it happened before with a broken
55+
// version of the addToAny plugin). These should not cause our tests to fail, so we catch them here.
56+
Cypress.on('uncaught:exception', (err, runnable) => {
57+
// returning false here prevents Cypress from failing the test
58+
return false;
59+
});
5360
});
5461

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

0 commit comments

Comments
 (0)