MCPcopy
hub / github.com/facebook/react / beforeEachProfiling

Function beforeEachProfiling

packages/react-devtools-shared/src/__tests__/utils.js:246–257  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

244 : getModernRenderImplementation;
245
246export function beforeEachProfiling(): void {
247 // Mock React's timing information so that test runs are predictable.
248 jest.mock('scheduler', () => jest.requireActual('scheduler/unstable_mock'));
249
250 // DevTools itself uses performance.now() to offset commit times
251 // so they appear relative to when profiling was started in the UI.
252 jest
253 .spyOn(performance, 'now')
254 .mockImplementation(
255 jest.requireActual('scheduler/unstable_mock').unstable_now,
256 );
257}
258
259export function createDisplayNameFilter(
260 source: string,

Callers

nothing calls this directly

Calls 2

mockMethod · 0.80
mockImplementationMethod · 0.80

Tested by

no test coverage detected