Update jest printBasicPrototype config (#26142)

This commit is contained in:
Ming Ye 2023-02-10 16:58:57 +08:00 committed by GitHub
parent 6396b66411
commit 55542bc73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 984 additions and 987 deletions

View File

@ -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,

View File

@ -3,10 +3,10 @@
exports[`ReactARTComponents should generate a <Shape> where top radius is 0 if the sum of the top radius is greater than width 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": 0,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -28,10 +28,10 @@ exports[`ReactARTComponents should generate a <Shape> where top radius is 0 if t
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when bottom left radius prop is negative 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": 0,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -52,10 +52,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when bottom right radius prop is negative 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": 0,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -76,10 +76,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when top left radius prop is negative 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": 0,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -100,10 +100,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when top right radius prop is negative 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": 0,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -124,10 +124,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
exports[`ReactARTComponents should generate a <Shape> with positive height when height prop is negative 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": -50,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -148,10 +148,10 @@ exports[`ReactARTComponents should generate a <Shape> with positive height when
exports[`ReactARTComponents should generate a <Shape> with positive width when width prop is negative 1`] = `
<Shape
d={
Object {
{
"_pivotX": -50,
"_pivotY": 0,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -172,10 +172,10 @@ exports[`ReactARTComponents should generate a <Shape> with positive width when w
exports[`ReactARTComponents should generate a <Shape> with props for drawing the Circle 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": -10,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -197,10 +197,10 @@ exports[`ReactARTComponents should generate a <Shape> with props for drawing the
exports[`ReactARTComponents should generate a <Shape> with props for drawing the Rectangle 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": 0,
"path": Array [
"path": [
[Function],
[Function],
[Function],
@ -223,10 +223,10 @@ exports[`ReactARTComponents should generate a <Shape> with props for drawing the
exports[`ReactARTComponents should generate a <Shape> with props for drawing the Wedge 1`] = `
<Shape
d={
Object {
{
"_pivotX": 0,
"_pivotY": 50,
"path": Array [
"path": [
[Function],
[Function],
[Function],

View File

@ -130,7 +130,7 @@ describe('Timeline profiler', () => {
renderHelper(<div />);
expect(clearedMarks).toMatchInlineSnapshot(`
Array [
[
"--schedule-render-2",
"--render-start-2",
"--render-stop",
@ -151,7 +151,7 @@ describe('Timeline profiler', () => {
renderRootHelper(<div />);
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(<Example />);
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(<Example />);
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(<Example />);
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(<Example />);
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(<Example />);
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(<div />);
expect(clearedMarks).toMatchInlineSnapshot(`
Array [
[
"--schedule-render-2",
"--render-start-2",
"--render-stop",
@ -1041,7 +1041,7 @@ describe('Timeline profiler', () => {
it('regression test DefaultLane', () => {
renderRootHelper(<div />);
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 **)

View File

@ -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": <div />,
"preview_long": <div />,
},
"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,

View File

@ -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": <div />,
"preview_long": <div />,
},
"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": {},
},
},
],

View File

@ -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",

File diff suppressed because it is too large Load Diff

View File

@ -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,
}
`);

View File

@ -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,

View File

@ -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",

View File

@ -259,7 +259,7 @@ describe('StoreStressConcurrent', () => {
}
expect(snapshots).toMatchInlineSnapshot(`
Array [
[
"[root]
<Root>
<A key="a">",
@ -430,7 +430,7 @@ describe('StoreStressConcurrent', () => {
}
expect(snapshots).toMatchInlineSnapshot(`
Array [
[
"[root]
<Root>
<X>
@ -950,7 +950,7 @@ describe('StoreStressConcurrent', () => {
}
expect(snapshots).toMatchInlineSnapshot(`
Array [
[
"[root]
<Root>
<X>

View File

@ -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",

View File

@ -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": [
"<no-hook>",
"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": [
"<no-hook>",
"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": [
"<no-hook>",
"InnerComponent",
"state",
@ -200,9 +200,9 @@ export function Component() {
const encodedHookMap = generateEncodedHookMap(parsed);
expect(encodedHookMap).toMatchInlineSnapshot(`
Object {
{
"mappings": "CAAD;MwBCA,AWDA",
"names": Array [
"names": [
"<no-hook>",
"val",
],

View File

@ -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,

View File

@ -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,
}

View File

@ -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: "<span>server</span>" Client: "<span>client</span>"
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 <main> in <div>.
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 <header> in <div>.
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 <main> in <div>.
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 <footer> in <div>.
in footer (at **)
in div (at **)
@ -362,7 +362,7 @@ describe('ReactDOMServerHydration', () => {
}
if (gate(flags => flags.enableClientRenderFallbackOnTextMismatch)) {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Text content did not match. Server: "" Client: "only"
in div (at **)
in Mismatch (at **)",
@ -373,7 +373,7 @@ describe('ReactDOMServerHydration', () => {
`);
} else {
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Text content did not match. Server: "" Client: "only"
in div (at **)
in Mismatch (at **)",
@ -394,7 +394,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching text node for "second" in <div>.
in div (at **)
in Mismatch (at **)",
@ -417,7 +417,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching text node for "first" in <div>.
in div (at **)
in Mismatch (at **)",
@ -440,7 +440,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching text node for "third" in <div>.
in div (at **)
in Mismatch (at **)",
@ -465,7 +465,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain a <main> in <div>.
in div (at **)
in Mismatch (at **)",
@ -488,7 +488,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <main> in <div>.
in main (at **)
in div (at **)
@ -513,7 +513,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <footer> in <div>.
in footer (at **)
in div (at **)
@ -537,7 +537,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain a <footer> in <div>.
in div (at **)
in Mismatch (at **)",
@ -556,7 +556,7 @@ describe('ReactDOMServerHydration', () => {
return <div className="parent">{!isClient && 'only'}</div>;
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain the text node "only" in <div>.
in div (at **)
in Mismatch (at **)",
@ -579,7 +579,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <main> in <div>.
in main (at **)
in div (at **)
@ -604,7 +604,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <footer> in <div>.
in footer (at **)
in div (at **)
@ -628,7 +628,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain the text node "third" in <div>.
in div (at **)
in Mismatch (at **)",
@ -662,7 +662,7 @@ describe('ReactDOMServerHydration', () => {
}
// TODO: This message doesn't seem to have any useful details.
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
"Caught [Hydration failed because the initial UI does not match what was rendered on the server.]",
"Caught [There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.]",
@ -684,7 +684,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain a <main> in <div>.
in div (at **)
in Mismatch (at **)",
@ -711,7 +711,7 @@ describe('ReactDOMServerHydration', () => {
}
// TODO: This message doesn't seem to have any useful details.
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
"Caught [Hydration failed because the initial UI does not match what was rendered on the server.]",
"Caught [There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering.]",
@ -739,7 +739,7 @@ describe('ReactDOMServerHydration', () => {
// unhydrated tail nodes and this template is the first match. When we add special case handling for client
// rendered suspense boundaries this test will likely change again
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain a <template> in <div>.
in div (at **)
in Mismatch (at **)",
@ -764,7 +764,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <main> in <div>.
in main (at **)
in Suspense (at **)
@ -790,7 +790,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <footer> in <div>.
in footer (at **)
in Suspense (at **)
@ -822,7 +822,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Caught [The server did not finish this Suspense boundary: The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server]",
]
`);
@ -848,7 +848,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Caught [The server did not finish this Suspense boundary: The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToPipeableStream" which supports Suspense on the server]",
]
`);
@ -872,7 +872,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <header> in <div>.
in header (at **)
in div (at **)
@ -902,7 +902,7 @@ describe('ReactDOMServerHydration', () => {
);
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain a <header> in <div>.
in div (at **)
in Mismatch (at **)",
@ -951,7 +951,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Expected server HTML to contain a matching <footer> in <div>.
in footer (at **)
in Panel (at **)
@ -1000,7 +1000,7 @@ describe('ReactDOMServerHydration', () => {
}
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
Array [
[
"Warning: Did not expect server HTML to contain a <footer> in <div>.
in div (at **)
in ProfileSettings (at **)

View File

@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ReactTestUtils Simulate should have locally attached media events 1`] = `
Array [
[
"abort",
"animationEnd",
"animationIteration",

View File

@ -103,7 +103,7 @@ exports[`ReactFabric renders and reorders children 2`] = `
`;
exports[`ReactFabric should call complete after inserting children 1`] = `
Array [
[
"RCTView {"foo":"a"}
RCTView {"foo":"b"}",
]

View File

@ -9,8 +9,8 @@ exports[`ReactFlightNativeRelay can render a Client Component using a module ref
`;
exports[`ReactFlightNativeRelay can render a Server Component 1`] = `
Object {
"foo": Object {
{
"foo": {
"bar": <RCTView>
<RCTText>
A

View File

@ -19,7 +19,7 @@ exports[`Profiler works in profiling and non-profiling bundles enableProfilerTim
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:disabled should support an empty Profiler (with no children) 2`] = `<div />`;
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:disabled should support nested Profilers 1`] = `
Array [
[
<div>
outer function component
</div>,
@ -51,7 +51,7 @@ exports[`Profiler works in profiling and non-profiling bundles enableProfilerTim
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:enabled should support an empty Profiler (with no children) 2`] = `<div />`;
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:enabled should support nested Profilers 1`] = `
Array [
[
<div>
outer function component
</div>,

View File

@ -24,9 +24,6 @@ module.exports = {
enableGlobally: true,
legacyFakeTimers: true,
},
snapshotFormat: {
printBasicPrototype: true,
},
snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')],
testSequencer: require.resolve('./jestSequencer'),