From eb5c39289a4d247d74652caba21ba8ddeae691af Mon Sep 17 00:00:00 2001 From: mashal-m Date: Fri, 17 Mar 2023 11:19:19 +0500 Subject: [PATCH] refactor: update setupTest file --- src/setupTest.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/setupTest.js b/src/setupTest.js index 22b09c05a..f19b10e28 100644 --- a/src/setupTest.js +++ b/src/setupTest.js @@ -34,3 +34,7 @@ Object.defineProperty(window, 'matchMedia', { // See https://github.com/atlassian/react-beautiful-dnd/issues/1593 window['__react-beautiful-dnd-disable-dev-warnings'] = true; +// Upgrading to Node16 shows unhandledPromiseRejection warnings as errors so adding a handler +process.on('unhandledRejection', (reason, p) => { + console.log('Unhandled Rejection at: Promise', p, 'reason:', reason.stack); +});