Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions docs/api/utilities/promise.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,7 @@ If the test code has an unhandled rejected promise, it does not automatically
fail the test. If you do want to fail the test if there is an unhandled rejected
promise in the test code you have to do one of two things:

If you use `Cypress.Promise` in your test code, register a callback using
Bluebird's API

```javascript
Cypress.Promise.onPossiblyUnhandledRejection((error, promise) => {
throw error
})
```

If you use native built-in promises in your test code, register an event
listener on the test `window` object:
Register an event listener on the test `window` object:

```javascript
window.addEventListener('unhandledrejection', (event) => {
Expand Down