From 7aaef6f41fa0dc0b13554a2e0800a34187a4ddfc Mon Sep 17 00:00:00 2001 From: Sunil Pai Date: Fri, 10 May 2019 12:18:40 +0100 Subject: [PATCH] reverting the rename --- src/__tests__/profiling-test.js | 16 ++++++++-------- src/__tests__/profilingCharts-test.js | 6 +++--- src/__tests__/profilingCommitTreeBuilder-test.js | 2 +- src/__tests__/utils.js | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) 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