@samitouri / QOS-React-2 / commits / 1c0ba70b4b

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

Dan committed Aug 29, 2018 at 13:20 UTC 1c0ba70b4b753178d1bb9d9d8e32b90c50ec7e2c
1 file changed +8 -1
packages/react-dom/src/__tests__/ReactDOMFiberAsync-test.internal.js
+8 -1
@@ -85,6 +85,8 @@ describe('ReactDOMFiberAsync', () => {
85 this.setState({
86 asyncValue: nextValue,
87 });
88 + // It should not be flushed yet.
89 + expect(asyncValueRef.current.textContent).toBe('');
90 });
91 this.setState({
92 syncValue: nextValue,
@@ -105,7 +107,12 @@ describe('ReactDOMFiberAsync', () => {
107 );
108 }
109 }
108 - ReactDOM.render(<Counter />, container);
110 + ReactDOM.render(
111 + <AsyncMode>
112 + <Counter />
113 + </AsyncMode>,
114 + container,
115 + );
116 expect(asyncValueRef.current.textContent).toBe('');
117 expect(syncValueRef.current.textContent).toBe('');
118