Skip to content

Commit 734dd10

Browse files
committed
Fix act related issues in test/hooks/useSelector.spec.tsx
1 parent 430243e commit 734dd10

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: test/hooks/useSelector.spec.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,11 @@ describe('React', () => {
509509
</ProviderMock>,
510510
)
511511

512-
const doDispatch = () => normalStore.dispatch({ type: '' })
512+
const doDispatch = () => {
513+
rtl.act(() => {
514+
normalStore.dispatch({ type: '' })
515+
})
516+
}
513517
expect(doDispatch).not.toThrowError()
514518

515519
spy.mockRestore()

0 commit comments

Comments
 (0)