From d6fcdb7531efd698f03fab5bd095f6b034a5618b Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 13 Jan 2022 10:51:13 -0500 Subject: [PATCH] Fixed ReactUpdaters test by adding missing methods to the DevTools hook mock --- .../__tests__/ReactUpdaters-test.internal.js | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js b/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js index 7770c070667d6..44301017338cb 100644 --- a/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js +++ b/packages/react-reconciler/src/__tests__/ReactUpdaters-test.internal.js @@ -51,6 +51,32 @@ describe('updaters', () => { onCommitUnmount: jest.fn(() => {}), onPostCommitRoot: jest.fn(() => {}), onScheduleRoot: jest.fn(() => {}), + + // Profiling APIs + markCommitStarted: jest.fn(() => {}), + markCommitStopped: jest.fn(() => {}), + markComponentRenderStarted: jest.fn(() => {}), + markComponentRenderStopped: jest.fn(() => {}), + markComponentPassiveEffectMountStarted: jest.fn(() => {}), + markComponentPassiveEffectMountStopped: jest.fn(() => {}), + markComponentPassiveEffectUnmountStarted: jest.fn(() => {}), + markComponentPassiveEffectUnmountStopped: jest.fn(() => {}), + markComponentLayoutEffectMountStarted: jest.fn(() => {}), + markComponentLayoutEffectMountStopped: jest.fn(() => {}), + markComponentLayoutEffectUnmountStarted: jest.fn(() => {}), + markComponentLayoutEffectUnmountStopped: jest.fn(() => {}), + markComponentErrored: jest.fn(() => {}), + markComponentSuspended: jest.fn(() => {}), + markLayoutEffectsStarted: jest.fn(() => {}), + markLayoutEffectsStopped: jest.fn(() => {}), + markPassiveEffectsStarted: jest.fn(() => {}), + markPassiveEffectsStopped: jest.fn(() => {}), + markRenderStarted: jest.fn(() => {}), + markRenderYielded: jest.fn(() => {}), + markRenderStopped: jest.fn(() => {}), + markRenderScheduled: jest.fn(() => {}), + markForceUpdateScheduled: jest.fn(() => {}), + markStateUpdateScheduled: jest.fn(() => {}), }; jest.mock(