Skip to content

Commit e1eae04

Browse files
committed
avoid uncaught promise rejection in test
1 parent 324ae88 commit e1eae04

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/renderStream/__tests__/useTrackRenders.test.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ describe('non-suspense use cases', () => {
1717
let asyncAction = Promise.withResolvers<string>()
1818
beforeEach(() => {
1919
asyncAction = Promise.withResolvers<string>()
20+
void asyncAction.promise.catch(() => {
21+
/* avoid uncaught promise rejection */
22+
})
2023
})
2124
function ErrorComponent() {
2225
useTrackRenders()

0 commit comments

Comments
 (0)