diff --git a/src/__tests__/profiling-test.js b/src/__tests__/profiling-test.js index 26d2e2e678..8631c9c08a 100644 --- a/src/__tests__/profiling-test.js +++ b/src/__tests__/profiling-test.js @@ -129,7 +129,7 @@ describe('profiling', () => { const rendererID = utils.getRendererID(); const rootID = store.roots[0]; - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( { exportImportHelper(rendererID, rootID); - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( { const rootID = store.roots[0]; for (let commitIndex = 0; commitIndex < 4; commitIndex++) { - await utils.actAsync(() => { + await utils.actSuspense(() => { TestRenderer.create( { exportImportHelper(rendererID, rootID); for (let commitIndex = 0; commitIndex < 4; commitIndex++) { - await utils.actAsync(() => { + await utils.actSuspense(() => { TestRenderer.create( { const rootID = store.roots[0]; for (let index = 0; index < store.numElements; index++) { - await utils.actAsync(() => { + await utils.actSuspense(() => { const fiberID = store.getElementIDAtIndex(index); if (fiberID == null) { throw Error(`Unexpected null ID for element at index ${index}`); @@ -334,7 +334,7 @@ describe('profiling', () => { exportImportHelper(rendererID, rootID); for (let index = 0; index < store.numElements; index++) { - await utils.actAsync(() => { + await utils.actSuspense(() => { const fiberID = store.getElementIDAtIndex(index); if (fiberID == null) { throw Error(`Unexpected null ID for element at index ${index}`); @@ -413,7 +413,7 @@ describe('profiling', () => { const rendererID = utils.getRendererID(); const rootID = store.roots[0]; - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( { exportImportHelper(rendererID, rootID); - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( { for (let commitIndex = 0; commitIndex < 2; commitIndex++) { suspenseResolved = false; - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( { for (let commitIndex = 0; commitIndex < 2; commitIndex++) { suspenseResolved = false; - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( { for (let commitIndex = 0; commitIndex < 2; commitIndex++) { suspenseResolved = false; - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( { for (let commitIndex = 0; commitIndex < 4; commitIndex++) { suspenseResolved = false; - await utils.actAsync(() => + await utils.actSuspense(() => TestRenderer.create( *): Promise { +export async function actSuspense(cb: () => *): Promise { const TestUtils = require('react-dom/test-utils'); // $FlowFixMe Flow doens't know about "await act()" yet