Skip to content

Commit 33db084

Browse files
committed
Update index.js
1 parent ba77cb9 commit 33db084

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

cypress/support/index.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ import './commands'
3030
*
3131
* We want to get over some errors, not all of them.
3232
*/
33-
// Cypress.on('uncaught:exception', (err, runnable) => {
34-
// /**
35-
// * we expect a 3rd party library error with message 'google is not defined'
36-
// * and don't want to fail the test so we return false
37-
// *
38-
// */
39-
// if (err.message.includes('google is not defined')) {
40-
// return false
41-
// }
42-
// /** if other libraries don't load, we skip these errors. */
43-
// if (err.message.includes('Cannot read properties')) {
44-
// return false
45-
// }
46-
// /**
47-
// * we still want to ensure there are no other unexpected
48-
// * errors, so we let them fail the test
49-
// */
50-
// });
33+
Cypress.on('uncaught:exception', (err, runnable) => {
34+
/**
35+
* we expect a 3rd party library error with message 'foo' is not defined'
36+
* and don't want to fail the test so we return false
37+
*
38+
*/
39+
if (err.message.includes('$ is not defined')) {
40+
return false
41+
}
42+
/** if other libraries don't load, we skip these errors. */
43+
if (err.message.includes('Cannot read properties of undefined')) {
44+
return false
45+
}
46+
/**
47+
* we still want to ensure there are no other unexpected
48+
* errors, so we let them fail the test
49+
*/
50+
});

0 commit comments

Comments
 (0)