Skip to content

Commit

Permalink
Fix test to use AsyncMode
Browse files Browse the repository at this point in the history
Addresses one of the issues brought up by @NE-SmallTown in #13488 (comment)
  • Loading branch information
gaearon committed Aug 29, 2018
1 parent 6e4f7c7 commit 1c0ba70
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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('');

Expand Down

0 comments on commit 1c0ba70

Please sign in to comment.