From 8689f73e1a508667db98e755fd2450aae1cc4a9b Mon Sep 17 00:00:00 2001 From: Benjamin Gruenbaum Date: Thu, 7 Nov 2024 20:28:59 +0000 Subject: [PATCH] Stop recommending bluebird's own event --- docs/api/utilities/promise.mdx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/docs/api/utilities/promise.mdx b/docs/api/utilities/promise.mdx index 712d626307..148685137d 100644 --- a/docs/api/utilities/promise.mdx +++ b/docs/api/utilities/promise.mdx @@ -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) => {