Skip to content

Commit 808104c

Browse files
committed
Fix act warning for React 18 updates
1 parent ef03a42 commit 808104c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/components/connect.spec.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,10 @@ describe('React', () => {
845845
<OuterComponent ref={outerComponent} />
846846
</ProviderMock>
847847
)
848-
outerComponent.current!.setFoo('BAR')
849-
outerComponent.current!.setFoo('DID')
848+
rtl.act(() => {
849+
outerComponent.current!.setFoo('BAR')
850+
outerComponent.current!.setFoo('DID')
851+
})
850852

851853
expect(invocationCount).toEqual(1)
852854
})

0 commit comments

Comments
 (0)