mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
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:
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('');
|
||||
|
||||
|
||||
Reference in new issue
Block a user