diff --git a/packages/react-devtools-shared/src/__tests__/TimelineProfiler-test.js b/packages/react-devtools-shared/src/__tests__/TimelineProfiler-test.js index b4cc9bbc0bafc..e632227ab3a79 100644 --- a/packages/react-devtools-shared/src/__tests__/TimelineProfiler-test.js +++ b/packages/react-devtools-shared/src/__tests__/TimelineProfiler-test.js @@ -1280,13 +1280,13 @@ describe('Timeline profiler', () => { }); describe('when profiling', () => { - beforeEach(() => { - utils.act(() => store.profilerStore.startProfiling()); - }); - describe('with legacy render', () => { const {render: legacyRender} = getLegacyRenderImplementation(); + beforeEach(() => { + utils.act(() => store.profilerStore.startProfiling()); + }); + // @reactVersion <= 18.2 // @reactVersion >= 18.0 it('should mark sync render without suspends or state updates', () => { @@ -1537,6 +1537,10 @@ describe('Timeline profiler', () => { const {render: modernRender} = getModernRenderImplementation(); + beforeEach(() => { + utils.act(() => store.profilerStore.startProfiling()); + }); + it('should mark concurrent render without suspends or state updates', () => { utils.act(() => modernRender(
)); diff --git a/packages/react-devtools-shared/src/__tests__/setupTests.js b/packages/react-devtools-shared/src/__tests__/setupTests.js index 0a821345fcbac..50431b230ad87 100644 --- a/packages/react-devtools-shared/src/__tests__/setupTests.js +++ b/packages/react-devtools-shared/src/__tests__/setupTests.js @@ -256,7 +256,9 @@ beforeEach(() => { }, }); - const store = new Store(((bridge: any): FrontendBridge)); + const store = new Store(((bridge: any): FrontendBridge), { + supportsTimeline: true, + }); const agent = new Agent(((bridge: any): BackendBridge)); const hook = global.__REACT_DEVTOOLS_GLOBAL_HOOK__;