diff --git a/packages/dom-event-testing-library/__tests__/index-test.internal.js b/packages/dom-event-testing-library/__tests__/index-test.internal.js index c793b1f2b7b53..3883d9a9ba8c1 100644 --- a/packages/dom-event-testing-library/__tests__/index-test.internal.js +++ b/packages/dom-event-testing-library/__tests__/index-test.internal.js @@ -49,7 +49,7 @@ describe('createEventTarget', () => { const target = createEventTarget(node); expect(target.node).toEqual(node); expect(Object.keys(target)).toMatchInlineSnapshot(` - Array [ + [ "node", "blur", "click", @@ -337,7 +337,7 @@ describe('createEventTarget', () => { test('.setBoundingClientRect()', () => { const target = createEventTarget(node); expect(node.getBoundingClientRect()).toMatchInlineSnapshot(` - Object { + { "bottom": 0, "height": 0, "left": 0, @@ -350,7 +350,7 @@ describe('createEventTarget', () => { `); target.setBoundingClientRect({x: 10, y: 20, width: 100, height: 200}); expect(node.getBoundingClientRect()).toMatchInlineSnapshot(` - Object { + { "bottom": 220, "height": 200, "left": 10, diff --git a/packages/react-art/src/__tests__/__snapshots__/ReactART-test.js.snap b/packages/react-art/src/__tests__/__snapshots__/ReactART-test.js.snap index c8c5609ad922c..7c39c18bc965f 100644 --- a/packages/react-art/src/__tests__/__snapshots__/ReactART-test.js.snap +++ b/packages/react-art/src/__tests__/__snapshots__/ReactART-test.js.snap @@ -3,10 +3,10 @@ exports[`ReactARTComponents should generate a where top radius is 0 if the sum of the top radius is greater than width 1`] = ` where top radius is 0 if t exports[`ReactARTComponents should generate a with a radius property of 0 when bottom left radius prop is negative 1`] = ` with a radius property of exports[`ReactARTComponents should generate a with a radius property of 0 when bottom right radius prop is negative 1`] = ` with a radius property of exports[`ReactARTComponents should generate a with a radius property of 0 when top left radius prop is negative 1`] = ` with a radius property of exports[`ReactARTComponents should generate a with a radius property of 0 when top right radius prop is negative 1`] = ` with a radius property of exports[`ReactARTComponents should generate a with positive height when height prop is negative 1`] = ` with positive height when exports[`ReactARTComponents should generate a with positive width when width prop is negative 1`] = ` with positive width when w exports[`ReactARTComponents should generate a with props for drawing the Circle 1`] = ` with props for drawing the exports[`ReactARTComponents should generate a with props for drawing the Rectangle 1`] = ` with props for drawing the exports[`ReactARTComponents should generate a with props for drawing the Wedge 1`] = ` { renderHelper(
); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-2", "--render-start-2", "--render-stop", @@ -151,7 +151,7 @@ describe('Timeline profiler', () => { renderRootHelper(
); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -161,7 +161,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushUntilNextPaint([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--render-stop", "--commit-start-32", @@ -196,7 +196,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushAndYieldThrough(['Foo']); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-128", "--render-start-128", "--component-render-start-Foo", @@ -219,7 +219,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-2", "--render-start-2", "--component-render-start-Example", @@ -242,7 +242,7 @@ describe('Timeline profiler', () => { await fakeSuspensePromise; expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--suspense-resolved-0-Example", ] `); @@ -261,7 +261,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-2", "--render-start-2", "--component-render-start-Example", @@ -299,7 +299,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -309,7 +309,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushUntilNextPaint([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-Example", "--component-render-stop", @@ -331,7 +331,7 @@ describe('Timeline profiler', () => { await fakeSuspensePromise; expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--suspense-resolved-0-Example", ] `); @@ -350,7 +350,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -360,7 +360,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushUntilNextPaint([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-Example", "--component-render-stop", @@ -382,7 +382,7 @@ describe('Timeline profiler', () => { await expect(fakeSuspensePromise).rejects.toThrow(); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--suspense-rejected-0-Example", ] `); @@ -402,7 +402,7 @@ describe('Timeline profiler', () => { renderRootHelper(); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -412,7 +412,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushUntilNextPaint([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-Example", "--component-render-stop", @@ -455,7 +455,7 @@ describe('Timeline profiler', () => { renderRootHelper(); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -465,7 +465,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushUntilNextPaint([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-Example", "--component-render-stop", @@ -509,7 +509,7 @@ describe('Timeline profiler', () => { renderRootHelper(); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -529,7 +529,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-Example", "--schedule-state-update-32-Example", @@ -563,7 +563,7 @@ describe('Timeline profiler', () => { renderRootHelper(); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -583,7 +583,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-Example", "--schedule-forced-update-32-Example", @@ -614,7 +614,7 @@ describe('Timeline profiler', () => { renderRootHelper(); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -624,7 +624,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushUntilNextPaint([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-Example", "--component-render-stop", @@ -670,7 +670,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushAndYield([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", "--render-start-32", "--component-render-start-Example", @@ -719,7 +719,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushAndYield([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", "--render-start-32", "--component-render-start-Example", @@ -766,7 +766,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-2", "--render-start-2", "--component-render-start-ErrorBoundary", @@ -829,7 +829,7 @@ describe('Timeline profiler', () => { ); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -839,7 +839,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushUntilNextPaint([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--render-start-32", "--component-render-start-ErrorBoundary", "--component-render-stop", @@ -929,7 +929,7 @@ describe('Timeline profiler', () => { ]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", "--render-start-32", "--component-render-start-ComponentWithEffects", @@ -960,7 +960,7 @@ describe('Timeline profiler', () => { ]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--passive-effects-start-32", "--component-passive-effect-mount-start-ComponentWithEffects", "--component-passive-effect-mount-stop", @@ -987,7 +987,7 @@ describe('Timeline profiler', () => { ]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-2", "--render-start-2", "--render-stop", @@ -1021,7 +1021,7 @@ describe('Timeline profiler', () => { renderHelper(
); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-2", "--render-start-2", "--render-stop", @@ -1041,7 +1041,7 @@ describe('Timeline profiler', () => { it('regression test DefaultLane', () => { renderRootHelper(
); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-render-32", ] `); @@ -1069,7 +1069,7 @@ describe('Timeline profiler', () => { await Promise.resolve(); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-state-update-2-App", "--render-start-2", "--component-render-start-App", @@ -1109,7 +1109,7 @@ describe('Timeline profiler', () => { expect(Scheduler).toFlushAndYield([]); expect(clearedMarks).toMatchInlineSnapshot(` - Array [ + [ "--schedule-state-update-8-App", "--render-start-8", "--component-render-start-App", @@ -1189,8 +1189,8 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000000010", "timestamp": 10, "type": "schedule-render", @@ -1205,8 +1205,8 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", @@ -1243,8 +1243,8 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1253,7 +1253,7 @@ describe('Timeline profiler', () => { "type": "schedule-state-update", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1262,7 +1262,7 @@ describe('Timeline profiler', () => { "type": "schedule-state-update", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1271,7 +1271,7 @@ describe('Timeline profiler', () => { "type": "schedule-state-update", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1283,15 +1283,15 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 0, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "Example", "duration": 10, "timestamp": 10, @@ -1369,7 +1369,7 @@ describe('Timeline profiler', () => { expect(timelineData.suspenseEvents).toHaveLength(1); const suspenseEvent = timelineData.suspenseEvents[0]; expect(suspenseEvent).toMatchInlineSnapshot(` - Object { + { "componentName": "Example", "depth": 0, "duration": 10, @@ -1427,7 +1427,7 @@ describe('Timeline profiler', () => { expect(timelineData.suspenseEvents).toHaveLength(1); const suspenseEvent = timelineData.suspenseEvents[0]; expect(suspenseEvent).toMatchInlineSnapshot(` - Object { + { "componentName": "Example", "depth": 0, "duration": 10, @@ -1485,7 +1485,7 @@ describe('Timeline profiler', () => { expect(timelineData.suspenseEvents).toHaveLength(1); const suspenseEvent = timelineData.suspenseEvents[0]; expect(suspenseEvent).toMatchInlineSnapshot(` - Object { + { "componentName": "Example", "depth": 0, "duration": 10, @@ -1543,7 +1543,7 @@ describe('Timeline profiler', () => { expect(timelineData.suspenseEvents).toHaveLength(1); const suspenseEvent = timelineData.suspenseEvents[0]; expect(suspenseEvent).toMatchInlineSnapshot(` - Object { + { "componentName": "Example", "depth": 0, "duration": 10, @@ -1584,15 +1584,15 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.batchUIDToMeasuresMap.size).toBe(2); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "Example", "duration": 10, "timestamp": 20, @@ -1602,14 +1602,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1643,15 +1643,15 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.batchUIDToMeasuresMap.size).toBe(2); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "Example", "duration": 10, "timestamp": 20, @@ -1661,14 +1661,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Example", "lanes": "0b0000000000000000000000000000010", "timestamp": 20, @@ -1711,15 +1711,15 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.batchUIDToMeasuresMap.size).toBe(2); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "Example", "duration": 10, "timestamp": 20, @@ -1729,14 +1729,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1780,15 +1780,15 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.batchUIDToMeasuresMap.size).toBe(2); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "Example", "duration": 10, "timestamp": 20, @@ -1798,14 +1798,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Example", "lanes": "0b0000000000000000000000000100000", "timestamp": 20, @@ -1835,22 +1835,22 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.batchUIDToMeasuresMap.size).toBe(2); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "Example", "duration": 1, "timestamp": 20, "type": "layout-effect-mount", "warning": null, }, - Object { + { "componentName": "Example", "duration": 10, "timestamp": 21, @@ -1860,14 +1860,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1898,22 +1898,22 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.batchUIDToMeasuresMap.size).toBe(2); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "Example", "duration": 1, "timestamp": 20, "type": "passive-effect-mount", "warning": null, }, - Object { + { "componentName": "Example", "duration": 10, "timestamp": 21, @@ -1923,14 +1923,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -1961,8 +1961,8 @@ describe('Timeline profiler', () => { // Render phase updates should be retried as part of the same batch. expect(timelineData.batchUIDToMeasuresMap.size).toBe(1); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "Example", "duration": 20, "timestamp": 10, @@ -1972,14 +1972,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Example", "componentStack": " in Example (at **)", @@ -2031,22 +2031,22 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "ErrorBoundary", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "ExampleThatThrows", "duration": 0, "timestamp": 20, "type": "render", "warning": null, }, - Object { + { "componentName": "ErrorBoundary", "duration": 10, "timestamp": 20, @@ -2056,14 +2056,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000000010", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "ErrorBoundary", "componentStack": " in ErrorBoundary (at **)", @@ -2075,8 +2075,8 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.thrownErrors).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "ExampleThatThrows", "message": "Expected error", "phase": "mount", @@ -2130,36 +2130,36 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "ErrorBoundary", "duration": 10, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "ExampleThatThrows", "duration": 0, "timestamp": 20, "type": "render", "warning": null, }, - Object { + { "componentName": "ErrorBoundary", "duration": 10, "timestamp": 20, "type": "render", "warning": null, }, - Object { + { "componentName": "ExampleThatThrows", "duration": 0, "timestamp": 30, "type": "render", "warning": null, }, - Object { + { "componentName": "ErrorBoundary", "duration": 10, "timestamp": 30, @@ -2169,14 +2169,14 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "ErrorBoundary", "componentStack": " in ErrorBoundary (at **)", @@ -2188,15 +2188,15 @@ describe('Timeline profiler', () => { ] `); expect(timelineData.thrownErrors).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "ExampleThatThrows", "message": "Expected error", "phase": "mount", "timestamp": 20, "type": "thrown-error", }, - Object { + { "componentName": "ExampleThatThrows", "message": "Expected error", "phase": "mount", @@ -2274,78 +2274,78 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.componentMeasures).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "layout-effect-mount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "layout-effect-mount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "passive-effect-mount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "passive-effect-mount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "passive-effect-mount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "layout-effect-unmount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "layout-effect-unmount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "passive-effect-unmount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, "type": "passive-effect-unmount", "warning": null, }, - Object { + { "componentName": "ComponentWithEffects", "duration": 0, "timestamp": 10, @@ -2356,8 +2356,8 @@ describe('Timeline profiler', () => { `); expect(timelineData.batchUIDToMeasuresMap).toMatchInlineSnapshot(` Map { - 1 => Array [ - Object { + 1 => [ + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2365,7 +2365,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2373,7 +2373,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2381,7 +2381,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 1, "depth": 1, "duration": 0, @@ -2389,7 +2389,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "layout-effects", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2398,8 +2398,8 @@ describe('Timeline profiler', () => { "type": "passive-effects", }, ], - 2 => Array [ - Object { + 2 => [ + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2407,7 +2407,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2415,7 +2415,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2423,7 +2423,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 2, "depth": 1, "duration": 0, @@ -2431,7 +2431,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "layout-effects", }, - Object { + { "batchUID": 2, "depth": 1, "duration": 0, @@ -2469,14 +2469,14 @@ describe('Timeline profiler', () => { const timelineData = stopProfilingAndGetTimelineData(); expect(timelineData.schedulingEvents).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "Child", "componentStack": " in Child (at **) diff --git a/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js b/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js index 39c515d985ec1..3a5a82bf287bc 100644 --- a/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js +++ b/packages/react-devtools-shared/src/__tests__/inspectedElement-test.js @@ -186,12 +186,12 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement).toMatchInlineSnapshot(` - Object { + { "context": null, "events": undefined, - "hooks": Array [ - Object { - "hookSource": Object { + "hooks": [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "Example", @@ -200,13 +200,13 @@ describe('InspectedElement', () => { "id": 0, "isStateEditable": true, "name": "State", - "subHooks": Array [], + "subHooks": [], "value": 1, }, ], "id": 2, "owners": null, - "props": Object { + "props": { "a": 1, "b": "abc", }, @@ -330,7 +330,7 @@ describe('InspectedElement', () => { let inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "a": 1, "b": "abc", } @@ -353,7 +353,7 @@ describe('InspectedElement', () => { inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "a": 2, "b": "def", } @@ -386,7 +386,7 @@ describe('InspectedElement', () => { let inspectedElement = await inspectElementAtIndex(1); expect(targetRenderCount).toBe(1); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "a": 1, "b": "abc", } @@ -416,7 +416,7 @@ describe('InspectedElement', () => { inspectedElement = await inspectElementAtIndex(1); expect(targetRenderCount).toBe(2); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "a": 2, "b": "def", } @@ -450,7 +450,7 @@ describe('InspectedElement', () => { let inspectedElement = await inspectElementAtIndex(1); expect(targetRenderCount).toBe(1); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "a": 1, "b": "abc", } @@ -557,7 +557,7 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "boolean_false": false, "boolean_true": true, "float": 1.23, @@ -657,7 +657,7 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "anonymous_fn": Dehydrated { "preview_short": ƒ () {}, "preview_long": ƒ () {}, @@ -666,7 +666,7 @@ describe('InspectedElement', () => { "preview_short": ArrayBuffer(3), "preview_long": ArrayBuffer(3), }, - "array_of_arrays": Array [ + "array_of_arrays": [ Dehydrated { "preview_short": Array(2), "preview_long": [Array(3), Array(0)], @@ -696,7 +696,7 @@ describe('InspectedElement', () => { "preview_short":
, "preview_long":
, }, - "immutable": Object { + "immutable": { "0": Dehydrated { "preview_short": Array(2), "preview_long": ["a", List(3)], @@ -710,7 +710,7 @@ describe('InspectedElement', () => { "preview_long": ["c", Map(2)], }, }, - "map": Object { + "map": { "0": Dehydrated { "preview_short": Array(2), "preview_long": ["name", "Brian"], @@ -720,7 +720,7 @@ describe('InspectedElement', () => { "preview_long": ["food", "sushi"], }, }, - "map_of_maps": Object { + "map_of_maps": { "0": Dehydrated { "preview_short": Array(2), "preview_long": ["first", Map(2)], @@ -730,13 +730,13 @@ describe('InspectedElement', () => { "preview_long": ["second", Map(2)], }, }, - "object_of_objects": Object { + "object_of_objects": { "inner": Dehydrated { "preview_short": {…}, "preview_long": {boolean: true, number: 123, string: "abc"}, }, }, - "object_with_symbol": Object { + "object_with_symbol": { "Symbol(name)": "hello", }, "proxy": Dehydrated { @@ -751,11 +751,11 @@ describe('InspectedElement', () => { "preview_short": /abc/giu, "preview_long": /abc/giu, }, - "set": Object { + "set": { "0": "abc", "1": 123, }, - "set_of_sets": Object { + "set_of_sets": { "0": Dehydrated { "preview_short": Set(3), "preview_long": Set(3) {"a", "b", "c"}, @@ -769,7 +769,7 @@ describe('InspectedElement', () => { "preview_short": Symbol(symbol), "preview_long": Symbol(symbol), }, - "typed_array": Object { + "typed_array": { "0": 100, "1": -100, "2": 0, @@ -794,7 +794,7 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "prop": Dehydrated { "preview_short": Generator, "preview_long": Generator, @@ -818,8 +818,8 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "object": Object { + { + "object": { "boolean": true, "number": 123, "string": "abc", @@ -844,8 +844,8 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "object": Object { + { + "object": { "hasOwnProperty": true, "name": "blah", }, @@ -880,8 +880,8 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "data": Object { + { + "data": { "_number": 42, "number": 42, }, @@ -959,8 +959,8 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "object": Object { + { + "object": { "123": 3, "Symbol(enumerableSymbol)": 3, "Symbol(enumerableSymbolBase)": 1, @@ -1014,8 +1014,8 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "data": Object { + { + "data": { "a": undefined, "b": Infinity, "c": NaN, @@ -1080,8 +1080,8 @@ describe('InspectedElement', () => { } expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { + { + "nestedObject": { "a": Dehydrated { "preview_short": {…}, "preview_long": {b: {…}}, @@ -1093,10 +1093,10 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'a']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "c": Dehydrated { "preview_short": Array(1), "preview_long": [{…}], @@ -1110,12 +1110,12 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'a', 'b', 'c']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { - "c": Array [ - Object { + { + "nestedObject": { + "a": { + "b": { + "c": [ + { "d": Dehydrated { "preview_short": {…}, "preview_long": {e: {…}}, @@ -1131,14 +1131,14 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'a', 'b', 'c', 0, 'd']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { - "c": Array [ - Object { - "d": Object { - "e": Object {}, + { + "nestedObject": { + "a": { + "b": { + "c": [ + { + "d": { + "e": {}, }, }, ], @@ -1151,9 +1151,9 @@ describe('InspectedElement', () => { await loadPath(['hooks', 0, 'value']); expect(inspectedElement.hooks).toMatchInlineSnapshot(` - Array [ - Object { - "hookSource": Object { + [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "Example", @@ -1162,9 +1162,9 @@ describe('InspectedElement', () => { "id": 0, "isStateEditable": true, "name": "State", - "subHooks": Array [], - "value": Object { - "foo": Object { + "subHooks": [], + "value": { + "foo": { "bar": Dehydrated { "preview_short": {…}, "preview_long": {baz: "hi"}, @@ -1178,9 +1178,9 @@ describe('InspectedElement', () => { await loadPath(['hooks', 0, 'value', 'foo', 'bar']); expect(inspectedElement.hooks).toMatchInlineSnapshot(` - Array [ - Object { - "hookSource": Object { + [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "Example", @@ -1189,10 +1189,10 @@ describe('InspectedElement', () => { "id": 0, "isStateEditable": true, "name": "State", - "subHooks": Array [], - "value": Object { - "foo": Object { - "bar": Object { + "subHooks": [], + "value": { + "foo": { + "bar": { "baz": "hi", }, }, @@ -1235,8 +1235,8 @@ describe('InspectedElement', () => { } expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "set_of_sets": Object { + { + "set_of_sets": { "0": Dehydrated { "preview_short": Set(3), "preview_long": Set(3) {1, 2, 3}, @@ -1252,9 +1252,9 @@ describe('InspectedElement', () => { await loadPath(['props', 'set_of_sets', 0]); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "set_of_sets": Object { - "0": Object { + { + "set_of_sets": { + "0": { "0": 1, "1": 2, "2": 3, @@ -1317,8 +1317,8 @@ describe('InspectedElement', () => { } expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { + { + "nestedObject": { "a": Dehydrated { "preview_short": {…}, "preview_long": {b: {…}, value: 1}, @@ -1334,10 +1334,10 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'a']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "value": 1, }, "value": 1, @@ -1353,16 +1353,16 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'c']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "value": 1, }, "value": 1, }, - "c": Object { - "d": Object { + "c": { + "d": { "e": Dehydrated { "preview_short": {…}, "preview_long": {value: 1}, @@ -1408,16 +1408,16 @@ describe('InspectedElement', () => { inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "value": 2, }, "value": 2, }, - "c": Object { - "d": Object { + "c": { + "d": { "e": Dehydrated { "preview_short": {…}, "preview_long": {value: 2}, @@ -1480,8 +1480,8 @@ describe('InspectedElement', () => { } expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { + { + "nestedObject": { "a": Dehydrated { "preview_short": {…}, "preview_long": {b: {…}, value: 1}, @@ -1497,10 +1497,10 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'a']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "value": 1, }, "value": 1, @@ -1543,16 +1543,16 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'c']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "value": 2, }, "value": 2, }, - "c": Object { - "d": Object { + "c": { + "d": { "e": Dehydrated { "preview_short": {…}, "preview_long": {value: 2}, @@ -1607,8 +1607,8 @@ describe('InspectedElement', () => { } expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { + { + "nestedObject": { "a": Dehydrated { "preview_short": {…}, "preview_long": {b: {…}, value: 1}, @@ -1638,10 +1638,10 @@ describe('InspectedElement', () => { await loadPath(['props', 'nestedObject', 'a']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "value": 2, }, "value": 2, @@ -1666,12 +1666,12 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement).toMatchInlineSnapshot(` - Object { + { "context": null, "events": undefined, - "hooks": Array [ - Object { - "hookSource": Object { + "hooks": [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "Example", @@ -1680,13 +1680,13 @@ describe('InspectedElement', () => { "id": null, "isStateEditable": false, "name": "Context", - "subHooks": Array [], + "subHooks": [], "value": true, }, ], "id": 2, "owners": null, - "props": Object { + "props": { "a": 1, "b": "abc", }, @@ -1930,9 +1930,9 @@ describe('InspectedElement', () => { const {hooks} = await inspectElementAtIndex(0); expect(hooks).toMatchInlineSnapshot(` - Array [ - Object { - "hookSource": Object { + [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "DisplayedComplexValue", @@ -1941,9 +1941,9 @@ describe('InspectedElement', () => { "id": null, "isStateEditable": false, "name": "DebuggableHook", - "subHooks": Array [ - Object { - "hookSource": Object { + "subHooks": [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "useDebuggableHook", @@ -1952,11 +1952,11 @@ describe('InspectedElement', () => { "id": 0, "isStateEditable": true, "name": "State", - "subHooks": Array [], + "subHooks": [], "value": 1, }, ], - "value": Object { + "value": { "foo": 2, }, }, @@ -1985,8 +1985,8 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "proxy": Object { + { + "proxy": { "$$typeof": Dehydrated { "preview_short": ƒ () {}, "preview_long": ƒ () {}, @@ -2014,13 +2014,13 @@ describe('InspectedElement', () => { // Select/inspect element let inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement).toMatchInlineSnapshot(` - Object { + { "context": null, "events": undefined, "hooks": null, "id": 2, "owners": null, - "props": Object {}, + "props": {}, "rootType": "render()", "state": null, } @@ -2052,13 +2052,13 @@ describe('InspectedElement', () => { // Select/inspect the same element again inspectedElement = await inspectElementAtIndex(0); expect(inspectedElement).toMatchInlineSnapshot(` - Object { + { "context": null, "events": undefined, "hooks": null, "id": 2, "owners": null, - "props": Object {}, + "props": {}, "rootType": "render()", "state": null, } @@ -2166,10 +2166,10 @@ describe('InspectedElement', () => { await inspectElementAtIndex(0); expect(global.$r).toMatchInlineSnapshot(` - Object { - "hooks": Array [ - Object { - "hookSource": Object { + { + "hooks": [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "Example", @@ -2178,11 +2178,11 @@ describe('InspectedElement', () => { "id": 0, "isStateEditable": true, "name": "State", - "subHooks": Array [], + "subHooks": [], "value": 1, }, ], - "props": Object { + "props": { "a": 1, "b": "abc", }, @@ -2205,10 +2205,10 @@ describe('InspectedElement', () => { await inspectElementAtIndex(0); expect(global.$r).toMatchInlineSnapshot(` - Object { - "hooks": Array [ - Object { - "hookSource": Object { + { + "hooks": [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "Example", @@ -2217,11 +2217,11 @@ describe('InspectedElement', () => { "id": 0, "isStateEditable": true, "name": "State", - "subHooks": Array [], + "subHooks": [], "value": 1, }, ], - "props": Object { + "props": { "a": 1, "b": "abc", }, @@ -2244,10 +2244,10 @@ describe('InspectedElement', () => { await inspectElementAtIndex(0); expect(global.$r).toMatchInlineSnapshot(` - Object { - "hooks": Array [ - Object { - "hookSource": Object { + { + "hooks": [ + { + "hookSource": { "columnNumber": "removed by Jest serializer", "fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js", "functionName": "Example", @@ -2256,11 +2256,11 @@ describe('InspectedElement', () => { "id": 0, "isStateEditable": true, "name": "State", - "subHooks": Array [], + "subHooks": [], "value": 1, }, ], - "props": Object { + "props": { "a": 1, "b": "abc", }, @@ -2287,13 +2287,13 @@ describe('InspectedElement', () => { await inspectElementAtIndex(0); expect(global.$r.props).toMatchInlineSnapshot(` - Object { + { "a": 1, "b": "abc", } `); expect(global.$r.state).toMatchInlineSnapshot(` - Object { + { "count": 0, } `); @@ -2354,15 +2354,15 @@ describe('InspectedElement', () => { const data = await getErrorsAndWarningsForElementAtIndex(0); expect(data).toMatchInlineSnapshot(` - Object { - "errors": Array [ - Array [ + { + "errors": [ + [ "test-only: render error", 1, ], ], - "warnings": Array [ - Array [ + "warnings": [ + [ "test-only: render warning", 1, ], @@ -2389,15 +2389,15 @@ describe('InspectedElement', () => { }); const data = await getErrorsAndWarningsForElementAtIndex(0); expect(data).toMatchInlineSnapshot(` - Object { - "errors": Array [ - Array [ + { + "errors": [ + [ "test-only: render error", 2, ], ], - "warnings": Array [ - Array [ + "warnings": [ + [ "test-only: render warning", 3, ], @@ -2426,15 +2426,15 @@ describe('InspectedElement', () => { const data = await getErrorsAndWarningsForElementAtIndex(0); expect(data).toMatchInlineSnapshot(` - Object { - "errors": Array [ - Array [ + { + "errors": [ + [ "test-only: useLayoutEffect error", 1, ], ], - "warnings": Array [ - Array [ + "warnings": [ + [ "test-only: useLayoutEffect warning", 1, ], @@ -2463,15 +2463,15 @@ describe('InspectedElement', () => { const data = await getErrorsAndWarningsForElementAtIndex(0); expect(data).toMatchInlineSnapshot(` - Object { - "errors": Array [ - Array [ + { + "errors": [ + [ "test-only: useEffect error", 1, ], ], - "warnings": Array [ - Array [ + "warnings": [ + [ "test-only: useEffect warning", 1, ], @@ -2497,15 +2497,15 @@ describe('InspectedElement', () => { const data = await getErrorsAndWarningsForElementAtIndex(0); expect(data).toMatchInlineSnapshot(` - Object { - "errors": Array [ - Array [ + { + "errors": [ + [ "Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information. at Example", 1, ], ], - "warnings": Array [], + "warnings": [], } `); }); @@ -2534,9 +2534,9 @@ describe('InspectedElement', () => { const data = await getErrorsAndWarningsForElementAtIndex(0); expect(data).toMatchInlineSnapshot(` - Object { - "errors": Array [], - "warnings": Array [], + { + "errors": [], + "warnings": [], } `); }); @@ -2577,29 +2577,29 @@ describe('InspectedElement', () => { await getErrorsAndWarningsForElementAtIndex(1), ]; expect(data).toMatchInlineSnapshot(` - Array [ - Object { - "errors": Array [ - Array [ + [ + { + "errors": [ + [ "test-only: render error #1", 1, ], ], - "warnings": Array [ - Array [ + "warnings": [ + [ "test-only: render warning #1", 1, ], ], }, - Object { - "errors": Array [ - Array [ + { + "errors": [ + [ "test-only: render error #2", 1, ], ], - "warnings": Array [], + "warnings": [], }, ] `); @@ -2615,24 +2615,24 @@ describe('InspectedElement', () => { await getErrorsAndWarningsForElementAtIndex(1), ]; expect(data).toMatchInlineSnapshot(` - Array [ - Object { - "errors": Array [ - Array [ + [ + { + "errors": [ + [ "test-only: render error #1", 1, ], ], - "warnings": Array [], + "warnings": [], }, - Object { - "errors": Array [ - Array [ + { + "errors": [ + [ "test-only: render error #2", 1, ], ], - "warnings": Array [], + "warnings": [], }, ] `); @@ -2674,25 +2674,25 @@ describe('InspectedElement', () => { await getErrorsAndWarningsForElementAtIndex(1), ]; expect(data).toMatchInlineSnapshot(` - Array [ - Object { - "errors": Array [ - Array [ + [ + { + "errors": [ + [ "test-only: render error #1", 1, ], ], - "warnings": Array [ - Array [ + "warnings": [ + [ "test-only: render warning #1", 1, ], ], }, - Object { - "errors": Array [], - "warnings": Array [ - Array [ + { + "errors": [], + "warnings": [ + [ "test-only: render warning #2", 1, ], @@ -2712,20 +2712,20 @@ describe('InspectedElement', () => { await getErrorsAndWarningsForElementAtIndex(1), ]; expect(data).toMatchInlineSnapshot(` - Array [ - Object { - "errors": Array [], - "warnings": Array [ - Array [ + [ + { + "errors": [], + "warnings": [ + [ "test-only: render warning #1", 1, ], ], }, - Object { - "errors": Array [], - "warnings": Array [ - Array [ + { + "errors": [], + "warnings": [ + [ "test-only: render warning #2", 1, ], @@ -2773,15 +2773,15 @@ describe('InspectedElement', () => { const inspectedElement = await inspectElementAtIndex(4); expect(inspectedElement.owners).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "displayName": "Child", "hocDisplayNames": null, "id": 3, "key": null, "type": 5, }, - Object { + { "displayName": "App", "hocDisplayNames": null, "id": 2, diff --git a/packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js b/packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js index b89fab7c1e8c4..c6f748a30ed85 100644 --- a/packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js +++ b/packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js @@ -74,13 +74,13 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement).toMatchInlineSnapshot(` - Object { - "context": Object {}, + { + "context": {}, "events": undefined, "hooks": null, "id": 2, "owners": null, - "props": Object { + "props": { "a": 1, "b": "abc", }, @@ -117,13 +117,13 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement).toMatchInlineSnapshot(` - Object { - "context": Object {}, + { + "context": {}, "events": undefined, "hooks": null, "id": 2, "owners": null, - "props": Object { + "props": { "boolean_false": false, "boolean_true": true, "float": 1.23, @@ -213,7 +213,7 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { + { "anonymous_fn": Dehydrated { "preview_short": ƒ () {}, "preview_long": ƒ () {}, @@ -222,7 +222,7 @@ describe('InspectedElementContext', () => { "preview_short": ArrayBuffer(3), "preview_long": ArrayBuffer(3), }, - "array_of_arrays": Array [ + "array_of_arrays": [ Dehydrated { "preview_short": Array(2), "preview_long": [Array(3), Array(0)], @@ -252,7 +252,7 @@ describe('InspectedElementContext', () => { "preview_short":
, "preview_long":
, }, - "immutable": Object { + "immutable": { "0": Dehydrated { "preview_short": Array(2), "preview_long": ["a", List(3)], @@ -266,7 +266,7 @@ describe('InspectedElementContext', () => { "preview_long": ["c", Map(2)], }, }, - "map": Object { + "map": { "0": Dehydrated { "preview_short": Array(2), "preview_long": ["name", "Brian"], @@ -276,7 +276,7 @@ describe('InspectedElementContext', () => { "preview_long": ["food", "sushi"], }, }, - "map_of_maps": Object { + "map_of_maps": { "0": Dehydrated { "preview_short": Array(2), "preview_long": ["first", Map(2)], @@ -286,7 +286,7 @@ describe('InspectedElementContext', () => { "preview_long": ["second", Map(2)], }, }, - "object_of_objects": Object { + "object_of_objects": { "inner": Dehydrated { "preview_short": {…}, "preview_long": {boolean: true, number: 123, string: "abc"}, @@ -300,11 +300,11 @@ describe('InspectedElementContext', () => { "preview_short": /abc/giu, "preview_long": /abc/giu, }, - "set": Object { + "set": { "0": "abc", "1": 123, }, - "set_of_sets": Object { + "set_of_sets": { "0": Dehydrated { "preview_short": Set(3), "preview_long": Set(3) {"a", "b", "c"}, @@ -318,7 +318,7 @@ describe('InspectedElementContext', () => { "preview_short": Symbol(symbol), "preview_long": Symbol(symbol), }, - "typed_array": Object { + "typed_array": { "0": 100, "1": -100, "2": 0, @@ -347,8 +347,8 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "object": Object { + { + "object": { "boolean": true, "number": 123, "string": "abc", @@ -404,13 +404,13 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement).toMatchInlineSnapshot(` - Object { - "context": Object {}, + { + "context": {}, "events": undefined, "hooks": null, "id": 2, "owners": null, - "props": Object { + "props": { "iteratable": Dehydrated { "preview_short": Generator, "preview_long": Generator, @@ -459,14 +459,14 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement).toMatchInlineSnapshot(` - Object { - "context": Object {}, + { + "context": {}, "events": undefined, "hooks": null, "id": 2, "owners": null, - "props": Object { - "data": Object { + "props": { + "data": { "_number": 42, "number": 42, }, @@ -549,14 +549,14 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement).toMatchInlineSnapshot(` - Object { - "context": Object {}, + { + "context": {}, "events": undefined, "hooks": null, "id": 2, "owners": null, - "props": Object { - "data": Object { + "props": { + "data": { "123": 3, "Symbol(enumerableSymbol)": 3, "Symbol(enumerableSymbolBase)": 1, @@ -619,8 +619,8 @@ describe('InspectedElementContext', () => { const inspectedElement = await read(id); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "data": Object { + { + "data": { "a": undefined, "b": Infinity, "c": NaN, @@ -659,8 +659,8 @@ describe('InspectedElementContext', () => { let inspectedElement = await read(id); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { + { + "nestedObject": { "a": Dehydrated { "preview_short": {…}, "preview_long": {b: {…}}, @@ -671,10 +671,10 @@ describe('InspectedElementContext', () => { inspectedElement = await read(id, ['props', 'nestedObject', 'a']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { + { + "nestedObject": { + "a": { + "b": { "c": Dehydrated { "preview_short": Array(1), "preview_long": [{…}], @@ -687,12 +687,12 @@ describe('InspectedElementContext', () => { inspectedElement = await read(id, ['props', 'nestedObject', 'a', 'b', 'c']); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { - "c": Array [ - Object { + { + "nestedObject": { + "a": { + "b": { + "c": [ + { "d": Dehydrated { "preview_short": {…}, "preview_long": {e: {…}}, @@ -715,14 +715,14 @@ describe('InspectedElementContext', () => { 'd', ]); expect(inspectedElement.props).toMatchInlineSnapshot(` - Object { - "nestedObject": Object { - "a": Object { - "b": Object { - "c": Array [ - Object { - "d": Object { - "e": Object {}, + { + "nestedObject": { + "a": { + "b": { + "c": [ + { + "d": { + "e": {}, }, }, ], diff --git a/packages/react-devtools-shared/src/__tests__/ownersListContext-test.js b/packages/react-devtools-shared/src/__tests__/ownersListContext-test.js index dfdea1c21a1f1..0da44023c02da 100644 --- a/packages/react-devtools-shared/src/__tests__/ownersListContext-test.js +++ b/packages/react-devtools-shared/src/__tests__/ownersListContext-test.js @@ -114,14 +114,14 @@ describe('OwnersListContext', () => { const firstChild = ((store.getElementAtIndex(2): any): Element); expect(await getOwnersListForOwner(parent)).toMatchInlineSnapshot(` - Array [ + [ "Grandparent", "Parent", ] `); expect(await getOwnersListForOwner(firstChild)).toMatchInlineSnapshot(` - Array [ + [ "Grandparent", "Parent", "Child", @@ -157,7 +157,7 @@ describe('OwnersListContext', () => { const firstChild = ((store.getElementAtIndex(1): any): Element); expect(await getOwnersListForOwner(firstChild)).toMatchInlineSnapshot(` - Array [ + [ "Grandparent", "Parent", "Child", @@ -183,7 +183,7 @@ describe('OwnersListContext', () => { const grandparent = ((store.getElementAtIndex(0): any): Element); expect(await getOwnersListForOwner(grandparent)).toMatchInlineSnapshot(` - Array [ + [ "Grandparent", ] `); @@ -212,7 +212,7 @@ describe('OwnersListContext', () => { const wrapped = ((store.getElementAtIndex(2): any): Element); expect(await getOwnersListForOwner(wrapped)).toMatchInlineSnapshot(` - Array [ + [ "Grandparent", "InnerComponent", "InnerComponent", diff --git a/packages/react-devtools-shared/src/__tests__/preprocessData-test.js b/packages/react-devtools-shared/src/__tests__/preprocessData-test.js index 282b33eba59ed..ff4964927c69d 100644 --- a/packages/react-devtools-shared/src/__tests__/preprocessData-test.js +++ b/packages/react-devtools-shared/src/__tests__/preprocessData-test.js @@ -322,11 +322,11 @@ describe('Timeline profiler', () => { randomSample, ]); expect(data).toMatchInlineSnapshot(` - Object { + { "batchUIDToMeasuresMap": Map {}, - "componentMeasures": Array [], + "componentMeasures": [], "duration": 0.005, - "flamechart": Array [], + "flamechart": [], "internalModuleSourceToRanges": Map {}, "laneToLabelMap": Map { 0 => "Sync", @@ -362,48 +362,48 @@ describe('Timeline profiler', () => { 30 => "Offscreen", }, "laneToReactMeasureMap": Map { - 0 => Array [], - 1 => Array [], - 2 => Array [], - 3 => Array [], - 4 => Array [], - 5 => Array [], - 6 => Array [], - 7 => Array [], - 8 => Array [], - 9 => Array [], - 10 => Array [], - 11 => Array [], - 12 => Array [], - 13 => Array [], - 14 => Array [], - 15 => Array [], - 16 => Array [], - 17 => Array [], - 18 => Array [], - 19 => Array [], - 20 => Array [], - 21 => Array [], - 22 => Array [], - 23 => Array [], - 24 => Array [], - 25 => Array [], - 26 => Array [], - 27 => Array [], - 28 => Array [], - 29 => Array [], - 30 => Array [], + 0 => [], + 1 => [], + 2 => [], + 3 => [], + 4 => [], + 5 => [], + 6 => [], + 7 => [], + 8 => [], + 9 => [], + 10 => [], + 11 => [], + 12 => [], + 13 => [], + 14 => [], + 15 => [], + 16 => [], + 17 => [], + 18 => [], + 19 => [], + 20 => [], + 21 => [], + 22 => [], + 23 => [], + 24 => [], + 25 => [], + 26 => [], + 27 => [], + 28 => [], + 29 => [], + 30 => [], }, - "nativeEvents": Array [], - "networkMeasures": Array [], - "otherUserTimingMarks": Array [], + "nativeEvents": [], + "networkMeasures": [], + "otherUserTimingMarks": [], "reactVersion": "", - "schedulingEvents": Array [], + "schedulingEvents": [], "snapshotHeight": 0, - "snapshots": Array [], + "snapshots": [], "startTime": 1, - "suspenseEvents": Array [], - "thrownErrors": Array [], + "suspenseEvents": [], + "thrownErrors": [], } `); }); @@ -447,10 +447,10 @@ describe('Timeline profiler', () => { }), ]); expect(data).toMatchInlineSnapshot(` - Object { + { "batchUIDToMeasuresMap": Map { - 0 => Array [ - Object { + 0 => [ + { "batchUID": 0, "depth": 0, "duration": 0.005, @@ -458,7 +458,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render-idle", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.001, @@ -466,7 +466,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.003, @@ -474,7 +474,7 @@ describe('Timeline profiler', () => { "timestamp": 0.008, "type": "commit", }, - Object { + { "batchUID": 0, "depth": 1, "duration": 0.001, @@ -484,9 +484,9 @@ describe('Timeline profiler', () => { }, ], }, - "componentMeasures": Array [], + "componentMeasures": [], "duration": 0.011, - "flamechart": Array [], + "flamechart": [], "internalModuleSourceToRanges": Map {}, "laneToLabelMap": Map { 0 => "Sync", @@ -522,17 +522,17 @@ describe('Timeline profiler', () => { 30 => "Offscreen", }, "laneToReactMeasureMap": Map { - 0 => Array [], - 1 => Array [], - 2 => Array [], - 3 => Array [], - 4 => Array [], - 5 => Array [], - 6 => Array [], - 7 => Array [], - 8 => Array [], - 9 => Array [ - Object { + 0 => [], + 1 => [], + 2 => [], + 3 => [], + 4 => [], + 5 => [], + 6 => [], + 7 => [], + 8 => [], + 9 => [ + { "batchUID": 0, "depth": 0, "duration": 0.005, @@ -540,7 +540,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render-idle", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.001, @@ -548,7 +548,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.003, @@ -556,7 +556,7 @@ describe('Timeline profiler', () => { "timestamp": 0.008, "type": "commit", }, - Object { + { "batchUID": 0, "depth": 1, "duration": 0.001, @@ -565,34 +565,34 @@ describe('Timeline profiler', () => { "type": "layout-effects", }, ], - 10 => Array [], - 11 => Array [], - 12 => Array [], - 13 => Array [], - 14 => Array [], - 15 => Array [], - 16 => Array [], - 17 => Array [], - 18 => Array [], - 19 => Array [], - 20 => Array [], - 21 => Array [], - 22 => Array [], - 23 => Array [], - 24 => Array [], - 25 => Array [], - 26 => Array [], - 27 => Array [], - 28 => Array [], - 29 => Array [], - 30 => Array [], + 10 => [], + 11 => [], + 12 => [], + 13 => [], + 14 => [], + 15 => [], + 16 => [], + 17 => [], + 18 => [], + 19 => [], + 20 => [], + 21 => [], + 22 => [], + 23 => [], + 24 => [], + 25 => [], + 26 => [], + 27 => [], + 28 => [], + 29 => [], + 30 => [], }, - "nativeEvents": Array [], - "networkMeasures": Array [], - "otherUserTimingMarks": Array [], + "nativeEvents": [], + "networkMeasures": [], + "otherUserTimingMarks": [], "reactVersion": "", - "schedulingEvents": Array [ - Object { + "schedulingEvents": [ + { "lanes": "0b0000000000000000000000000001001", "timestamp": 0.005, "type": "schedule-render", @@ -600,10 +600,10 @@ describe('Timeline profiler', () => { }, ], "snapshotHeight": 0, - "snapshots": Array [], + "snapshots": [], "startTime": 1, - "suspenseEvents": Array [], - "thrownErrors": Array [], + "suspenseEvents": [], + "thrownErrors": [], } `); }); @@ -616,10 +616,10 @@ describe('Timeline profiler', () => { ...createUserTimingData(clearedMarks), ]); expect(data).toMatchInlineSnapshot(` - Object { + { "batchUIDToMeasuresMap": Map { - 0 => Array [ - Object { + 0 => [ + { "batchUID": 0, "depth": 0, "duration": 0.01, @@ -627,7 +627,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render-idle", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.001, @@ -635,7 +635,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.008, @@ -643,7 +643,7 @@ describe('Timeline profiler', () => { "timestamp": 0.008, "type": "commit", }, - Object { + { "batchUID": 0, "depth": 1, "duration": 0.001, @@ -653,19 +653,19 @@ describe('Timeline profiler', () => { }, ], }, - "componentMeasures": Array [], + "componentMeasures": [], "duration": 0.016, - "flamechart": Array [], + "flamechart": [], "internalModuleSourceToRanges": Map { - undefined => Array [ - Array [ - Object { + undefined => [ + [ + { "columnNumber": 0, "functionName": "filtered", "lineNumber": 0, "source": " at filtered (:0:0)", }, - Object { + { "columnNumber": 1, "functionName": "filtered", "lineNumber": 1, @@ -708,9 +708,9 @@ describe('Timeline profiler', () => { 30 => "Offscreen", }, "laneToReactMeasureMap": Map { - 0 => Array [], - 1 => Array [ - Object { + 0 => [], + 1 => [ + { "batchUID": 0, "depth": 0, "duration": 0.01, @@ -718,7 +718,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render-idle", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.001, @@ -726,7 +726,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.008, @@ -734,7 +734,7 @@ describe('Timeline profiler', () => { "timestamp": 0.008, "type": "commit", }, - Object { + { "batchUID": 0, "depth": 1, "duration": 0.001, @@ -743,42 +743,42 @@ describe('Timeline profiler', () => { "type": "layout-effects", }, ], - 2 => Array [], - 3 => Array [], - 4 => Array [], - 5 => Array [], - 6 => Array [], - 7 => Array [], - 8 => Array [], - 9 => Array [], - 10 => Array [], - 11 => Array [], - 12 => Array [], - 13 => Array [], - 14 => Array [], - 15 => Array [], - 16 => Array [], - 17 => Array [], - 18 => Array [], - 19 => Array [], - 20 => Array [], - 21 => Array [], - 22 => Array [], - 23 => Array [], - 24 => Array [], - 25 => Array [], - 26 => Array [], - 27 => Array [], - 28 => Array [], - 29 => Array [], - 30 => Array [], + 2 => [], + 3 => [], + 4 => [], + 5 => [], + 6 => [], + 7 => [], + 8 => [], + 9 => [], + 10 => [], + 11 => [], + 12 => [], + 13 => [], + 14 => [], + 15 => [], + 16 => [], + 17 => [], + 18 => [], + 19 => [], + 20 => [], + 21 => [], + 22 => [], + 23 => [], + 24 => [], + 25 => [], + 26 => [], + 27 => [], + 28 => [], + 29 => [], + 30 => [], }, - "nativeEvents": Array [], - "networkMeasures": Array [], - "otherUserTimingMarks": Array [], + "nativeEvents": [], + "networkMeasures": [], + "otherUserTimingMarks": [], "reactVersion": "", - "schedulingEvents": Array [ - Object { + "schedulingEvents": [ + { "lanes": "0b0000000000000000000000000000001", "timestamp": 0.005, "type": "schedule-render", @@ -786,10 +786,10 @@ describe('Timeline profiler', () => { }, ], "snapshotHeight": 0, - "snapshots": Array [], + "snapshots": [], "startTime": 4, - "suspenseEvents": Array [], - "thrownErrors": Array [], + "suspenseEvents": [], + "thrownErrors": [], } `); }); @@ -813,10 +813,10 @@ describe('Timeline profiler', () => { ...createUserTimingData(clearedMarks), ]); expect(data).toMatchInlineSnapshot(` - Object { + { "batchUIDToMeasuresMap": Map { - 0 => Array [ - Object { + 0 => [ + { "batchUID": 0, "depth": 0, "duration": 0.012, @@ -824,7 +824,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render-idle", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.003, @@ -832,7 +832,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.008, @@ -840,7 +840,7 @@ describe('Timeline profiler', () => { "timestamp": 0.01, "type": "commit", }, - Object { + { "batchUID": 0, "depth": 1, "duration": 0.001, @@ -848,7 +848,7 @@ describe('Timeline profiler', () => { "timestamp": 0.016, "type": "layout-effects", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.004, @@ -857,8 +857,8 @@ describe('Timeline profiler', () => { "type": "passive-effects", }, ], - 1 => Array [ - Object { + 1 => [ + { "batchUID": 1, "depth": 0, "duration": 0.012, @@ -866,7 +866,7 @@ describe('Timeline profiler', () => { "timestamp": 0.024, "type": "render-idle", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0.003, @@ -874,7 +874,7 @@ describe('Timeline profiler', () => { "timestamp": 0.024, "type": "render", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0.008, @@ -882,7 +882,7 @@ describe('Timeline profiler', () => { "timestamp": 0.028, "type": "commit", }, - Object { + { "batchUID": 1, "depth": 1, "duration": 0.001, @@ -890,7 +890,7 @@ describe('Timeline profiler', () => { "timestamp": 0.034, "type": "layout-effects", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0.003, @@ -900,29 +900,29 @@ describe('Timeline profiler', () => { }, ], }, - "componentMeasures": Array [ - Object { + "componentMeasures": [ + { "componentName": "App", "duration": 0.001, "timestamp": 0.007, "type": "render", "warning": null, }, - Object { + { "componentName": "App", "duration": 0.002, "timestamp": 0.02, "type": "passive-effect-mount", "warning": null, }, - Object { + { "componentName": "App", "duration": 0.001, "timestamp": 0.025, "type": "render", "warning": null, }, - Object { + { "componentName": "App", "duration": 0.001, "timestamp": 0.038, @@ -931,17 +931,17 @@ describe('Timeline profiler', () => { }, ], "duration": 0.04, - "flamechart": Array [], + "flamechart": [], "internalModuleSourceToRanges": Map { - undefined => Array [ - Array [ - Object { + undefined => [ + [ + { "columnNumber": 0, "functionName": "filtered", "lineNumber": 0, "source": " at filtered (:0:0)", }, - Object { + { "columnNumber": 1, "functionName": "filtered", "lineNumber": 1, @@ -984,13 +984,13 @@ describe('Timeline profiler', () => { 30 => "Offscreen", }, "laneToReactMeasureMap": Map { - 0 => Array [], - 1 => Array [], - 2 => Array [], - 3 => Array [], - 4 => Array [], - 5 => Array [ - Object { + 0 => [], + 1 => [], + 2 => [], + 3 => [], + 4 => [], + 5 => [ + { "batchUID": 0, "depth": 0, "duration": 0.012, @@ -998,7 +998,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render-idle", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.003, @@ -1006,7 +1006,7 @@ describe('Timeline profiler', () => { "timestamp": 0.006, "type": "render", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.008, @@ -1014,7 +1014,7 @@ describe('Timeline profiler', () => { "timestamp": 0.01, "type": "commit", }, - Object { + { "batchUID": 0, "depth": 1, "duration": 0.001, @@ -1022,7 +1022,7 @@ describe('Timeline profiler', () => { "timestamp": 0.016, "type": "layout-effects", }, - Object { + { "batchUID": 0, "depth": 0, "duration": 0.004, @@ -1030,7 +1030,7 @@ describe('Timeline profiler', () => { "timestamp": 0.019, "type": "passive-effects", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0.012, @@ -1038,7 +1038,7 @@ describe('Timeline profiler', () => { "timestamp": 0.024, "type": "render-idle", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0.003, @@ -1046,7 +1046,7 @@ describe('Timeline profiler', () => { "timestamp": 0.024, "type": "render", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0.008, @@ -1054,7 +1054,7 @@ describe('Timeline profiler', () => { "timestamp": 0.028, "type": "commit", }, - Object { + { "batchUID": 1, "depth": 1, "duration": 0.001, @@ -1062,7 +1062,7 @@ describe('Timeline profiler', () => { "timestamp": 0.034, "type": "layout-effects", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0.003, @@ -1071,44 +1071,44 @@ describe('Timeline profiler', () => { "type": "passive-effects", }, ], - 6 => Array [], - 7 => Array [], - 8 => Array [], - 9 => Array [], - 10 => Array [], - 11 => Array [], - 12 => Array [], - 13 => Array [], - 14 => Array [], - 15 => Array [], - 16 => Array [], - 17 => Array [], - 18 => Array [], - 19 => Array [], - 20 => Array [], - 21 => Array [], - 22 => Array [], - 23 => Array [], - 24 => Array [], - 25 => Array [], - 26 => Array [], - 27 => Array [], - 28 => Array [], - 29 => Array [], - 30 => Array [], + 6 => [], + 7 => [], + 8 => [], + 9 => [], + 10 => [], + 11 => [], + 12 => [], + 13 => [], + 14 => [], + 15 => [], + 16 => [], + 17 => [], + 18 => [], + 19 => [], + 20 => [], + 21 => [], + 22 => [], + 23 => [], + 24 => [], + 25 => [], + 26 => [], + 27 => [], + 28 => [], + 29 => [], + 30 => [], }, - "nativeEvents": Array [], - "networkMeasures": Array [], - "otherUserTimingMarks": Array [], + "nativeEvents": [], + "networkMeasures": [], + "otherUserTimingMarks": [], "reactVersion": "", - "schedulingEvents": Array [ - Object { + "schedulingEvents": [ + { "lanes": "0b0000000000000000000000000000101", "timestamp": 0.005, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "App", "lanes": "0b0000000000000000000000000000101", "timestamp": 0.021, @@ -1117,10 +1117,10 @@ describe('Timeline profiler', () => { }, ], "snapshotHeight": 0, - "snapshots": Array [], + "snapshots": [], "startTime": 4, - "suspenseEvents": Array [], - "thrownErrors": Array [], + "suspenseEvents": [], + "thrownErrors": [], } `); }); @@ -1194,16 +1194,16 @@ describe('Timeline profiler', () => { ...userTimingData, ]); expect(data.otherUserTimingMarks).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "name": "VCWithoutImage: root", "timestamp": 0.003, }, - Object { + { "name": "--a-mark-that-looks-like-one-of-ours", "timestamp": 0.004, }, - Object { + { "name": "Some other mark", "timestamp": 0.005, }, @@ -1948,10 +1948,10 @@ describe('Timeline profiler', () => { expect(data).toHaveLength(1); const timelineData = data[0]; expect(timelineData).toMatchInlineSnapshot(` - Object { + { "batchUIDToMeasuresMap": Map { - 1 => Array [ - Object { + 1 => [ + { "batchUID": 1, "depth": 0, "duration": 0, @@ -1959,7 +1959,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -1967,7 +1967,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -1975,7 +1975,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 1, "depth": 1, "duration": 0, @@ -1985,9 +1985,9 @@ describe('Timeline profiler', () => { }, ], }, - "componentMeasures": Array [], + "componentMeasures": [], "duration": 20, - "flamechart": Array [], + "flamechart": [], "internalModuleSourceToRanges": Map {}, "laneToLabelMap": Map { 1 => "SyncHydrationLane", @@ -2023,9 +2023,9 @@ describe('Timeline profiler', () => { 1073741824 => "Offscreen", }, "laneToReactMeasureMap": Map { - 1 => Array [], - 2 => Array [ - Object { + 1 => [], + 2 => [ + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2033,7 +2033,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2041,7 +2041,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2049,7 +2049,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 1, "depth": 1, "duration": 0, @@ -2058,42 +2058,42 @@ describe('Timeline profiler', () => { "type": "layout-effects", }, ], - 4 => Array [], - 8 => Array [], - 16 => Array [], - 32 => Array [], - 64 => Array [], - 128 => Array [], - 256 => Array [], - 512 => Array [], - 1024 => Array [], - 2048 => Array [], - 4096 => Array [], - 8192 => Array [], - 16384 => Array [], - 32768 => Array [], - 65536 => Array [], - 131072 => Array [], - 262144 => Array [], - 524288 => Array [], - 1048576 => Array [], - 2097152 => Array [], - 4194304 => Array [], - 8388608 => Array [], - 16777216 => Array [], - 33554432 => Array [], - 67108864 => Array [], - 134217728 => Array [], - 268435456 => Array [], - 536870912 => Array [], - 1073741824 => Array [], + 4 => [], + 8 => [], + 16 => [], + 32 => [], + 64 => [], + 128 => [], + 256 => [], + 512 => [], + 1024 => [], + 2048 => [], + 4096 => [], + 8192 => [], + 16384 => [], + 32768 => [], + 65536 => [], + 131072 => [], + 262144 => [], + 524288 => [], + 1048576 => [], + 2097152 => [], + 4194304 => [], + 8388608 => [], + 16777216 => [], + 33554432 => [], + 67108864 => [], + 134217728 => [], + 268435456 => [], + 536870912 => [], + 1073741824 => [], }, - "nativeEvents": Array [], - "networkMeasures": Array [], - "otherUserTimingMarks": Array [], + "nativeEvents": [], + "networkMeasures": [], + "otherUserTimingMarks": [], "reactVersion": "", - "schedulingEvents": Array [ - Object { + "schedulingEvents": [ + { "lanes": "0b0000000000000000000000000000010", "timestamp": 10, "type": "schedule-render", @@ -2101,10 +2101,10 @@ describe('Timeline profiler', () => { }, ], "snapshotHeight": 0, - "snapshots": Array [], + "snapshots": [], "startTime": -10, - "suspenseEvents": Array [], - "thrownErrors": Array [], + "suspenseEvents": [], + "thrownErrors": [], } `); }); @@ -2137,10 +2137,10 @@ describe('Timeline profiler', () => { }); expect(timelineData).toMatchInlineSnapshot(` - Object { + { "batchUIDToMeasuresMap": Map { - 1 => Array [ - Object { + 1 => [ + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2148,7 +2148,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2156,7 +2156,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2164,7 +2164,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 1, "depth": 1, "duration": 0, @@ -2172,7 +2172,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "layout-effects", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2181,8 +2181,8 @@ describe('Timeline profiler', () => { "type": "passive-effects", }, ], - 2 => Array [ - Object { + 2 => [ + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2190,7 +2190,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2198,7 +2198,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2206,7 +2206,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 2, "depth": 1, "duration": 0, @@ -2214,7 +2214,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "layout-effects", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2224,29 +2224,29 @@ describe('Timeline profiler', () => { }, ], }, - "componentMeasures": Array [ - Object { + "componentMeasures": [ + { "componentName": "App", "duration": 0, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "App", "duration": 0, "timestamp": 10, "type": "passive-effect-mount", "warning": null, }, - Object { + { "componentName": "App", "duration": 0, "timestamp": 10, "type": "render", "warning": null, }, - Object { + { "componentName": "App", "duration": 0, "timestamp": 10, @@ -2255,7 +2255,7 @@ describe('Timeline profiler', () => { }, ], "duration": 20, - "flamechart": Array [], + "flamechart": [], "internalModuleSourceToRanges": Map {}, "laneToLabelMap": Map { 1 => "SyncHydrationLane", @@ -2291,13 +2291,13 @@ describe('Timeline profiler', () => { 1073741824 => "Offscreen", }, "laneToReactMeasureMap": Map { - 1 => Array [], - 2 => Array [], - 4 => Array [], - 8 => Array [], - 16 => Array [], - 32 => Array [ - Object { + 1 => [], + 2 => [], + 4 => [], + 8 => [], + 16 => [], + 32 => [ + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2305,7 +2305,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2313,7 +2313,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2321,7 +2321,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 1, "depth": 1, "duration": 0, @@ -2329,7 +2329,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "layout-effects", }, - Object { + { "batchUID": 1, "depth": 0, "duration": 0, @@ -2337,7 +2337,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "passive-effects", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2345,7 +2345,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render-idle", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2353,7 +2353,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "render", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2361,7 +2361,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "commit", }, - Object { + { "batchUID": 2, "depth": 1, "duration": 0, @@ -2369,7 +2369,7 @@ describe('Timeline profiler', () => { "timestamp": 10, "type": "layout-effects", }, - Object { + { "batchUID": 2, "depth": 0, "duration": 0, @@ -2378,44 +2378,44 @@ describe('Timeline profiler', () => { "type": "passive-effects", }, ], - 64 => Array [], - 128 => Array [], - 256 => Array [], - 512 => Array [], - 1024 => Array [], - 2048 => Array [], - 4096 => Array [], - 8192 => Array [], - 16384 => Array [], - 32768 => Array [], - 65536 => Array [], - 131072 => Array [], - 262144 => Array [], - 524288 => Array [], - 1048576 => Array [], - 2097152 => Array [], - 4194304 => Array [], - 8388608 => Array [], - 16777216 => Array [], - 33554432 => Array [], - 67108864 => Array [], - 134217728 => Array [], - 268435456 => Array [], - 536870912 => Array [], - 1073741824 => Array [], + 64 => [], + 128 => [], + 256 => [], + 512 => [], + 1024 => [], + 2048 => [], + 4096 => [], + 8192 => [], + 16384 => [], + 32768 => [], + 65536 => [], + 131072 => [], + 262144 => [], + 524288 => [], + 1048576 => [], + 2097152 => [], + 4194304 => [], + 8388608 => [], + 16777216 => [], + 33554432 => [], + 67108864 => [], + 134217728 => [], + 268435456 => [], + 536870912 => [], + 1073741824 => [], }, - "nativeEvents": Array [], - "networkMeasures": Array [], - "otherUserTimingMarks": Array [], + "nativeEvents": [], + "networkMeasures": [], + "otherUserTimingMarks": [], "reactVersion": "", - "schedulingEvents": Array [ - Object { + "schedulingEvents": [ + { "lanes": "0b0000000000000000000000000100000", "timestamp": 10, "type": "schedule-render", "warning": null, }, - Object { + { "componentName": "App", "componentStack": " in App (at **)", @@ -2426,10 +2426,10 @@ describe('Timeline profiler', () => { }, ], "snapshotHeight": 0, - "snapshots": Array [], + "snapshots": [], "startTime": -10, - "suspenseEvents": Array [], - "thrownErrors": Array [], + "suspenseEvents": [], + "thrownErrors": [], } `); }); diff --git a/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js b/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js index 05966356e51aa..b93aa4916357d 100644 --- a/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js +++ b/packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js @@ -89,12 +89,12 @@ describe('Profiler change descriptions', () => { expect(element.hocDisplayNames).toBeNull(); expect(commitData.changeDescriptions.get(element.id)) .toMatchInlineSnapshot(` - Object { + { "context": true, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, } `); @@ -109,12 +109,12 @@ describe('Profiler change descriptions', () => { expect(element.hocDisplayNames).toBeNull(); expect(commitData.changeDescriptions.get(element.id)) .toMatchInlineSnapshot(` - Object { + { "context": true, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, } `); @@ -124,12 +124,12 @@ describe('Profiler change descriptions', () => { expect(element.hocDisplayNames).toEqual(['ForwardRef']); expect(commitData.changeDescriptions.get(element.id)) .toMatchInlineSnapshot(` - Object { + { "context": null, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, } `); @@ -139,12 +139,12 @@ describe('Profiler change descriptions', () => { expect(element.hocDisplayNames).toBeNull(); expect(commitData.changeDescriptions.get(element.id)) .toMatchInlineSnapshot(` - Object { + { "context": true, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, } `); diff --git a/packages/react-devtools-shared/src/__tests__/profilingCache-test.js b/packages/react-devtools-shared/src/__tests__/profilingCache-test.js index dbee76a5ce3fd..d8d0690aa9c2a 100644 --- a/packages/react-devtools-shared/src/__tests__/profilingCache-test.js +++ b/packages/react-devtools-shared/src/__tests__/profilingCache-test.js @@ -267,35 +267,35 @@ describe('ProfilingCache', () => { expect(changeDescriptions).toHaveLength(5); expect(changeDescriptions[0]).toMatchInlineSnapshot(` Map { - 2 => Object { + 2 => { "context": null, "didHooksChange": false, "isFirstMount": true, "props": null, "state": null, }, - 4 => Object { + 4 => { "context": null, "didHooksChange": false, "isFirstMount": true, "props": null, "state": null, }, - 5 => Object { + 5 => { "context": null, "didHooksChange": false, "isFirstMount": true, "props": null, "state": null, }, - 6 => Object { + 6 => { "context": null, "didHooksChange": false, "isFirstMount": true, "props": null, "state": null, }, - 7 => Object { + 7 => { "context": null, "didHooksChange": false, "isFirstMount": true, @@ -306,51 +306,51 @@ describe('ProfilingCache', () => { `); expect(changeDescriptions[1]).toMatchInlineSnapshot(` Map { - 5 => Object { + 5 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [ + "props": [ "count", ], "state": null, }, - 4 => Object { + 4 => { "context": true, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 7 => Object { + 7 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [ + "props": [ "count", ], "state": null, }, - 6 => Object { - "context": Array [ + 6 => { + "context": [ "count", ], "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 2 => Object { + 2 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], - "state": Array [ + "props": [], + "state": [ "count", ], }, @@ -358,140 +358,140 @@ describe('ProfilingCache', () => { `); expect(changeDescriptions[2]).toMatchInlineSnapshot(` Map { - 5 => Object { + 5 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 4 => Object { + 4 => { "context": false, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 7 => Object { + 7 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 6 => Object { - "context": Array [], + 6 => { + "context": [], "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 2 => Object { + 2 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [ + "props": [ "foo", ], - "state": Array [], + "state": [], }, } `); expect(changeDescriptions[3]).toMatchInlineSnapshot(` Map { - 5 => Object { + 5 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 4 => Object { + 4 => { "context": false, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 7 => Object { + 7 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 6 => Object { - "context": Array [], + 6 => { + "context": [], "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 2 => Object { + 2 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [ + "props": [ "foo", "bar", ], - "state": Array [], + "state": [], }, } `); expect(changeDescriptions[4]).toMatchInlineSnapshot(` Map { - 5 => Object { + 5 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 4 => Object { + 4 => { "context": false, "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 7 => Object { + 7 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 6 => Object { - "context": Array [], + 6 => { + "context": [], "didHooksChange": false, "hooks": null, "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, - 2 => Object { + 2 => { "context": null, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [ + "props": [ "bar", ], - "state": Array [], + "state": [], }, } `); @@ -630,7 +630,7 @@ describe('ProfilingCache', () => { // 1st render: No change expect(changeDescriptions[0]).toMatchInlineSnapshot(` Map { - 3 => Object { + 3 => { "context": null, "didHooksChange": false, "isFirstMount": true, @@ -643,12 +643,12 @@ describe('ProfilingCache', () => { // 2nd render: Changed props expect(changeDescriptions[1]).toMatchInlineSnapshot(` Map { - 3 => Object { + 3 => { "context": false, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [ + "props": [ "count", ], "state": null, @@ -659,14 +659,14 @@ describe('ProfilingCache', () => { // 3rd render: Changed useReducer expect(changeDescriptions[2]).toMatchInlineSnapshot(` Map { - 3 => Object { + 3 => { "context": false, "didHooksChange": true, - "hooks": Array [ + "hooks": [ 1, ], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, } @@ -675,14 +675,14 @@ describe('ProfilingCache', () => { // 4th render: Changed useState expect(changeDescriptions[3]).toMatchInlineSnapshot(` Map { - 3 => Object { + 3 => { "context": false, "didHooksChange": true, - "hooks": Array [ + "hooks": [ 0, ], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, } @@ -691,12 +691,12 @@ describe('ProfilingCache', () => { // 5th render: Changed context expect(changeDescriptions[4]).toMatchInlineSnapshot(` Map { - 3 => Object { + 3 => { "context": true, "didHooksChange": false, - "hooks": Array [], + "hooks": [], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, } @@ -705,14 +705,14 @@ describe('ProfilingCache', () => { // 6th render: Sync external store expect(changeDescriptions[5]).toMatchInlineSnapshot(` Map { - 3 => Object { + 3 => { "context": false, "didHooksChange": true, - "hooks": Array [ + "hooks": [ 2, ], "isFirstMount": false, - "props": Array [], + "props": [], "state": null, }, } @@ -901,25 +901,25 @@ describe('ProfilingCache', () => { } expect(allFiberCommits).toMatchInlineSnapshot(` - Array [ - Array [ + [ + [ 0, 1, 2, ], - Array [ + [ 0, 1, 2, ], - Array [ + [ 1, 2, ], - Array [ + [ 2, ], - Array [ + [ 0, ], ] @@ -949,8 +949,8 @@ describe('ProfilingCache', () => { const rootID = store.roots[0]; const commitData = store.profilerStore.getDataForRoot(rootID).commitData; expect(commitData).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "changeDescriptions": Map {}, "duration": 0, "effectDuration": null, @@ -965,8 +965,8 @@ describe('ProfilingCache', () => { "passiveEffectDuration": null, "priorityLevel": "Immediate", "timestamp": 0, - "updaters": Array [ - Object { + "updaters": [ + { "displayName": "render()", "hocDisplayNames": null, "id": 1, diff --git a/packages/react-devtools-shared/src/__tests__/profilingCharts-test.js b/packages/react-devtools-shared/src/__tests__/profilingCharts-test.js index 5a73cea587879..d59d616d67e61 100644 --- a/packages/react-devtools-shared/src/__tests__/profilingCharts-test.js +++ b/packages/react-devtools-shared/src/__tests__/profilingCharts-test.js @@ -107,9 +107,9 @@ describe('profiling charts', () => { const firstCommitData = getFlamegraphChartData(rootID, 0); expect(firstCommitData.commitTree.nodes.size).toBe(5); expect(firstCommitData.chartData.rows).toMatchInlineSnapshot(` - Array [ - Array [ - Object { + [ + [ + { "actualDuration": 15, "didRender": true, "id": 2, @@ -120,8 +120,8 @@ describe('profiling charts', () => { "treeBaseDuration": 15, }, ], - Array [ - Object { + [ + { "actualDuration": 0, "didRender": true, "id": 5, @@ -131,7 +131,7 @@ describe('profiling charts', () => { "selfDuration": 0, "treeBaseDuration": 0, }, - Object { + { "actualDuration": 2, "didRender": true, "id": 4, @@ -141,7 +141,7 @@ describe('profiling charts', () => { "selfDuration": 2, "treeBaseDuration": 2, }, - Object { + { "actualDuration": 3, "didRender": true, "id": 3, @@ -158,9 +158,9 @@ describe('profiling charts', () => { const secondCommitData = getFlamegraphChartData(rootID, 1); expect(secondCommitData.commitTree.nodes.size).toBe(5); expect(secondCommitData.chartData.rows).toMatchInlineSnapshot(` - Array [ - Array [ - Object { + [ + [ + { "actualDuration": 10, "didRender": true, "id": 2, @@ -171,8 +171,8 @@ describe('profiling charts', () => { "treeBaseDuration": 15, }, ], - Array [ - Object { + [ + { "actualDuration": 0, "didRender": false, "id": 5, @@ -182,7 +182,7 @@ describe('profiling charts', () => { "selfDuration": 0, "treeBaseDuration": 0, }, - Object { + { "actualDuration": 0, "didRender": false, "id": 4, @@ -192,7 +192,7 @@ describe('profiling charts', () => { "selfDuration": 0, "treeBaseDuration": 2, }, - Object { + { "actualDuration": 0, "didRender": false, "id": 3, @@ -258,26 +258,26 @@ describe('profiling charts', () => { const firstCommitData = getRankedChartData(rootID, 0); expect(firstCommitData.commitTree.nodes.size).toBe(5); expect(firstCommitData.chartData.nodes).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "id": 2, "label": "Parent (10ms)", "name": "Parent", "value": 10, }, - Object { + { "id": 3, "label": "Memo(Child) (Memo) key="first" (3ms)", "name": "Memo(Child)", "value": 3, }, - Object { + { "id": 4, "label": "Memo(Child) (Memo) key="second" (2ms)", "name": "Memo(Child)", "value": 2, }, - Object { + { "id": 5, "label": "Memo(Child) (Memo) key="third" (<0.1ms)", "name": "Memo(Child)", @@ -290,8 +290,8 @@ describe('profiling charts', () => { const secondCommitData = getRankedChartData(rootID, 1); expect(secondCommitData.commitTree.nodes.size).toBe(5); expect(secondCommitData.chartData.nodes).toMatchInlineSnapshot(` - Array [ - Object { + [ + { "id": 2, "label": "Parent (10ms)", "name": "Parent", diff --git a/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js b/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js index d504481841eae..afeeaf9db839a 100644 --- a/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js +++ b/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js @@ -259,7 +259,7 @@ describe('StoreStressConcurrent', () => { } expect(snapshots).toMatchInlineSnapshot(` - Array [ + [ "[root] ▾ ", @@ -430,7 +430,7 @@ describe('StoreStressConcurrent', () => { } expect(snapshots).toMatchInlineSnapshot(` - Array [ + [ "[root] ▾ @@ -950,7 +950,7 @@ describe('StoreStressConcurrent', () => { } expect(snapshots).toMatchInlineSnapshot(` - Array [ + [ "[root] ▾ diff --git a/packages/react-devtools-shared/src/backend/StyleX/__tests__/utils-test.js b/packages/react-devtools-shared/src/backend/StyleX/__tests__/utils-test.js index 4aaf3ec42b204..00d587ec048cd 100644 --- a/packages/react-devtools-shared/src/backend/StyleX/__tests__/utils-test.js +++ b/packages/react-devtools-shared/src/backend/StyleX/__tests__/utils-test.js @@ -35,30 +35,30 @@ describe('Stylex plugin utils', () => { it('should gracefully handle empty values', () => { expect(getStyleXData(null)).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object {}, - "sources": Array [], + { + "resolvedStyles": {}, + "sources": [], } `); expect(getStyleXData(undefined)).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object {}, - "sources": Array [], + { + "resolvedStyles": {}, + "sources": [], } `); expect(getStyleXData('')).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object {}, - "sources": Array [], + { + "resolvedStyles": {}, + "sources": [], } `); expect(getStyleXData([undefined])).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object {}, - "sources": Array [], + { + "resolvedStyles": {}, + "sources": [], } `); }); @@ -87,13 +87,13 @@ describe('Stylex plugin utils', () => { alignItems: 'bar', }), ).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object { + { + "resolvedStyles": { "alignItems": "center", "display": "flex", "flexDirection": "center", }, - "sources": Array [ + "sources": [ "Example__style", ], } @@ -123,13 +123,13 @@ describe('Stylex plugin utils', () => { }, ]), ).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object { + { + "resolvedStyles": { "alignItems": "center", "display": "flex", "flexDirection": "center", }, - "sources": Array [ + "sources": [ "Example1__style", "Example2__style", ], @@ -164,13 +164,13 @@ describe('Stylex plugin utils', () => { false, ]), ).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object { + { + "resolvedStyles": { "alignItems": "center", "display": "flex", "flexDirection": "center", }, - "sources": Array [ + "sources": [ "Example1__style", "Example2__style", ], @@ -204,15 +204,15 @@ describe('Stylex plugin utils', () => { }, }), ).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object { - ":hover": Object { + { + "resolvedStyles": { + ":hover": { "color": "blue", "textDecoration": "none", }, "color": "black", }, - "sources": Array [ + "sources": [ "Example__style", ], } @@ -244,13 +244,13 @@ describe('Stylex plugin utils', () => { false, ]), ).toMatchInlineSnapshot(` - Object { - "resolvedStyles": Object { + { + "resolvedStyles": { "alignItems": "center", "display": "flex", "flexDirection": "center", }, - "sources": Array [ + "sources": [ "Example1__style", "Example2__style", "Example3__style", diff --git a/packages/react-devtools-shared/src/hooks/__tests__/generateHookMap-test.js b/packages/react-devtools-shared/src/hooks/__tests__/generateHookMap-test.js index 0871d2301ef9a..b1170814e526e 100644 --- a/packages/react-devtools-shared/src/hooks/__tests__/generateHookMap-test.js +++ b/packages/react-devtools-shared/src/hooks/__tests__/generateHookMap-test.js @@ -70,9 +70,9 @@ export function Component() { const encodedHookMap = generateEncodedHookMap(parsed); expect(encodedHookMap).toMatchInlineSnapshot(` - Object { + { "mappings": "CAAD;KYCA,AgBDA;MREA,AWFA;SnBGA,AaHA,AMIA,AaJA;WpBKA,AiCLA;Y7CMA,AYNA", - "names": Array [ + "names": [ "", "a", "b", @@ -115,9 +115,9 @@ export function Component() { const encodedHookMap = generateEncodedHookMap(parsed); expect(encodedHookMap).toMatchInlineSnapshot(` - Object { + { "mappings": "CAAD;MgBCA,AUDA;OFEA,AUFA", - "names": Array [ + "names": [ "", "theme", "val", @@ -158,9 +158,9 @@ export function Component() { const encodedHookMap = generateEncodedHookMap(parsed); expect(encodedHookMap).toMatchInlineSnapshot(` - Object { + { "mappings": "CAAD;KyBCA;MKCA,AWDA;SrCDA", - "names": Array [ + "names": [ "", "InnerComponent", "state", @@ -200,9 +200,9 @@ export function Component() { const encodedHookMap = generateEncodedHookMap(parsed); expect(encodedHookMap).toMatchInlineSnapshot(` - Object { + { "mappings": "CAAD;MwBCA,AWDA", - "names": Array [ + "names": [ "", "val", ], diff --git a/packages/react-devtools-timeline/src/content-views/utils/__tests__/colors-test.js b/packages/react-devtools-timeline/src/content-views/utils/__tests__/colors-test.js index ccfb3cee4bd5c..517cd3b66fee8 100644 --- a/packages/react-devtools-timeline/src/content-views/utils/__tests__/colors-test.js +++ b/packages/react-devtools-timeline/src/content-views/utils/__tests__/colors-test.js @@ -41,7 +41,7 @@ describe(ColorGenerator, () => { describe(ColorGenerator.prototype.colorForID, () => { it('should generate a color for an ID', () => { expect(new ColorGenerator().colorForID('123')).toMatchInlineSnapshot(` - Object { + { "a": 1, "h": 190, "l": 80, diff --git a/packages/react-devtools-timeline/src/view-base/utils/__tests__/scrollState-test.js b/packages/react-devtools-timeline/src/view-base/utils/__tests__/scrollState-test.js index 306caffa6076c..0241ea3f14a5f 100644 --- a/packages/react-devtools-timeline/src/view-base/utils/__tests__/scrollState-test.js +++ b/packages/react-devtools-timeline/src/view-base/utils/__tests__/scrollState-test.js @@ -210,7 +210,7 @@ describe(zoomState, () => { }); expect(zoomedState).toMatchInlineSnapshot(` - Object { + { "length": 200, "offset": -50, } @@ -232,7 +232,7 @@ describe(moveStateToRange, () => { }); expect(movedState).toMatchInlineSnapshot(` - Object { + { "length": 400, "offset": -50, } diff --git a/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js b/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js index 8a37ddaa007c0..bd34fbb20ce5b 100644 --- a/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js +++ b/packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js @@ -91,7 +91,7 @@ describe('ReactDOMServerHydration', () => { } if (gate(flags => flags.enableClientRenderFallbackOnTextMismatch)) { expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Text content did not match. Server: "server" Client: "client" in main (at **) in div (at **) @@ -103,7 +103,7 @@ describe('ReactDOMServerHydration', () => { `); } else { expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Text content did not match. Server: "server" Client: "client" in main (at **) in div (at **) @@ -130,7 +130,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Prop \`dangerouslySetInnerHTML\` did not match. Server: "server" Client: "client" in main (at **) in div (at **) @@ -154,7 +154,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Prop \`className\` did not match. Server: "child server" Client: "child client" in main (at **) in div (at **) @@ -177,7 +177,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Prop \`tabIndex\` did not match. Server: "null" Client: "1" in main (at **) in div (at **) @@ -200,7 +200,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Extra attributes from the server: tabindex,dir in main (at **) in div (at **) @@ -223,7 +223,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Prop \`tabIndex\` did not match. Server: "null" Client: "1" in main (at **) in div (at **) @@ -247,7 +247,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Prop \`style\` did not match. Server: "opacity:0" Client: "opacity:1" in main (at **) in div (at **) @@ -269,7 +269,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Expected server HTML to contain a matching
in
. in main (at **) in div (at **) @@ -293,7 +293,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Expected server HTML to contain a matching
in
. in header (at **) in div (at **) @@ -317,7 +317,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Expected server HTML to contain a matching
in
. in main (at **) in div (at **) @@ -341,7 +341,7 @@ describe('ReactDOMServerHydration', () => { ); } expect(testMismatch(Mismatch)).toMatchInlineSnapshot(` - Array [ + [ "Warning: Expected server HTML to contain a matching