Skip to content

Commit

Permalink
Fixed ReactUpdaters test by adding missing methods to the DevTools ho…
Browse files Browse the repository at this point in the history
…ok mock
  • Loading branch information
Brian Vaughn committed Jan 13, 2022
1 parent 91ba67a commit 864df34
Showing 1 changed file with 26 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 864df34

Please sign in to comment.