From e1eae0459ec22983cae7ee8db78bc6ed838a2c9d Mon Sep 17 00:00:00 2001 From: Lenz Weber-Tronic Date: Tue, 3 Dec 2024 14:37:25 +0100 Subject: [PATCH] avoid uncaught promise rejection in test --- src/renderStream/__tests__/useTrackRenders.test.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/renderStream/__tests__/useTrackRenders.test.tsx b/src/renderStream/__tests__/useTrackRenders.test.tsx index 86d65c334..c05c90ba6 100644 --- a/src/renderStream/__tests__/useTrackRenders.test.tsx +++ b/src/renderStream/__tests__/useTrackRenders.test.tsx @@ -17,6 +17,9 @@ describe('non-suspense use cases', () => { let asyncAction = Promise.withResolvers() beforeEach(() => { asyncAction = Promise.withResolvers() + void asyncAction.promise.catch(() => { + /* avoid uncaught promise rejection */ + }) }) function ErrorComponent() { useTrackRenders()