From 30ed8a519bf5bd165fd67bf37c0540ddaf712865 Mon Sep 17 00:00:00 2001 From: Jack Pope Date: Mon, 11 Mar 2024 10:56:00 -0400 Subject: [PATCH] Update comments --- .../src/__tests__/ReactProfiler-test.internal.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/react/src/__tests__/ReactProfiler-test.internal.js b/packages/react/src/__tests__/ReactProfiler-test.internal.js index eba668cac6782..b7bfb4585950e 100644 --- a/packages/react/src/__tests__/ReactProfiler-test.internal.js +++ b/packages/react/src/__tests__/ReactProfiler-test.internal.js @@ -1080,14 +1080,15 @@ describe(`onRender`, () => { // base time includes: 2 (ErrorBoundary) // Since the tree is empty for the initial commit expect(mountCall[3]).toBe(2); - // start time + // start time: 5 initially + 14 of work + // Add an additional 3 (ThrowsError) if we replayed the failed work expect(mountCall[4]).toBe( __DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback ? 22 : 19, ); - // commit time: 5 initially + 14 of work - // Add an additional 3 (ThrowsError) if we replayed the failed work + // commit time: 19 initially + 14 of work + // Add an additional 6 (ThrowsError *2) if we replayed the failed work expect(mountCall[5]).toBe( __DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback ? 39 @@ -1106,8 +1107,8 @@ describe(`onRender`, () => { ? 39 : 33, ); - // commit time: 19 (startTime) + 2 (ErrorBoundary) + 20 (AdvanceTime) - // Add an additional 3 (ThrowsError) if we replayed the failed work + // commit time: 33 (startTime) + 2 (ErrorBoundary) + 20 (AdvanceTime) + // Add an additional 6 (ThrowsError *2) if we replayed the failed work expect(updateCall[5]).toBe( __DEV__ && replayFailedUnitOfWorkWithInvokeGuardedCallback ? 61