Skip to content

Commit

Permalink
avoid uncaught promise rejection in test
Browse files Browse the repository at this point in the history
  • Loading branch information
phryneas committed Dec 3, 2024
1 parent 324ae88 commit e1eae04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/renderStream/__tests__/useTrackRenders.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ describe('non-suspense use cases', () => {
let asyncAction = Promise.withResolvers<string>()
beforeEach(() => {
asyncAction = Promise.withResolvers<string>()
void asyncAction.promise.catch(() => {
/* avoid uncaught promise rejection */
})
})
function ErrorComponent() {
useTrackRenders()
Expand Down

0 comments on commit e1eae04

Please sign in to comment.