-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: Cannot read property 'apply' of undefined #5499
Comments
@Versifiction What happens when you turn off failing the test during uncaught exceptions? https://on.cypress.io/catalog-of-events#Uncaught-Exceptions |
@jennifer-shehane I turned it off, but it's like it's still on.. Here's my cypress/support/index.js file : Cypress.on("uncaught:exception", (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false;
});
Cypress.on("fail", (error, runnable) => {
debugger;
// we now have access to the err instance
// and the mocha runnable this failed on
throw error; // throw error to have test still fail
}); |
@Versifiction I pulled down the repo provided and added the test below, with the uncaught exception handler. The test does indeed pass when given the uncaught:exception handler. Please use this as a workaround. If this is not the error you were encountering, then provide the full set of tests please to reproduce. support/index.js Cypress.on("uncaught:exception", (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false;
}); spec.js it('works', () => {
cy.visit("http://localhost:3000")
}) |
I have the error below when I want to do some tests, it's because Redux but I can't disabled or turn off the uncaught exception
You can fork https://github.com/Versifiction/ofilms or clone the repo ->
npm install
->npm start
I tried with the version 3.4.1 of Cypress and Chrome 77
The content of the file which creates an error in Cypress :
The text was updated successfully, but these errors were encountered: