Fix test to use AsyncMode

Addresses one of the issues brought up by @NE-SmallTown in https://github.com/facebook/react/pull/13488#issuecomment-416805935
This commit is contained in:
Dan committed 2018-08-29 13:20:16 +01:00
1 parent 6e4f7c7886
commit 1c0ba70b4b
1 file changed
+8 -1
@@ -85,6 +85,8 @@ describe('ReactDOMFiberAsync', () => {
this.setState({
asyncValue: nextValue,
});
// It should not be flushed yet.
expect(asyncValueRef.current.textContent).toBe('');
});
this.setState({
syncValue: nextValue,
@@ -105,7 +107,12 @@ describe('ReactDOMFiberAsync', () => {
);
}
}
ReactDOM.render(<Counter />, container);
ReactDOM.render(
<AsyncMode>
<Counter />
</AsyncMode>,
container,
);
expect(asyncValueRef.current.textContent).toBe('');
expect(syncValueRef.current.textContent).toBe('');