}>
@@ -497,7 +497,7 @@ describe('ReactDOMFizzServer', () => {
pipe(writable);
});
expect(getVisibleChildren(container)).toEqual(
Loading...
);
- await act(async () => {
+ await act(() => {
resolve({default: Text});
});
expect(getVisibleChildren(container)).toEqual(
Hello
);
@@ -545,7 +545,7 @@ describe('ReactDOMFizzServer', () => {
const expectedDigest = onError(theError);
loggedErrors.length = 0;
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
, {
bootstrapScriptContent: '__INIT__();',
onError,
@@ -562,7 +562,7 @@ describe('ReactDOMFizzServer', () => {
expect(loggedErrors).toEqual([]);
- await act(async () => {
+ await act(() => {
rejectComponent(theError);
});
@@ -604,7 +604,7 @@ describe('ReactDOMFizzServer', () => {
});
});
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
}>
@@ -624,7 +624,7 @@ describe('ReactDOMFizzServer', () => {
renderOptions.unstable_externalRuntimeSrc,
).length,
).toBe(1);
- await act(async () => {
+ await act(() => {
resolveElement({default:
});
});
expect(getVisibleChildren(container)).toEqual(
Hello
);
@@ -658,7 +658,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
,
@@ -684,7 +684,7 @@ describe('ReactDOMFizzServer', () => {
expect(loggedErrors).toEqual([]);
- await act(async () => {
+ await act(() => {
rejectElement(theError);
});
@@ -754,7 +754,7 @@ describe('ReactDOMFizzServer', () => {
const expectedDigest = onError(theError);
loggedErrors.length = 0;
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
,
@@ -822,7 +822,7 @@ describe('ReactDOMFizzServer', () => {
const expectedDigest = onError(theError);
loggedErrors.length = 0;
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
,
@@ -845,7 +845,7 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(container)).toEqual(
Loading...
);
- await act(async () => {
+ await act(() => {
rejectComponent(theError);
});
@@ -878,7 +878,7 @@ describe('ReactDOMFizzServer', () => {
});
it('should asynchronously load the suspense boundary', async () => {
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
}>
@@ -889,7 +889,7 @@ describe('ReactDOMFizzServer', () => {
pipe(writable);
});
expect(getVisibleChildren(container)).toEqual(
Loading...
);
- await act(async () => {
+ await act(() => {
resolveText('Hello World');
});
expect(getVisibleChildren(container)).toEqual(
Hello World
);
@@ -917,7 +917,7 @@ describe('ReactDOMFizzServer', () => {
ReactDOMClient.hydrateRoot(container,
);
};
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
, {
bootstrapScriptContent: '__INIT__();',
});
@@ -937,7 +937,7 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(container)).toEqual(
Loading...
);
// The server now updates the content in place in the fallback.
- await act(async () => {
+ await act(() => {
resolveText('Hello');
});
@@ -991,7 +991,7 @@ describe('ReactDOMFizzServer', () => {
const loggedErrors = [];
// We originally suspend the boundary and start streaming the loading state.
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
,
@@ -1017,7 +1017,7 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(container)).toEqual(
Loading...
);
const theError = new Error('Error Message');
- await act(async () => {
+ await act(() => {
rejectText('This Errors', theError);
});
@@ -1073,7 +1073,7 @@ describe('ReactDOMFizzServer', () => {
}
// We originally suspend the boundary and start streaming the loading state.
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
);
pipe(writable);
});
@@ -1146,7 +1146,7 @@ describe('ReactDOMFizzServer', () => {
}
let controls;
- await act(async () => {
+ await act(() => {
controls = renderToPipeableStream(
, {onError});
controls.pipe(writable);
});
@@ -1166,7 +1166,7 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(container)).toEqual(
Loading...
);
// We abort the server response.
- await act(async () => {
+ await act(() => {
controls.abort();
});
@@ -1216,7 +1216,7 @@ describe('ReactDOMFizzServer', () => {
writable.write(chunk, encoding, next);
};
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
// We use two nested boundaries to flush out coverage of an old reentrancy bug.
@@ -1240,7 +1240,7 @@ describe('ReactDOMFizzServer', () => {
);
});
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
}>
@@ -1264,7 +1264,7 @@ describe('ReactDOMFizzServer', () => {
Loading B...
,
]);
- await act(async () => {
+ await act(() => {
resolveText('B');
});
@@ -1275,7 +1275,7 @@ describe('ReactDOMFizzServer', () => {
,
]);
- await act(async () => {
+ await act(() => {
resolveText('A');
});
@@ -1336,7 +1336,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
);
pipe(writable);
});
@@ -1347,15 +1347,15 @@ describe('ReactDOMFizzServer', () => {
,
);
- await act(async () => {
+ await act(() => {
resolveText('Hello');
});
- await act(async () => {
+ await act(() => {
resolveText('World');
});
- await act(async () => {
+ await act(() => {
resolveText('my-path');
resolveText('my-mi');
});
@@ -1423,7 +1423,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
);
pipe(writable);
});
@@ -1438,15 +1438,15 @@ describe('ReactDOMFizzServer', () => {
,
);
- await act(async () => {
+ await act(() => {
resolveText('A');
});
- await act(async () => {
+ await act(() => {
resolveText('B');
});
- await act(async () => {
+ await act(() => {
resolveText('C');
});
@@ -1476,7 +1476,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
,
@@ -1499,7 +1499,7 @@ describe('ReactDOMFizzServer', () => {
,
);
- await act(async () => {
+ await act(() => {
resolveText('my-path');
});
@@ -1562,7 +1562,7 @@ describe('ReactDOMFizzServer', () => {
};
try {
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
);
pipe(writable);
});
@@ -1589,7 +1589,7 @@ describe('ReactDOMFizzServer', () => {
expect(mockError).not.toHaveBeenCalled();
}
- await act(async () => {
+ await act(() => {
resolveText('Hello');
resolveText('World');
});
@@ -1660,7 +1660,7 @@ describe('ReactDOMFizzServer', () => {
}
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
@@ -1680,7 +1680,7 @@ describe('ReactDOMFizzServer', () => {
Loading: A
,
);
- await act(async () => {
+ await act(() => {
resolveText('Hello: ');
});
expect(getVisibleChildren(container)).toEqual(
@@ -1717,7 +1717,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
@@ -1741,7 +1741,7 @@ describe('ReactDOMFizzServer', () => {
A0
Loading...
A0
,
);
- await act(async () => {
+ await act(() => {
resolveText('Child:');
});
expect(getVisibleChildren(container)).toEqual(
@@ -1778,7 +1778,7 @@ describe('ReactDOMFizzServer', () => {
}
const loggedErrors = [];
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
@@ -1846,7 +1846,7 @@ describe('ReactDOMFizzServer', () => {
loggedErrors.length = 0;
let controls;
- await act(async () => {
+ await act(() => {
controls = renderToPipeableStream(
,
@@ -1874,7 +1874,7 @@ describe('ReactDOMFizzServer', () => {
expect(loggedErrors).toEqual([]);
// Error the content, but we don't have a fallback yet.
- await act(async () => {
+ await act(() => {
rejectText('Hello', theError);
});
@@ -1885,7 +1885,7 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(container)).toEqual('Loading root...');
// Unblock the loading state
- await act(async () => {
+ await act(() => {
resolveText('Loading...');
});
@@ -1929,7 +1929,7 @@ describe('ReactDOMFizzServer', () => {
});
it('should be able to abort the fallback if the main content finishes first', async () => {
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
}>
@@ -1950,7 +1950,7 @@ describe('ReactDOMFizzServer', () => {
expect(getVisibleChildren(container)).toEqual('Loading Outer');
// We should have received a partial segment containing the a partial of the fallback.
expect(container.innerHTML).toContain('Inner');
- await act(async () => {
+ await act(() => {
resolveText('Hello');
});
// We should've been able to display the content without waiting for the rest of the fallback.
@@ -2026,7 +2026,7 @@ describe('ReactDOMFizzServer', () => {
await jest.runAllTimers();
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
);
pipe(writable);
});
@@ -2036,7 +2036,7 @@ describe('ReactDOMFizzServer', () => {
expect(container.innerHTML).not.toContain('Avoided Fallback');
// resolve first suspense component with avoidThisFallback
- await act(async () => {
+ await act(() => {
promiseRes[0]();
});
@@ -2050,7 +2050,7 @@ describe('ReactDOMFizzServer', () => {
expect(container.innerHTML).not.toContain('Avoided Fallback2');
- await act(async () => {
+ await act(() => {
promiseRes[1]();
});
@@ -2136,7 +2136,7 @@ describe('ReactDOMFizzServer', () => {
}
const loggedErrors = [];
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
@@ -2219,7 +2219,7 @@ describe('ReactDOMFizzServer', () => {
);
}
const loggedErrors = [];
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
@@ -2306,7 +2306,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream();
pipe(writable);
});
@@ -2396,7 +2396,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream();
pipe(writable);
});
@@ -2486,7 +2486,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream();
pipe(writable);
});
@@ -2539,7 +2539,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
, {
onError(error) {
Scheduler.log('[s!] ' + error.message);
@@ -2576,7 +2576,7 @@ describe('ReactDOMFizzServer', () => {
expect(serverFallback).toBe(clientFallback);
// When we're able to fully hydrate, we expect a clean client render.
- await act(async () => {
+ await act(() => {
resolveText('Yay!');
});
await waitForAll([
@@ -2624,7 +2624,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(, {
onError(error) {
Scheduler.log('[s!] ' + error.message);
@@ -2670,7 +2670,7 @@ describe('ReactDOMFizzServer', () => {
expect(clientFallback2).toBe(serverFallback);
// When we're able to fully hydrate, we expect a clean client render.
- await act(async () => {
+ await act(() => {
resolveText('Yay!');
});
await waitForAll([
@@ -2722,7 +2722,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(
,
{
@@ -2784,7 +2784,7 @@ describe('ReactDOMFizzServer', () => {
expect(clientFallback2).not.toBe(clientFallback1);
// Verify we can still do a clean content render after.
- await act(async () => {
+ await act(() => {
resolveText('Yay!');
});
await waitForAll(['Yay!']);
@@ -2851,7 +2851,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream();
pipe(writable);
});
@@ -2883,7 +2883,7 @@ describe('ReactDOMFizzServer', () => {
,
);
- await act(async () => {
+ await act(() => {
resolveText('Yay!');
});
await waitForAll(['Yay!']);
@@ -3001,7 +3001,7 @@ describe('ReactDOMFizzServer', () => {
);
}
- await act(async () => {
+ await act(() => {
const {pipe} = renderToPipeableStream(