mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
reverting the rename
This commit is contained in:
@@ -129,7 +129,7 @@ describe('profiling', () => {
|
||||
const rendererID = utils.getRendererID();
|
||||
const rootID = store.roots[0];
|
||||
|
||||
await utils.actAsync(() =>
|
||||
await utils.actSuspense(() =>
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
@@ -145,7 +145,7 @@ describe('profiling', () => {
|
||||
|
||||
exportImportHelper(rendererID, rootID);
|
||||
|
||||
await utils.actAsync(() =>
|
||||
await utils.actSuspense(() =>
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
@@ -218,7 +218,7 @@ describe('profiling', () => {
|
||||
const rootID = store.roots[0];
|
||||
|
||||
for (let commitIndex = 0; commitIndex < 4; commitIndex++) {
|
||||
await utils.actAsync(() => {
|
||||
await utils.actSuspense(() => {
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
@@ -237,7 +237,7 @@ describe('profiling', () => {
|
||||
exportImportHelper(rendererID, rootID);
|
||||
|
||||
for (let commitIndex = 0; commitIndex < 4; commitIndex++) {
|
||||
await utils.actAsync(() => {
|
||||
await utils.actSuspense(() => {
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
@@ -311,7 +311,7 @@ describe('profiling', () => {
|
||||
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(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
@@ -429,7 +429,7 @@ describe('profiling', () => {
|
||||
|
||||
exportImportHelper(rendererID, rootID);
|
||||
|
||||
await utils.actAsync(() =>
|
||||
await utils.actSuspense(() =>
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
|
||||
@@ -97,7 +97,7 @@ describe('profiling charts', () => {
|
||||
for (let commitIndex = 0; commitIndex < 2; commitIndex++) {
|
||||
suspenseResolved = false;
|
||||
|
||||
await utils.actAsync(() =>
|
||||
await utils.actSuspense(() =>
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
@@ -187,7 +187,7 @@ describe('profiling charts', () => {
|
||||
for (let commitIndex = 0; commitIndex < 2; commitIndex++) {
|
||||
suspenseResolved = false;
|
||||
|
||||
await utils.actAsync(() =>
|
||||
await utils.actSuspense(() =>
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
@@ -268,7 +268,7 @@ describe('profiling charts', () => {
|
||||
for (let commitIndex = 0; commitIndex < 2; commitIndex++) {
|
||||
suspenseResolved = false;
|
||||
|
||||
await utils.actAsync(() =>
|
||||
await utils.actSuspense(() =>
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
|
||||
@@ -67,7 +67,7 @@ describe('commit tree', () => {
|
||||
for (let commitIndex = 0; commitIndex < 4; commitIndex++) {
|
||||
suspenseResolved = false;
|
||||
|
||||
await utils.actAsync(() =>
|
||||
await utils.actSuspense(() =>
|
||||
TestRenderer.create(
|
||||
<React.Suspense fallback={null}>
|
||||
<Suspender
|
||||
|
||||
@@ -14,7 +14,7 @@ export function act(callback: Function): void {
|
||||
});
|
||||
}
|
||||
|
||||
export async function actAsync(cb: () => *): Promise<void> {
|
||||
export async function actSuspense(cb: () => *): Promise<void> {
|
||||
const TestUtils = require('react-dom/test-utils');
|
||||
|
||||
// $FlowFixMe Flow doens't know about "await act()" yet
|
||||
|
||||
Reference in New Issue
Block a user