'Unhandled promise rejection in circleci/cypress tests
I have built a pipeline on circleci, however, i'm getting a build failure with this information:
Error: The following error originated from your application code, not from Cypress. It was caused by an unhandled promise rejection.
I can, however, run this test in cypress no problem with no failures - is there something I am missing in circleci? Thanks,
Solution 1:[1]
This means that your application is generating an exception and you should look into that. In case its something that can be ignored, you can go to cypress/support/index.js and add this:
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alapan Das |
