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 8479774 commit cf946dbCopy full SHA for cf946db
test/integration/server-rendering.spec.js
@@ -40,6 +40,22 @@ describe('React', () => {
40
expect(markup).toContain('Hello world')
41
})
42
43
+ it('should run in an SSR environment without logging warnings about useLayoutEffect', () => {
44
+ const store = createStore(greetingReducer)
45
+
46
+ const spy = jest.spyOn(console, 'error').mockImplementation(() => {})
47
48
+ const markup = renderToString(
49
+ <Provider store={store}>
50
+ <Greeter greeted="world" />
51
+ </Provider>
52
+ )
53
54
+ expect(spy).toHaveBeenCalledTimes(0)
55
56
+ spy.mockRestore()
57
+ })
58
59
it('should render with updated state if actions are dispatched before render', () => {
60
const store = createStore(greetingReducer)
61
0 commit comments