dillon1000/react
Commit
Browse files fix[react-devtools]: fixed timeline profiler tests (#31261)
Fixes tests against React 18 after https://github.com/facebook/react/pull/31154: - Set `supportsTimeline` to true for `Store`. - Execute `store.profilerStore.startProfiling` after `legacyRender` import, because this is where `react-dom` is imported and renderer is registered. We don't yet propagate `isProfiling` flag to newly registered renderers, when profiling already started see: https://github.com/facebook/react/blob/d5bba18b5d81f234657586865248c5b6849599cd/packages/react-devtools-shared/src/hook.js#L203-L204
Changed paths2 files
First-parent comparisonpackages/react-devtools-shared/src/__tests__/TimelineProfiler-test.js ModifiedM packages/react-devtools-shared/src/__tests__/setupTests.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…