Skip to content

Commit b578e96

Browse files
committed
Force SSR tests to mimic a Node environment
1 parent 4401bf8 commit b578e96

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/integration/server-rendering.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* @jest-environment node
3+
* Set this so that `window` is undefined to correctly mimic a Node SSR scenario.
4+
* That allows connectAdvanced to fall back to `useEffect` instead of `useLayoutEffect`
5+
* to avoid ugly console warnings when used with SSR.
6+
*/
7+
18
/*eslint-disable react/prop-types*/
29

310
import React from 'react'

0 commit comments

Comments
 (0)