We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f2afe9 commit 2f4372eCopy full SHA for 2f4372e
test/components/hooks.spec.js
@@ -95,13 +95,15 @@ describe('React', () => {
95
expect(mapStateSpy3).toHaveBeenCalledTimes(1)
96
expect(renderSpy3).toHaveBeenCalledTimes(1)
97
98
- store.dispatch({ type: 'FOO' })
+ rtl.act(() => {
99
+ store.dispatch({ type: 'FOO' })
100
+ })
101
102
expect(mapStateSpy1).toHaveBeenCalledTimes(2)
103
expect(renderSpy1).toHaveBeenCalledTimes(2)
- expect(renderSpy2).toHaveBeenCalledTimes(3)
- expect(mapStateSpy3).toHaveBeenCalledTimes(2)
104
- expect(renderSpy3).toHaveBeenCalledTimes(2)
+ expect(renderSpy2).toHaveBeenCalledTimes(4)
105
+ expect(mapStateSpy3).toHaveBeenCalledTimes(3)
106
+ expect(renderSpy3).toHaveBeenCalledTimes(3)
107
})
108
109
0 commit comments