Update jest printBasicPrototype config (#26142)
Ming Ye committed
Feb 10, 2023 at 16:58 UTC
55542bc73decab8337df3f7e519451b28593b04e
21 files changed
+984
-987
packages/dom-event-testing-library/__tests__/index-test.internal.js
+3
-3
@@ -49,7 +49,7 @@ describe('createEventTarget', () => {
49
const target = createEventTarget(node);
50
expect(target.node).toEqual(node);
51
expect(Object.keys(target)).toMatchInlineSnapshot(`
52
- Array [
52
+ [
53
"node",
54
"blur",
55
"click",
@@ -337,7 +337,7 @@ describe('createEventTarget', () => {
337
test('.setBoundingClientRect()', () => {
338
const target = createEventTarget(node);
339
expect(node.getBoundingClientRect()).toMatchInlineSnapshot(`
340
- Object {
340
+ {
341
"bottom": 0,
342
"height": 0,
343
"left": 0,
@@ -350,7 +350,7 @@ describe('createEventTarget', () => {
350
`);
351
target.setBoundingClientRect({x: 10, y: 20, width: 100, height: 200});
352
expect(node.getBoundingClientRect()).toMatchInlineSnapshot(`
353
- Object {
353
+ {
354
"bottom": 220,
355
"height": 200,
356
"left": 10,
packages/react-art/src/__tests__/__snapshots__/ReactART-test.js.snap
+20
-20
@@ -3,10 +3,10 @@
3
exports[`ReactARTComponents should generate a <Shape> where top radius is 0 if the sum of the top radius is greater than width 1`] = `
4
<Shape
5
d={
6
- Object {
6
+ {
7
"_pivotX": 0,
8
"_pivotY": 0,
9
- "path": Array [
9
+ "path": [
10
[Function],
11
[Function],
12
[Function],
@@ -28,10 +28,10 @@ exports[`ReactARTComponents should generate a <Shape> where top radius is 0 if t
28
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when bottom left radius prop is negative 1`] = `
29
<Shape
30
d={
31
- Object {
31
+ {
32
"_pivotX": 0,
33
"_pivotY": 0,
34
- "path": Array [
34
+ "path": [
35
[Function],
36
[Function],
37
[Function],
@@ -52,10 +52,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
52
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when bottom right radius prop is negative 1`] = `
53
<Shape
54
d={
55
- Object {
55
+ {
56
"_pivotX": 0,
57
"_pivotY": 0,
58
- "path": Array [
58
+ "path": [
59
[Function],
60
[Function],
61
[Function],
@@ -76,10 +76,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
76
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when top left radius prop is negative 1`] = `
77
<Shape
78
d={
79
- Object {
79
+ {
80
"_pivotX": 0,
81
"_pivotY": 0,
82
- "path": Array [
82
+ "path": [
83
[Function],
84
[Function],
85
[Function],
@@ -100,10 +100,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
100
exports[`ReactARTComponents should generate a <Shape> with a radius property of 0 when top right radius prop is negative 1`] = `
101
<Shape
102
d={
103
- Object {
103
+ {
104
"_pivotX": 0,
105
"_pivotY": 0,
106
- "path": Array [
106
+ "path": [
107
[Function],
108
[Function],
109
[Function],
@@ -124,10 +124,10 @@ exports[`ReactARTComponents should generate a <Shape> with a radius property of
124
exports[`ReactARTComponents should generate a <Shape> with positive height when height prop is negative 1`] = `
125
<Shape
126
d={
127
- Object {
127
+ {
128
"_pivotX": 0,
129
"_pivotY": -50,
130
- "path": Array [
130
+ "path": [
131
[Function],
132
[Function],
133
[Function],
@@ -148,10 +148,10 @@ exports[`ReactARTComponents should generate a <Shape> with positive height when
148
exports[`ReactARTComponents should generate a <Shape> with positive width when width prop is negative 1`] = `
149
<Shape
150
d={
151
- Object {
151
+ {
152
"_pivotX": -50,
153
"_pivotY": 0,
154
- "path": Array [
154
+ "path": [
155
[Function],
156
[Function],
157
[Function],
@@ -172,10 +172,10 @@ exports[`ReactARTComponents should generate a <Shape> with positive width when w
172
exports[`ReactARTComponents should generate a <Shape> with props for drawing the Circle 1`] = `
173
<Shape
174
d={
175
- Object {
175
+ {
176
"_pivotX": 0,
177
"_pivotY": -10,
178
- "path": Array [
178
+ "path": [
179
[Function],
180
[Function],
181
[Function],
@@ -197,10 +197,10 @@ exports[`ReactARTComponents should generate a <Shape> with props for drawing the
197
exports[`ReactARTComponents should generate a <Shape> with props for drawing the Rectangle 1`] = `
198
<Shape
199
d={
200
- Object {
200
+ {
201
"_pivotX": 0,
202
"_pivotY": 0,
203
- "path": Array [
203
+ "path": [
204
[Function],
205
[Function],
206
[Function],
@@ -223,10 +223,10 @@ exports[`ReactARTComponents should generate a <Shape> with props for drawing the
223
exports[`ReactARTComponents should generate a <Shape> with props for drawing the Wedge 1`] = `
224
<Shape
225
d={
226
- Object {
226
+ {
227
"_pivotX": 0,
228
"_pivotY": 50,
229
- "path": Array [
229
+ "path": [
230
[Function],
231
[Function],
232
[Function],
packages/react-devtools-shared/src/__tests__/TimelineProfiler-test.js
+142
-142
@@ -130,7 +130,7 @@ describe('Timeline profiler', () => {
130
renderHelper(<div />);
131
132
expect(clearedMarks).toMatchInlineSnapshot(`
133
- Array [
133
+ [
134
"--schedule-render-2",
135
"--render-start-2",
136
"--render-stop",
@@ -151,7 +151,7 @@ describe('Timeline profiler', () => {
151
renderRootHelper(<div />);
152
153
expect(clearedMarks).toMatchInlineSnapshot(`
154
- Array [
154
+ [
155
"--schedule-render-32",
156
]
157
`);
@@ -161,7 +161,7 @@ describe('Timeline profiler', () => {
161
expect(Scheduler).toFlushUntilNextPaint([]);
162
163
expect(clearedMarks).toMatchInlineSnapshot(`
164
- Array [
164
+ [
165
"--render-start-32",
166
"--render-stop",
167
"--commit-start-32",
@@ -196,7 +196,7 @@ describe('Timeline profiler', () => {
196
expect(Scheduler).toFlushAndYieldThrough(['Foo']);
197
198
expect(clearedMarks).toMatchInlineSnapshot(`
199
- Array [
199
+ [
200
"--schedule-render-128",
201
"--render-start-128",
202
"--component-render-start-Foo",
@@ -219,7 +219,7 @@ describe('Timeline profiler', () => {
219
);
220
221
expect(clearedMarks).toMatchInlineSnapshot(`
222
- Array [
222
+ [
223
"--schedule-render-2",
224
"--render-start-2",
225
"--component-render-start-Example",
@@ -242,7 +242,7 @@ describe('Timeline profiler', () => {
242
243
await fakeSuspensePromise;
244
expect(clearedMarks).toMatchInlineSnapshot(`
245
- Array [
245
+ [
246
"--suspense-resolved-0-Example",
247
]
248
`);
@@ -261,7 +261,7 @@ describe('Timeline profiler', () => {
261
);
262
263
expect(clearedMarks).toMatchInlineSnapshot(`
264
- Array [
264
+ [
265
"--schedule-render-2",
266
"--render-start-2",
267
"--component-render-start-Example",
@@ -299,7 +299,7 @@ describe('Timeline profiler', () => {
299
);
300
301
expect(clearedMarks).toMatchInlineSnapshot(`
302
- Array [
302
+ [
303
"--schedule-render-32",
304
]
305
`);
@@ -309,7 +309,7 @@ describe('Timeline profiler', () => {
309
expect(Scheduler).toFlushUntilNextPaint([]);
310
311
expect(clearedMarks).toMatchInlineSnapshot(`
312
- Array [
312
+ [
313
"--render-start-32",
314
"--component-render-start-Example",
315
"--component-render-stop",
@@ -331,7 +331,7 @@ describe('Timeline profiler', () => {
331
332
await fakeSuspensePromise;
333
expect(clearedMarks).toMatchInlineSnapshot(`
334
- Array [
334
+ [
335
"--suspense-resolved-0-Example",
336
]
337
`);
@@ -350,7 +350,7 @@ describe('Timeline profiler', () => {
350
);
351
352
expect(clearedMarks).toMatchInlineSnapshot(`
353
- Array [
353
+ [
354
"--schedule-render-32",
355
]
356
`);
@@ -360,7 +360,7 @@ describe('Timeline profiler', () => {
360
expect(Scheduler).toFlushUntilNextPaint([]);
361
362
expect(clearedMarks).toMatchInlineSnapshot(`
363
- Array [
363
+ [
364
"--render-start-32",
365
"--component-render-start-Example",
366
"--component-render-stop",
@@ -382,7 +382,7 @@ describe('Timeline profiler', () => {
382
383
await expect(fakeSuspensePromise).rejects.toThrow();
384
expect(clearedMarks).toMatchInlineSnapshot(`
385
- Array [
385
+ [
386
"--suspense-rejected-0-Example",
387
]
388
`);
@@ -402,7 +402,7 @@ describe('Timeline profiler', () => {
402
renderRootHelper(<Example />);
403
404
expect(clearedMarks).toMatchInlineSnapshot(`
405
- Array [
405
+ [
406
"--schedule-render-32",
407
]
408
`);
@@ -412,7 +412,7 @@ describe('Timeline profiler', () => {
412
expect(Scheduler).toFlushUntilNextPaint([]);
413
414
expect(clearedMarks).toMatchInlineSnapshot(`
415
- Array [
415
+ [
416
"--render-start-32",
417
"--component-render-start-Example",
418
"--component-render-stop",
@@ -455,7 +455,7 @@ describe('Timeline profiler', () => {
455
renderRootHelper(<Example />);
456
457
expect(clearedMarks).toMatchInlineSnapshot(`
458
- Array [
458
+ [
459
"--schedule-render-32",
460
]
461
`);
@@ -465,7 +465,7 @@ describe('Timeline profiler', () => {
465
expect(Scheduler).toFlushUntilNextPaint([]);
466
467
expect(clearedMarks).toMatchInlineSnapshot(`
468
- Array [
468
+ [
469
"--render-start-32",
470
"--component-render-start-Example",
471
"--component-render-stop",
@@ -509,7 +509,7 @@ describe('Timeline profiler', () => {
509
renderRootHelper(<Example />);
510
511
expect(clearedMarks).toMatchInlineSnapshot(`
512
- Array [
512
+ [
513
"--schedule-render-32",
514
]
515
`);
@@ -529,7 +529,7 @@ describe('Timeline profiler', () => {
529
);
530
531
expect(clearedMarks).toMatchInlineSnapshot(`
532
- Array [
532
+ [
533
"--render-start-32",
534
"--component-render-start-Example",
535
"--schedule-state-update-32-Example",
@@ -563,7 +563,7 @@ describe('Timeline profiler', () => {
563
renderRootHelper(<Example />);
564
565
expect(clearedMarks).toMatchInlineSnapshot(`
566
- Array [
566
+ [
567
"--schedule-render-32",
568
]
569
`);
@@ -583,7 +583,7 @@ describe('Timeline profiler', () => {
583
);
584
585
expect(clearedMarks).toMatchInlineSnapshot(`
586
- Array [
586
+ [
587
"--render-start-32",
588
"--component-render-start-Example",
589
"--schedule-forced-update-32-Example",
@@ -614,7 +614,7 @@ describe('Timeline profiler', () => {
614
renderRootHelper(<Example />);
615
616
expect(clearedMarks).toMatchInlineSnapshot(`
617
- Array [
617
+ [
618
"--schedule-render-32",
619
]
620
`);
@@ -624,7 +624,7 @@ describe('Timeline profiler', () => {
624
expect(Scheduler).toFlushUntilNextPaint([]);
625
626
expect(clearedMarks).toMatchInlineSnapshot(`
627
- Array [
627
+ [
628
"--render-start-32",
629
"--component-render-start-Example",
630
"--component-render-stop",
@@ -670,7 +670,7 @@ describe('Timeline profiler', () => {
670
expect(Scheduler).toFlushAndYield([]);
671
672
expect(clearedMarks).toMatchInlineSnapshot(`
673
- Array [
673
+ [
674
"--schedule-render-32",
675
"--render-start-32",
676
"--component-render-start-Example",
@@ -719,7 +719,7 @@ describe('Timeline profiler', () => {
719
expect(Scheduler).toFlushAndYield([]);
720
721
expect(clearedMarks).toMatchInlineSnapshot(`
722
- Array [
722
+ [
723
"--schedule-render-32",
724
"--render-start-32",
725
"--component-render-start-Example",
@@ -766,7 +766,7 @@ describe('Timeline profiler', () => {
766
);
767
768
expect(clearedMarks).toMatchInlineSnapshot(`
769
- Array [
769
+ [
770
"--schedule-render-2",
771
"--render-start-2",
772
"--component-render-start-ErrorBoundary",
@@ -829,7 +829,7 @@ describe('Timeline profiler', () => {
829
);
830
831
expect(clearedMarks).toMatchInlineSnapshot(`
832
- Array [
832
+ [
833
"--schedule-render-32",
834
]
835
`);
@@ -839,7 +839,7 @@ describe('Timeline profiler', () => {
839
expect(Scheduler).toFlushUntilNextPaint([]);
840
841
expect(clearedMarks).toMatchInlineSnapshot(`
842
- Array [
842
+ [
843
"--render-start-32",
844
"--component-render-start-ErrorBoundary",
845
"--component-render-stop",
@@ -929,7 +929,7 @@ describe('Timeline profiler', () => {
929
]);
930
931
expect(clearedMarks).toMatchInlineSnapshot(`
932
- Array [
932
+ [
933
"--schedule-render-32",
934
"--render-start-32",
935
"--component-render-start-ComponentWithEffects",
@@ -960,7 +960,7 @@ describe('Timeline profiler', () => {
960
]);
961
962
expect(clearedMarks).toMatchInlineSnapshot(`
963
- Array [
963
+ [
964
"--passive-effects-start-32",
965
"--component-passive-effect-mount-start-ComponentWithEffects",
966
"--component-passive-effect-mount-stop",
@@ -987,7 +987,7 @@ describe('Timeline profiler', () => {
987
]);
988
989
expect(clearedMarks).toMatchInlineSnapshot(`
990
- Array [
990
+ [
991
"--schedule-render-2",
992
"--render-start-2",
993
"--render-stop",
@@ -1021,7 +1021,7 @@ describe('Timeline profiler', () => {
1021
renderHelper(<div />);
1022
1023
expect(clearedMarks).toMatchInlineSnapshot(`
1024
- Array [
1024
+ [
1025
"--schedule-render-2",
1026
"--render-start-2",
1027
"--render-stop",
@@ -1041,7 +1041,7 @@ describe('Timeline profiler', () => {
1041
it('regression test DefaultLane', () => {
1042
renderRootHelper(<div />);
1043
expect(clearedMarks).toMatchInlineSnapshot(`
1044
- Array [
1044
+ [
1045
"--schedule-render-32",
1046
]
1047
`);
@@ -1069,7 +1069,7 @@ describe('Timeline profiler', () => {
1069
await Promise.resolve();
1070
1071
expect(clearedMarks).toMatchInlineSnapshot(`
1072
- Array [
1072
+ [
1073
"--schedule-state-update-2-App",
1074
"--render-start-2",
1075
"--component-render-start-App",
@@ -1109,7 +1109,7 @@ describe('Timeline profiler', () => {
1109
expect(Scheduler).toFlushAndYield([]);
1110
1111
expect(clearedMarks).toMatchInlineSnapshot(`
1112
- Array [
1112
+ [
1113
"--schedule-state-update-8-App",
1114
"--render-start-8",
1115
"--component-render-start-App",
@@ -1189,8 +1189,8 @@ describe('Timeline profiler', () => {
1189
1190
const timelineData = stopProfilingAndGetTimelineData();
1191
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1192
- Array [
1193
- Object {
1192
+ [
1193
+ {
1194
"lanes": "0b0000000000000000000000000000010",
1195
"timestamp": 10,
1196
"type": "schedule-render",
@@ -1205,8 +1205,8 @@ describe('Timeline profiler', () => {
1205
1206
const timelineData = stopProfilingAndGetTimelineData();
1207
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1208
- Array [
1209
- Object {
1208
+ [
1209
+ {
1210
"lanes": "0b0000000000000000000000000100000",
1211
"timestamp": 10,
1212
"type": "schedule-render",
@@ -1243,8 +1243,8 @@ describe('Timeline profiler', () => {
1243
1244
const timelineData = stopProfilingAndGetTimelineData();
1245
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1246
- Array [
1247
- Object {
1246
+ [
1247
+ {
1248
"componentName": "Example",
1249
"componentStack": "
1250
in Example (at **)",
@@ -1253,7 +1253,7 @@ describe('Timeline profiler', () => {
1253
"type": "schedule-state-update",
1254
"warning": null,
1255
},
1256
- Object {
1256
+ {
1257
"componentName": "Example",
1258
"componentStack": "
1259
in Example (at **)",
@@ -1262,7 +1262,7 @@ describe('Timeline profiler', () => {
1262
"type": "schedule-state-update",
1263
"warning": null,
1264
},
1265
- Object {
1265
+ {
1266
"componentName": "Example",
1267
"componentStack": "
1268
in Example (at **)",
@@ -1271,7 +1271,7 @@ describe('Timeline profiler', () => {
1271
"type": "schedule-state-update",
1272
"warning": null,
1273
},
1274
- Object {
1274
+ {
1275
"componentName": "Example",
1276
"componentStack": "
1277
in Example (at **)",
@@ -1283,15 +1283,15 @@ describe('Timeline profiler', () => {
1283
]
1284
`);
1285
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1286
- Array [
1287
- Object {
1286
+ [
1287
+ {
1288
"componentName": "Example",
1289
"duration": 0,
1290
"timestamp": 10,
1291
"type": "render",
1292
"warning": null,
1293
},
1294
- Object {
1294
+ {
1295
"componentName": "Example",
1296
"duration": 10,
1297
"timestamp": 10,
@@ -1369,7 +1369,7 @@ describe('Timeline profiler', () => {
1369
expect(timelineData.suspenseEvents).toHaveLength(1);
1370
const suspenseEvent = timelineData.suspenseEvents[0];
1371
expect(suspenseEvent).toMatchInlineSnapshot(`
1372
- Object {
1372
+ {
1373
"componentName": "Example",
1374
"depth": 0,
1375
"duration": 10,
@@ -1427,7 +1427,7 @@ describe('Timeline profiler', () => {
1427
expect(timelineData.suspenseEvents).toHaveLength(1);
1428
const suspenseEvent = timelineData.suspenseEvents[0];
1429
expect(suspenseEvent).toMatchInlineSnapshot(`
1430
- Object {
1430
+ {
1431
"componentName": "Example",
1432
"depth": 0,
1433
"duration": 10,
@@ -1485,7 +1485,7 @@ describe('Timeline profiler', () => {
1485
expect(timelineData.suspenseEvents).toHaveLength(1);
1486
const suspenseEvent = timelineData.suspenseEvents[0];
1487
expect(suspenseEvent).toMatchInlineSnapshot(`
1488
- Object {
1488
+ {
1489
"componentName": "Example",
1490
"depth": 0,
1491
"duration": 10,
@@ -1543,7 +1543,7 @@ describe('Timeline profiler', () => {
1543
expect(timelineData.suspenseEvents).toHaveLength(1);
1544
const suspenseEvent = timelineData.suspenseEvents[0];
1545
expect(suspenseEvent).toMatchInlineSnapshot(`
1546
- Object {
1546
+ {
1547
"componentName": "Example",
1548
"depth": 0,
1549
"duration": 10,
@@ -1584,15 +1584,15 @@ describe('Timeline profiler', () => {
1584
const timelineData = stopProfilingAndGetTimelineData();
1585
expect(timelineData.batchUIDToMeasuresMap.size).toBe(2);
1586
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1587
- Array [
1588
- Object {
1587
+ [
1588
+ {
1589
"componentName": "Example",
1590
"duration": 10,
1591
"timestamp": 10,
1592
"type": "render",
1593
"warning": null,
1594
},
1595
- Object {
1595
+ {
1596
"componentName": "Example",
1597
"duration": 10,
1598
"timestamp": 20,
@@ -1602,14 +1602,14 @@ describe('Timeline profiler', () => {
1602
]
1603
`);
1604
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1605
- Array [
1606
- Object {
1605
+ [
1606
+ {
1607
"lanes": "0b0000000000000000000000000100000",
1608
"timestamp": 10,
1609
"type": "schedule-render",
1610
"warning": null,
1611
},
1612
- Object {
1612
+ {
1613
"componentName": "Example",
1614
"componentStack": "
1615
in Example (at **)",
@@ -1643,15 +1643,15 @@ describe('Timeline profiler', () => {
1643
const timelineData = stopProfilingAndGetTimelineData();
1644
expect(timelineData.batchUIDToMeasuresMap.size).toBe(2);
1645
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1646
- Array [
1647
- Object {
1646
+ [
1647
+ {
1648
"componentName": "Example",
1649
"duration": 10,
1650
"timestamp": 10,
1651
"type": "render",
1652
"warning": null,
1653
},
1654
- Object {
1654
+ {
1655
"componentName": "Example",
1656
"duration": 10,
1657
"timestamp": 20,
@@ -1661,14 +1661,14 @@ describe('Timeline profiler', () => {
1661
]
1662
`);
1663
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1664
- Array [
1665
- Object {
1664
+ [
1665
+ {
1666
"lanes": "0b0000000000000000000000000100000",
1667
"timestamp": 10,
1668
"type": "schedule-render",
1669
"warning": null,
1670
},
1671
- Object {
1671
+ {
1672
"componentName": "Example",
1673
"lanes": "0b0000000000000000000000000000010",
1674
"timestamp": 20,
@@ -1711,15 +1711,15 @@ describe('Timeline profiler', () => {
1711
const timelineData = stopProfilingAndGetTimelineData();
1712
expect(timelineData.batchUIDToMeasuresMap.size).toBe(2);
1713
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1714
- Array [
1715
- Object {
1714
+ [
1715
+ {
1716
"componentName": "Example",
1717
"duration": 10,
1718
"timestamp": 10,
1719
"type": "render",
1720
"warning": null,
1721
},
1722
- Object {
1722
+ {
1723
"componentName": "Example",
1724
"duration": 10,
1725
"timestamp": 20,
@@ -1729,14 +1729,14 @@ describe('Timeline profiler', () => {
1729
]
1730
`);
1731
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1732
- Array [
1733
- Object {
1732
+ [
1733
+ {
1734
"lanes": "0b0000000000000000000000000100000",
1735
"timestamp": 10,
1736
"type": "schedule-render",
1737
"warning": null,
1738
},
1739
- Object {
1739
+ {
1740
"componentName": "Example",
1741
"componentStack": "
1742
in Example (at **)",
@@ -1780,15 +1780,15 @@ describe('Timeline profiler', () => {
1780
const timelineData = stopProfilingAndGetTimelineData();
1781
expect(timelineData.batchUIDToMeasuresMap.size).toBe(2);
1782
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1783
- Array [
1784
- Object {
1783
+ [
1784
+ {
1785
"componentName": "Example",
1786
"duration": 10,
1787
"timestamp": 10,
1788
"type": "render",
1789
"warning": null,
1790
},
1791
- Object {
1791
+ {
1792
"componentName": "Example",
1793
"duration": 10,
1794
"timestamp": 20,
@@ -1798,14 +1798,14 @@ describe('Timeline profiler', () => {
1798
]
1799
`);
1800
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1801
- Array [
1802
- Object {
1801
+ [
1802
+ {
1803
"lanes": "0b0000000000000000000000000100000",
1804
"timestamp": 10,
1805
"type": "schedule-render",
1806
"warning": null,
1807
},
1808
- Object {
1808
+ {
1809
"componentName": "Example",
1810
"lanes": "0b0000000000000000000000000100000",
1811
"timestamp": 20,
@@ -1835,22 +1835,22 @@ describe('Timeline profiler', () => {
1835
const timelineData = stopProfilingAndGetTimelineData();
1836
expect(timelineData.batchUIDToMeasuresMap.size).toBe(2);
1837
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1838
- Array [
1839
- Object {
1838
+ [
1839
+ {
1840
"componentName": "Example",
1841
"duration": 10,
1842
"timestamp": 10,
1843
"type": "render",
1844
"warning": null,
1845
},
1846
- Object {
1846
+ {
1847
"componentName": "Example",
1848
"duration": 1,
1849
"timestamp": 20,
1850
"type": "layout-effect-mount",
1851
"warning": null,
1852
},
1853
- Object {
1853
+ {
1854
"componentName": "Example",
1855
"duration": 10,
1856
"timestamp": 21,
@@ -1860,14 +1860,14 @@ describe('Timeline profiler', () => {
1860
]
1861
`);
1862
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1863
- Array [
1864
- Object {
1863
+ [
1864
+ {
1865
"lanes": "0b0000000000000000000000000100000",
1866
"timestamp": 10,
1867
"type": "schedule-render",
1868
"warning": null,
1869
},
1870
- Object {
1870
+ {
1871
"componentName": "Example",
1872
"componentStack": "
1873
in Example (at **)",
@@ -1898,22 +1898,22 @@ describe('Timeline profiler', () => {
1898
const timelineData = stopProfilingAndGetTimelineData();
1899
expect(timelineData.batchUIDToMeasuresMap.size).toBe(2);
1900
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1901
- Array [
1902
- Object {
1901
+ [
1902
+ {
1903
"componentName": "Example",
1904
"duration": 10,
1905
"timestamp": 10,
1906
"type": "render",
1907
"warning": null,
1908
},
1909
- Object {
1909
+ {
1910
"componentName": "Example",
1911
"duration": 1,
1912
"timestamp": 20,
1913
"type": "passive-effect-mount",
1914
"warning": null,
1915
},
1916
- Object {
1916
+ {
1917
"componentName": "Example",
1918
"duration": 10,
1919
"timestamp": 21,
@@ -1923,14 +1923,14 @@ describe('Timeline profiler', () => {
1923
]
1924
`);
1925
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1926
- Array [
1927
- Object {
1926
+ [
1927
+ {
1928
"lanes": "0b0000000000000000000000000100000",
1929
"timestamp": 10,
1930
"type": "schedule-render",
1931
"warning": null,
1932
},
1933
- Object {
1933
+ {
1934
"componentName": "Example",
1935
"componentStack": "
1936
in Example (at **)",
@@ -1961,8 +1961,8 @@ describe('Timeline profiler', () => {
1961
// Render phase updates should be retried as part of the same batch.
1962
expect(timelineData.batchUIDToMeasuresMap.size).toBe(1);
1963
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
1964
- Array [
1965
- Object {
1964
+ [
1965
+ {
1966
"componentName": "Example",
1967
"duration": 20,
1968
"timestamp": 10,
@@ -1972,14 +1972,14 @@ describe('Timeline profiler', () => {
1972
]
1973
`);
1974
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
1975
- Array [
1976
- Object {
1975
+ [
1976
+ {
1977
"lanes": "0b0000000000000000000000000100000",
1978
"timestamp": 10,
1979
"type": "schedule-render",
1980
"warning": null,
1981
},
1982
- Object {
1982
+ {
1983
"componentName": "Example",
1984
"componentStack": "
1985
in Example (at **)",
@@ -2031,22 +2031,22 @@ describe('Timeline profiler', () => {
2031
2032
const timelineData = stopProfilingAndGetTimelineData();
2033
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
2034
- Array [
2035
- Object {
2034
+ [
2035
+ {
2036
"componentName": "ErrorBoundary",
2037
"duration": 10,
2038
"timestamp": 10,
2039
"type": "render",
2040
"warning": null,
2041
},
2042
- Object {
2042
+ {
2043
"componentName": "ExampleThatThrows",
2044
"duration": 0,
2045
"timestamp": 20,
2046
"type": "render",
2047
"warning": null,
2048
},
2049
- Object {
2049
+ {
2050
"componentName": "ErrorBoundary",
2051
"duration": 10,
2052
"timestamp": 20,
@@ -2056,14 +2056,14 @@ describe('Timeline profiler', () => {
2056
]
2057
`);
2058
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
2059
- Array [
2060
- Object {
2059
+ [
2060
+ {
2061
"lanes": "0b0000000000000000000000000000010",
2062
"timestamp": 10,
2063
"type": "schedule-render",
2064
"warning": null,
2065
},
2066
- Object {
2066
+ {
2067
"componentName": "ErrorBoundary",
2068
"componentStack": "
2069
in ErrorBoundary (at **)",
@@ -2075,8 +2075,8 @@ describe('Timeline profiler', () => {
2075
]
2076
`);
2077
expect(timelineData.thrownErrors).toMatchInlineSnapshot(`
2078
- Array [
2079
- Object {
2078
+ [
2079
+ {
2080
"componentName": "ExampleThatThrows",
2081
"message": "Expected error",
2082
"phase": "mount",
@@ -2130,36 +2130,36 @@ describe('Timeline profiler', () => {
2130
2131
const timelineData = stopProfilingAndGetTimelineData();
2132
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
2133
- Array [
2134
- Object {
2133
+ [
2134
+ {
2135
"componentName": "ErrorBoundary",
2136
"duration": 10,
2137
"timestamp": 10,
2138
"type": "render",
2139
"warning": null,
2140
},
2141
- Object {
2141
+ {
2142
"componentName": "ExampleThatThrows",
2143
"duration": 0,
2144
"timestamp": 20,
2145
"type": "render",
2146
"warning": null,
2147
},
2148
- Object {
2148
+ {
2149
"componentName": "ErrorBoundary",
2150
"duration": 10,
2151
"timestamp": 20,
2152
"type": "render",
2153
"warning": null,
2154
},
2155
- Object {
2155
+ {
2156
"componentName": "ExampleThatThrows",
2157
"duration": 0,
2158
"timestamp": 30,
2159
"type": "render",
2160
"warning": null,
2161
},
2162
- Object {
2162
+ {
2163
"componentName": "ErrorBoundary",
2164
"duration": 10,
2165
"timestamp": 30,
@@ -2169,14 +2169,14 @@ describe('Timeline profiler', () => {
2169
]
2170
`);
2171
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
2172
- Array [
2173
- Object {
2172
+ [
2173
+ {
2174
"lanes": "0b0000000000000000000000000100000",
2175
"timestamp": 10,
2176
"type": "schedule-render",
2177
"warning": null,
2178
},
2179
- Object {
2179
+ {
2180
"componentName": "ErrorBoundary",
2181
"componentStack": "
2182
in ErrorBoundary (at **)",
@@ -2188,15 +2188,15 @@ describe('Timeline profiler', () => {
2188
]
2189
`);
2190
expect(timelineData.thrownErrors).toMatchInlineSnapshot(`
2191
- Array [
2192
- Object {
2191
+ [
2192
+ {
2193
"componentName": "ExampleThatThrows",
2194
"message": "Expected error",
2195
"phase": "mount",
2196
"timestamp": 20,
2197
"type": "thrown-error",
2198
},
2199
- Object {
2199
+ {
2200
"componentName": "ExampleThatThrows",
2201
"message": "Expected error",
2202
"phase": "mount",
@@ -2274,78 +2274,78 @@ describe('Timeline profiler', () => {
2274
2275
const timelineData = stopProfilingAndGetTimelineData();
2276
expect(timelineData.componentMeasures).toMatchInlineSnapshot(`
2277
- Array [
2278
- Object {
2277
+ [
2278
+ {
2279
"componentName": "ComponentWithEffects",
2280
"duration": 0,
2281
"timestamp": 10,
2282
"type": "render",
2283
"warning": null,
2284
},
2285
- Object {
2285
+ {
2286
"componentName": "ComponentWithEffects",
2287
"duration": 0,
2288
"timestamp": 10,
2289
"type": "layout-effect-mount",
2290
"warning": null,
2291
},
2292
- Object {
2292
+ {
2293
"componentName": "ComponentWithEffects",
2294
"duration": 0,
2295
"timestamp": 10,
2296
"type": "layout-effect-mount",
2297
"warning": null,
2298
},
2299
- Object {
2299
+ {
2300
"componentName": "ComponentWithEffects",
2301
"duration": 0,
2302
"timestamp": 10,
2303
"type": "passive-effect-mount",
2304
"warning": null,
2305
},
2306
- Object {
2306
+ {
2307
"componentName": "ComponentWithEffects",
2308
"duration": 0,
2309
"timestamp": 10,
2310
"type": "passive-effect-mount",
2311
"warning": null,
2312
},
2313
- Object {
2313
+ {
2314
"componentName": "ComponentWithEffects",
2315
"duration": 0,
2316
"timestamp": 10,
2317
"type": "passive-effect-mount",
2318
"warning": null,
2319
},
2320
- Object {
2320
+ {
2321
"componentName": "ComponentWithEffects",
2322
"duration": 0,
2323
"timestamp": 10,
2324
"type": "layout-effect-unmount",
2325
"warning": null,
2326
},
2327
- Object {
2327
+ {
2328
"componentName": "ComponentWithEffects",
2329
"duration": 0,
2330
"timestamp": 10,
2331
"type": "layout-effect-unmount",
2332
"warning": null,
2333
},
2334
- Object {
2334
+ {
2335
"componentName": "ComponentWithEffects",
2336
"duration": 0,
2337
"timestamp": 10,
2338
"type": "passive-effect-unmount",
2339
"warning": null,
2340
},
2341
- Object {
2341
+ {
2342
"componentName": "ComponentWithEffects",
2343
"duration": 0,
2344
"timestamp": 10,
2345
"type": "passive-effect-unmount",
2346
"warning": null,
2347
},
2348
- Object {
2348
+ {
2349
"componentName": "ComponentWithEffects",
2350
"duration": 0,
2351
"timestamp": 10,
@@ -2356,8 +2356,8 @@ describe('Timeline profiler', () => {
2356
`);
2357
expect(timelineData.batchUIDToMeasuresMap).toMatchInlineSnapshot(`
2358
Map {
2359
- 1 => Array [
2360
- Object {
2359
+ 1 => [
2360
+ {
2361
"batchUID": 1,
2362
"depth": 0,
2363
"duration": 0,
@@ -2365,7 +2365,7 @@ describe('Timeline profiler', () => {
2365
"timestamp": 10,
2366
"type": "render-idle",
2367
},
2368
- Object {
2368
+ {
2369
"batchUID": 1,
2370
"depth": 0,
2371
"duration": 0,
@@ -2373,7 +2373,7 @@ describe('Timeline profiler', () => {
2373
"timestamp": 10,
2374
"type": "render",
2375
},
2376
- Object {
2376
+ {
2377
"batchUID": 1,
2378
"depth": 0,
2379
"duration": 0,
@@ -2381,7 +2381,7 @@ describe('Timeline profiler', () => {
2381
"timestamp": 10,
2382
"type": "commit",
2383
},
2384
- Object {
2384
+ {
2385
"batchUID": 1,
2386
"depth": 1,
2387
"duration": 0,
@@ -2389,7 +2389,7 @@ describe('Timeline profiler', () => {
2389
"timestamp": 10,
2390
"type": "layout-effects",
2391
},
2392
- Object {
2392
+ {
2393
"batchUID": 1,
2394
"depth": 0,
2395
"duration": 0,
@@ -2398,8 +2398,8 @@ describe('Timeline profiler', () => {
2398
"type": "passive-effects",
2399
},
2400
],
2401
- 2 => Array [
2402
- Object {
2401
+ 2 => [
2402
+ {
2403
"batchUID": 2,
2404
"depth": 0,
2405
"duration": 0,
@@ -2407,7 +2407,7 @@ describe('Timeline profiler', () => {
2407
"timestamp": 10,
2408
"type": "render-idle",
2409
},
2410
- Object {
2410
+ {
2411
"batchUID": 2,
2412
"depth": 0,
2413
"duration": 0,
@@ -2415,7 +2415,7 @@ describe('Timeline profiler', () => {
2415
"timestamp": 10,
2416
"type": "render",
2417
},
2418
- Object {
2418
+ {
2419
"batchUID": 2,
2420
"depth": 0,
2421
"duration": 0,
@@ -2423,7 +2423,7 @@ describe('Timeline profiler', () => {
2423
"timestamp": 10,
2424
"type": "commit",
2425
},
2426
- Object {
2426
+ {
2427
"batchUID": 2,
2428
"depth": 1,
2429
"duration": 0,
@@ -2431,7 +2431,7 @@ describe('Timeline profiler', () => {
2431
"timestamp": 10,
2432
"type": "layout-effects",
2433
},
2434
- Object {
2434
+ {
2435
"batchUID": 2,
2436
"depth": 1,
2437
"duration": 0,
@@ -2469,14 +2469,14 @@ describe('Timeline profiler', () => {
2469
2470
const timelineData = stopProfilingAndGetTimelineData();
2471
expect(timelineData.schedulingEvents).toMatchInlineSnapshot(`
2472
- Array [
2473
- Object {
2472
+ [
2473
+ {
2474
"lanes": "0b0000000000000000000000000100000",
2475
"timestamp": 10,
2476
"type": "schedule-render",
2477
"warning": null,
2478
},
2479
- Object {
2479
+ {
2480
"componentName": "Child",
2481
"componentStack": "
2482
in Child (at **)
packages/react-devtools-shared/src/__tests__/inspectedElement-test.js
+215
-215
@@ -186,12 +186,12 @@ describe('InspectedElement', () => {
186
187
const inspectedElement = await inspectElementAtIndex(0);
188
expect(inspectedElement).toMatchInlineSnapshot(`
189
- Object {
189
+ {
190
"context": null,
191
"events": undefined,
192
- "hooks": Array [
193
- Object {
194
- "hookSource": Object {
192
+ "hooks": [
193
+ {
194
+ "hookSource": {
195
"columnNumber": "removed by Jest serializer",
196
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
197
"functionName": "Example",
@@ -200,13 +200,13 @@ describe('InspectedElement', () => {
200
"id": 0,
201
"isStateEditable": true,
202
"name": "State",
203
- "subHooks": Array [],
203
+ "subHooks": [],
204
"value": 1,
205
},
206
],
207
"id": 2,
208
"owners": null,
209
- "props": Object {
209
+ "props": {
210
"a": 1,
211
"b": "abc",
212
},
@@ -330,7 +330,7 @@ describe('InspectedElement', () => {
330
331
let inspectedElement = await inspectElementAtIndex(0);
332
expect(inspectedElement.props).toMatchInlineSnapshot(`
333
- Object {
333
+ {
334
"a": 1,
335
"b": "abc",
336
}
@@ -353,7 +353,7 @@ describe('InspectedElement', () => {
353
354
inspectedElement = await inspectElementAtIndex(0);
355
expect(inspectedElement.props).toMatchInlineSnapshot(`
356
- Object {
356
+ {
357
"a": 2,
358
"b": "def",
359
}
@@ -386,7 +386,7 @@ describe('InspectedElement', () => {
386
let inspectedElement = await inspectElementAtIndex(1);
387
expect(targetRenderCount).toBe(1);
388
expect(inspectedElement.props).toMatchInlineSnapshot(`
389
- Object {
389
+ {
390
"a": 1,
391
"b": "abc",
392
}
@@ -416,7 +416,7 @@ describe('InspectedElement', () => {
416
inspectedElement = await inspectElementAtIndex(1);
417
expect(targetRenderCount).toBe(2);
418
expect(inspectedElement.props).toMatchInlineSnapshot(`
419
- Object {
419
+ {
420
"a": 2,
421
"b": "def",
422
}
@@ -450,7 +450,7 @@ describe('InspectedElement', () => {
450
let inspectedElement = await inspectElementAtIndex(1);
451
expect(targetRenderCount).toBe(1);
452
expect(inspectedElement.props).toMatchInlineSnapshot(`
453
- Object {
453
+ {
454
"a": 1,
455
"b": "abc",
456
}
@@ -557,7 +557,7 @@ describe('InspectedElement', () => {
557
const inspectedElement = await inspectElementAtIndex(0);
558
559
expect(inspectedElement.props).toMatchInlineSnapshot(`
560
- Object {
560
+ {
561
"boolean_false": false,
562
"boolean_true": true,
563
"float": 1.23,
@@ -657,7 +657,7 @@ describe('InspectedElement', () => {
657
const inspectedElement = await inspectElementAtIndex(0);
658
659
expect(inspectedElement.props).toMatchInlineSnapshot(`
660
- Object {
660
+ {
661
"anonymous_fn": Dehydrated {
662
"preview_short": ƒ () {},
663
"preview_long": ƒ () {},
@@ -666,7 +666,7 @@ describe('InspectedElement', () => {
666
"preview_short": ArrayBuffer(3),
667
"preview_long": ArrayBuffer(3),
668
},
669
- "array_of_arrays": Array [
669
+ "array_of_arrays": [
670
Dehydrated {
671
"preview_short": Array(2),
672
"preview_long": [Array(3), Array(0)],
@@ -696,7 +696,7 @@ describe('InspectedElement', () => {
696
"preview_short": <div />,
697
"preview_long": <div />,
698
},
699
- "immutable": Object {
699
+ "immutable": {
700
"0": Dehydrated {
701
"preview_short": Array(2),
702
"preview_long": ["a", List(3)],
@@ -710,7 +710,7 @@ describe('InspectedElement', () => {
710
"preview_long": ["c", Map(2)],
711
},
712
},
713
- "map": Object {
713
+ "map": {
714
"0": Dehydrated {
715
"preview_short": Array(2),
716
"preview_long": ["name", "Brian"],
@@ -720,7 +720,7 @@ describe('InspectedElement', () => {
720
"preview_long": ["food", "sushi"],
721
},
722
},
723
- "map_of_maps": Object {
723
+ "map_of_maps": {
724
"0": Dehydrated {
725
"preview_short": Array(2),
726
"preview_long": ["first", Map(2)],
@@ -730,13 +730,13 @@ describe('InspectedElement', () => {
730
"preview_long": ["second", Map(2)],
731
},
732
},
733
- "object_of_objects": Object {
733
+ "object_of_objects": {
734
"inner": Dehydrated {
735
"preview_short": {…},
736
"preview_long": {boolean: true, number: 123, string: "abc"},
737
},
738
},
739
- "object_with_symbol": Object {
739
+ "object_with_symbol": {
740
"Symbol(name)": "hello",
741
},
742
"proxy": Dehydrated {
@@ -751,11 +751,11 @@ describe('InspectedElement', () => {
751
"preview_short": /abc/giu,
752
"preview_long": /abc/giu,
753
},
754
- "set": Object {
754
+ "set": {
755
"0": "abc",
756
"1": 123,
757
},
758
- "set_of_sets": Object {
758
+ "set_of_sets": {
759
"0": Dehydrated {
760
"preview_short": Set(3),
761
"preview_long": Set(3) {"a", "b", "c"},
@@ -769,7 +769,7 @@ describe('InspectedElement', () => {
769
"preview_short": Symbol(symbol),
770
"preview_long": Symbol(symbol),
771
},
772
- "typed_array": Object {
772
+ "typed_array": {
773
"0": 100,
774
"1": -100,
775
"2": 0,
@@ -794,7 +794,7 @@ describe('InspectedElement', () => {
794
795
const inspectedElement = await inspectElementAtIndex(0);
796
expect(inspectedElement.props).toMatchInlineSnapshot(`
797
- Object {
797
+ {
798
"prop": Dehydrated {
799
"preview_short": Generator,
800
"preview_long": Generator,
@@ -818,8 +818,8 @@ describe('InspectedElement', () => {
818
819
const inspectedElement = await inspectElementAtIndex(0);
820
expect(inspectedElement.props).toMatchInlineSnapshot(`
821
- Object {
822
- "object": Object {
821
+ {
822
+ "object": {
823
"boolean": true,
824
"number": 123,
825
"string": "abc",
@@ -844,8 +844,8 @@ describe('InspectedElement', () => {
844
const inspectedElement = await inspectElementAtIndex(0);
845
846
expect(inspectedElement.props).toMatchInlineSnapshot(`
847
- Object {
848
- "object": Object {
847
+ {
848
+ "object": {
849
"hasOwnProperty": true,
850
"name": "blah",
851
},
@@ -880,8 +880,8 @@ describe('InspectedElement', () => {
880
881
const inspectedElement = await inspectElementAtIndex(0);
882
expect(inspectedElement.props).toMatchInlineSnapshot(`
883
- Object {
884
- "data": Object {
883
+ {
884
+ "data": {
885
"_number": 42,
886
"number": 42,
887
},
@@ -959,8 +959,8 @@ describe('InspectedElement', () => {
959
960
const inspectedElement = await inspectElementAtIndex(0);
961
expect(inspectedElement.props).toMatchInlineSnapshot(`
962
- Object {
963
- "object": Object {
962
+ {
963
+ "object": {
964
"123": 3,
965
"Symbol(enumerableSymbol)": 3,
966
"Symbol(enumerableSymbolBase)": 1,
@@ -1014,8 +1014,8 @@ describe('InspectedElement', () => {
1014
1015
const inspectedElement = await inspectElementAtIndex(0);
1016
expect(inspectedElement.props).toMatchInlineSnapshot(`
1017
- Object {
1018
- "data": Object {
1017
+ {
1018
+ "data": {
1019
"a": undefined,
1020
"b": Infinity,
1021
"c": NaN,
@@ -1080,8 +1080,8 @@ describe('InspectedElement', () => {
1080
}
1081
1082
expect(inspectedElement.props).toMatchInlineSnapshot(`
1083
- Object {
1084
- "nestedObject": Object {
1083
+ {
1084
+ "nestedObject": {
1085
"a": Dehydrated {
1086
"preview_short": {…},
1087
"preview_long": {b: {…}},
@@ -1093,10 +1093,10 @@ describe('InspectedElement', () => {
1093
await loadPath(['props', 'nestedObject', 'a']);
1094
1095
expect(inspectedElement.props).toMatchInlineSnapshot(`
1096
- Object {
1097
- "nestedObject": Object {
1098
- "a": Object {
1099
- "b": Object {
1096
+ {
1097
+ "nestedObject": {
1098
+ "a": {
1099
+ "b": {
1100
"c": Dehydrated {
1101
"preview_short": Array(1),
1102
"preview_long": [{…}],
@@ -1110,12 +1110,12 @@ describe('InspectedElement', () => {
1110
await loadPath(['props', 'nestedObject', 'a', 'b', 'c']);
1111
1112
expect(inspectedElement.props).toMatchInlineSnapshot(`
1113
- Object {
1114
- "nestedObject": Object {
1115
- "a": Object {
1116
- "b": Object {
1117
- "c": Array [
1118
- Object {
1113
+ {
1114
+ "nestedObject": {
1115
+ "a": {
1116
+ "b": {
1117
+ "c": [
1118
+ {
1119
"d": Dehydrated {
1120
"preview_short": {…},
1121
"preview_long": {e: {…}},
@@ -1131,14 +1131,14 @@ describe('InspectedElement', () => {
1131
await loadPath(['props', 'nestedObject', 'a', 'b', 'c', 0, 'd']);
1132
1133
expect(inspectedElement.props).toMatchInlineSnapshot(`
1134
- Object {
1135
- "nestedObject": Object {
1136
- "a": Object {
1137
- "b": Object {
1138
- "c": Array [
1139
- Object {
1140
- "d": Object {
1141
- "e": Object {},
1134
+ {
1135
+ "nestedObject": {
1136
+ "a": {
1137
+ "b": {
1138
+ "c": [
1139
+ {
1140
+ "d": {
1141
+ "e": {},
1142
},
1143
},
1144
],
@@ -1151,9 +1151,9 @@ describe('InspectedElement', () => {
1151
await loadPath(['hooks', 0, 'value']);
1152
1153
expect(inspectedElement.hooks).toMatchInlineSnapshot(`
1154
- Array [
1155
- Object {
1156
- "hookSource": Object {
1154
+ [
1155
+ {
1156
+ "hookSource": {
1157
"columnNumber": "removed by Jest serializer",
1158
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
1159
"functionName": "Example",
@@ -1162,9 +1162,9 @@ describe('InspectedElement', () => {
1162
"id": 0,
1163
"isStateEditable": true,
1164
"name": "State",
1165
- "subHooks": Array [],
1166
- "value": Object {
1167
- "foo": Object {
1165
+ "subHooks": [],
1166
+ "value": {
1167
+ "foo": {
1168
"bar": Dehydrated {
1169
"preview_short": {…},
1170
"preview_long": {baz: "hi"},
@@ -1178,9 +1178,9 @@ describe('InspectedElement', () => {
1178
await loadPath(['hooks', 0, 'value', 'foo', 'bar']);
1179
1180
expect(inspectedElement.hooks).toMatchInlineSnapshot(`
1181
- Array [
1182
- Object {
1183
- "hookSource": Object {
1181
+ [
1182
+ {
1183
+ "hookSource": {
1184
"columnNumber": "removed by Jest serializer",
1185
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
1186
"functionName": "Example",
@@ -1189,10 +1189,10 @@ describe('InspectedElement', () => {
1189
"id": 0,
1190
"isStateEditable": true,
1191
"name": "State",
1192
- "subHooks": Array [],
1193
- "value": Object {
1194
- "foo": Object {
1195
- "bar": Object {
1192
+ "subHooks": [],
1193
+ "value": {
1194
+ "foo": {
1195
+ "bar": {
1196
"baz": "hi",
1197
},
1198
},
@@ -1235,8 +1235,8 @@ describe('InspectedElement', () => {
1235
}
1236
1237
expect(inspectedElement.props).toMatchInlineSnapshot(`
1238
- Object {
1239
- "set_of_sets": Object {
1238
+ {
1239
+ "set_of_sets": {
1240
"0": Dehydrated {
1241
"preview_short": Set(3),
1242
"preview_long": Set(3) {1, 2, 3},
@@ -1252,9 +1252,9 @@ describe('InspectedElement', () => {
1252
await loadPath(['props', 'set_of_sets', 0]);
1253
1254
expect(inspectedElement.props).toMatchInlineSnapshot(`
1255
- Object {
1256
- "set_of_sets": Object {
1257
- "0": Object {
1255
+ {
1256
+ "set_of_sets": {
1257
+ "0": {
1258
"0": 1,
1259
"1": 2,
1260
"2": 3,
@@ -1317,8 +1317,8 @@ describe('InspectedElement', () => {
1317
}
1318
1319
expect(inspectedElement.props).toMatchInlineSnapshot(`
1320
- Object {
1321
- "nestedObject": Object {
1320
+ {
1321
+ "nestedObject": {
1322
"a": Dehydrated {
1323
"preview_short": {…},
1324
"preview_long": {b: {…}, value: 1},
@@ -1334,10 +1334,10 @@ describe('InspectedElement', () => {
1334
await loadPath(['props', 'nestedObject', 'a']);
1335
1336
expect(inspectedElement.props).toMatchInlineSnapshot(`
1337
- Object {
1338
- "nestedObject": Object {
1339
- "a": Object {
1340
- "b": Object {
1337
+ {
1338
+ "nestedObject": {
1339
+ "a": {
1340
+ "b": {
1341
"value": 1,
1342
},
1343
"value": 1,
@@ -1353,16 +1353,16 @@ describe('InspectedElement', () => {
1353
await loadPath(['props', 'nestedObject', 'c']);
1354
1355
expect(inspectedElement.props).toMatchInlineSnapshot(`
1356
- Object {
1357
- "nestedObject": Object {
1358
- "a": Object {
1359
- "b": Object {
1356
+ {
1357
+ "nestedObject": {
1358
+ "a": {
1359
+ "b": {
1360
"value": 1,
1361
},
1362
"value": 1,
1363
},
1364
- "c": Object {
1365
- "d": Object {
1364
+ "c": {
1365
+ "d": {
1366
"e": Dehydrated {
1367
"preview_short": {…},
1368
"preview_long": {value: 1},
@@ -1408,16 +1408,16 @@ describe('InspectedElement', () => {
1408
inspectedElement = await inspectElementAtIndex(0);
1409
1410
expect(inspectedElement.props).toMatchInlineSnapshot(`
1411
- Object {
1412
- "nestedObject": Object {
1413
- "a": Object {
1414
- "b": Object {
1411
+ {
1412
+ "nestedObject": {
1413
+ "a": {
1414
+ "b": {
1415
"value": 2,
1416
},
1417
"value": 2,
1418
},
1419
- "c": Object {
1420
- "d": Object {
1419
+ "c": {
1420
+ "d": {
1421
"e": Dehydrated {
1422
"preview_short": {…},
1423
"preview_long": {value: 2},
@@ -1480,8 +1480,8 @@ describe('InspectedElement', () => {
1480
}
1481
1482
expect(inspectedElement.props).toMatchInlineSnapshot(`
1483
- Object {
1484
- "nestedObject": Object {
1483
+ {
1484
+ "nestedObject": {
1485
"a": Dehydrated {
1486
"preview_short": {…},
1487
"preview_long": {b: {…}, value: 1},
@@ -1497,10 +1497,10 @@ describe('InspectedElement', () => {
1497
await loadPath(['props', 'nestedObject', 'a']);
1498
1499
expect(inspectedElement.props).toMatchInlineSnapshot(`
1500
- Object {
1501
- "nestedObject": Object {
1502
- "a": Object {
1503
- "b": Object {
1500
+ {
1501
+ "nestedObject": {
1502
+ "a": {
1503
+ "b": {
1504
"value": 1,
1505
},
1506
"value": 1,
@@ -1543,16 +1543,16 @@ describe('InspectedElement', () => {
1543
await loadPath(['props', 'nestedObject', 'c']);
1544
1545
expect(inspectedElement.props).toMatchInlineSnapshot(`
1546
- Object {
1547
- "nestedObject": Object {
1548
- "a": Object {
1549
- "b": Object {
1546
+ {
1547
+ "nestedObject": {
1548
+ "a": {
1549
+ "b": {
1550
"value": 2,
1551
},
1552
"value": 2,
1553
},
1554
- "c": Object {
1555
- "d": Object {
1554
+ "c": {
1555
+ "d": {
1556
"e": Dehydrated {
1557
"preview_short": {…},
1558
"preview_long": {value: 2},
@@ -1607,8 +1607,8 @@ describe('InspectedElement', () => {
1607
}
1608
1609
expect(inspectedElement.props).toMatchInlineSnapshot(`
1610
- Object {
1611
- "nestedObject": Object {
1610
+ {
1611
+ "nestedObject": {
1612
"a": Dehydrated {
1613
"preview_short": {…},
1614
"preview_long": {b: {…}, value: 1},
@@ -1638,10 +1638,10 @@ describe('InspectedElement', () => {
1638
await loadPath(['props', 'nestedObject', 'a']);
1639
1640
expect(inspectedElement.props).toMatchInlineSnapshot(`
1641
- Object {
1642
- "nestedObject": Object {
1643
- "a": Object {
1644
- "b": Object {
1641
+ {
1642
+ "nestedObject": {
1643
+ "a": {
1644
+ "b": {
1645
"value": 2,
1646
},
1647
"value": 2,
@@ -1666,12 +1666,12 @@ describe('InspectedElement', () => {
1666
1667
const inspectedElement = await inspectElementAtIndex(0);
1668
expect(inspectedElement).toMatchInlineSnapshot(`
1669
- Object {
1669
+ {
1670
"context": null,
1671
"events": undefined,
1672
- "hooks": Array [
1673
- Object {
1674
- "hookSource": Object {
1672
+ "hooks": [
1673
+ {
1674
+ "hookSource": {
1675
"columnNumber": "removed by Jest serializer",
1676
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
1677
"functionName": "Example",
@@ -1680,13 +1680,13 @@ describe('InspectedElement', () => {
1680
"id": null,
1681
"isStateEditable": false,
1682
"name": "Context",
1683
- "subHooks": Array [],
1683
+ "subHooks": [],
1684
"value": true,
1685
},
1686
],
1687
"id": 2,
1688
"owners": null,
1689
- "props": Object {
1689
+ "props": {
1690
"a": 1,
1691
"b": "abc",
1692
},
@@ -1930,9 +1930,9 @@ describe('InspectedElement', () => {
1930
1931
const {hooks} = await inspectElementAtIndex(0);
1932
expect(hooks).toMatchInlineSnapshot(`
1933
- Array [
1934
- Object {
1935
- "hookSource": Object {
1933
+ [
1934
+ {
1935
+ "hookSource": {
1936
"columnNumber": "removed by Jest serializer",
1937
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
1938
"functionName": "DisplayedComplexValue",
@@ -1941,9 +1941,9 @@ describe('InspectedElement', () => {
1941
"id": null,
1942
"isStateEditable": false,
1943
"name": "DebuggableHook",
1944
- "subHooks": Array [
1945
- Object {
1946
- "hookSource": Object {
1944
+ "subHooks": [
1945
+ {
1946
+ "hookSource": {
1947
"columnNumber": "removed by Jest serializer",
1948
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
1949
"functionName": "useDebuggableHook",
@@ -1952,11 +1952,11 @@ describe('InspectedElement', () => {
1952
"id": 0,
1953
"isStateEditable": true,
1954
"name": "State",
1955
- "subHooks": Array [],
1955
+ "subHooks": [],
1956
"value": 1,
1957
},
1958
],
1959
- "value": Object {
1959
+ "value": {
1960
"foo": 2,
1961
},
1962
},
@@ -1985,8 +1985,8 @@ describe('InspectedElement', () => {
1985
const inspectedElement = await inspectElementAtIndex(0);
1986
1987
expect(inspectedElement.props).toMatchInlineSnapshot(`
1988
- Object {
1989
- "proxy": Object {
1988
+ {
1989
+ "proxy": {
1990
"$$typeof": Dehydrated {
1991
"preview_short": ƒ () {},
1992
"preview_long": ƒ () {},
@@ -2014,13 +2014,13 @@ describe('InspectedElement', () => {
2014
// Select/inspect element
2015
let inspectedElement = await inspectElementAtIndex(0);
2016
expect(inspectedElement).toMatchInlineSnapshot(`
2017
- Object {
2017
+ {
2018
"context": null,
2019
"events": undefined,
2020
"hooks": null,
2021
"id": 2,
2022
"owners": null,
2023
- "props": Object {},
2023
+ "props": {},
2024
"rootType": "render()",
2025
"state": null,
2026
}
@@ -2052,13 +2052,13 @@ describe('InspectedElement', () => {
2052
// Select/inspect the same element again
2053
inspectedElement = await inspectElementAtIndex(0);
2054
expect(inspectedElement).toMatchInlineSnapshot(`
2055
- Object {
2055
+ {
2056
"context": null,
2057
"events": undefined,
2058
"hooks": null,
2059
"id": 2,
2060
"owners": null,
2061
- "props": Object {},
2061
+ "props": {},
2062
"rootType": "render()",
2063
"state": null,
2064
}
@@ -2166,10 +2166,10 @@ describe('InspectedElement', () => {
2166
await inspectElementAtIndex(0);
2167
2168
expect(global.$r).toMatchInlineSnapshot(`
2169
- Object {
2170
- "hooks": Array [
2171
- Object {
2172
- "hookSource": Object {
2169
+ {
2170
+ "hooks": [
2171
+ {
2172
+ "hookSource": {
2173
"columnNumber": "removed by Jest serializer",
2174
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
2175
"functionName": "Example",
@@ -2178,11 +2178,11 @@ describe('InspectedElement', () => {
2178
"id": 0,
2179
"isStateEditable": true,
2180
"name": "State",
2181
- "subHooks": Array [],
2181
+ "subHooks": [],
2182
"value": 1,
2183
},
2184
],
2185
- "props": Object {
2185
+ "props": {
2186
"a": 1,
2187
"b": "abc",
2188
},
@@ -2205,10 +2205,10 @@ describe('InspectedElement', () => {
2205
await inspectElementAtIndex(0);
2206
2207
expect(global.$r).toMatchInlineSnapshot(`
2208
- Object {
2209
- "hooks": Array [
2210
- Object {
2211
- "hookSource": Object {
2208
+ {
2209
+ "hooks": [
2210
+ {
2211
+ "hookSource": {
2212
"columnNumber": "removed by Jest serializer",
2213
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
2214
"functionName": "Example",
@@ -2217,11 +2217,11 @@ describe('InspectedElement', () => {
2217
"id": 0,
2218
"isStateEditable": true,
2219
"name": "State",
2220
- "subHooks": Array [],
2220
+ "subHooks": [],
2221
"value": 1,
2222
},
2223
],
2224
- "props": Object {
2224
+ "props": {
2225
"a": 1,
2226
"b": "abc",
2227
},
@@ -2244,10 +2244,10 @@ describe('InspectedElement', () => {
2244
await inspectElementAtIndex(0);
2245
2246
expect(global.$r).toMatchInlineSnapshot(`
2247
- Object {
2248
- "hooks": Array [
2249
- Object {
2250
- "hookSource": Object {
2247
+ {
2248
+ "hooks": [
2249
+ {
2250
+ "hookSource": {
2251
"columnNumber": "removed by Jest serializer",
2252
"fileName": "react-devtools-shared/src/__tests__/inspectedElement-test.js",
2253
"functionName": "Example",
@@ -2256,11 +2256,11 @@ describe('InspectedElement', () => {
2256
"id": 0,
2257
"isStateEditable": true,
2258
"name": "State",
2259
- "subHooks": Array [],
2259
+ "subHooks": [],
2260
"value": 1,
2261
},
2262
],
2263
- "props": Object {
2263
+ "props": {
2264
"a": 1,
2265
"b": "abc",
2266
},
@@ -2287,13 +2287,13 @@ describe('InspectedElement', () => {
2287
await inspectElementAtIndex(0);
2288
2289
expect(global.$r.props).toMatchInlineSnapshot(`
2290
- Object {
2290
+ {
2291
"a": 1,
2292
"b": "abc",
2293
}
2294
`);
2295
expect(global.$r.state).toMatchInlineSnapshot(`
2296
- Object {
2296
+ {
2297
"count": 0,
2298
}
2299
`);
@@ -2354,15 +2354,15 @@ describe('InspectedElement', () => {
2354
2355
const data = await getErrorsAndWarningsForElementAtIndex(0);
2356
expect(data).toMatchInlineSnapshot(`
2357
- Object {
2358
- "errors": Array [
2359
- Array [
2357
+ {
2358
+ "errors": [
2359
+ [
2360
"test-only: render error",
2361
1,
2362
],
2363
],
2364
- "warnings": Array [
2365
- Array [
2364
+ "warnings": [
2365
+ [
2366
"test-only: render warning",
2367
1,
2368
],
@@ -2389,15 +2389,15 @@ describe('InspectedElement', () => {
2389
});
2390
const data = await getErrorsAndWarningsForElementAtIndex(0);
2391
expect(data).toMatchInlineSnapshot(`
2392
- Object {
2393
- "errors": Array [
2394
- Array [
2392
+ {
2393
+ "errors": [
2394
+ [
2395
"test-only: render error",
2396
2,
2397
],
2398
],
2399
- "warnings": Array [
2400
- Array [
2399
+ "warnings": [
2400
+ [
2401
"test-only: render warning",
2402
3,
2403
],
@@ -2426,15 +2426,15 @@ describe('InspectedElement', () => {
2426
2427
const data = await getErrorsAndWarningsForElementAtIndex(0);
2428
expect(data).toMatchInlineSnapshot(`
2429
- Object {
2430
- "errors": Array [
2431
- Array [
2429
+ {
2430
+ "errors": [
2431
+ [
2432
"test-only: useLayoutEffect error",
2433
1,
2434
],
2435
],
2436
- "warnings": Array [
2437
- Array [
2436
+ "warnings": [
2437
+ [
2438
"test-only: useLayoutEffect warning",
2439
1,
2440
],
@@ -2463,15 +2463,15 @@ describe('InspectedElement', () => {
2463
2464
const data = await getErrorsAndWarningsForElementAtIndex(0);
2465
expect(data).toMatchInlineSnapshot(`
2466
- Object {
2467
- "errors": Array [
2468
- Array [
2466
+ {
2467
+ "errors": [
2468
+ [
2469
"test-only: useEffect error",
2470
1,
2471
],
2472
],
2473
- "warnings": Array [
2474
- Array [
2473
+ "warnings": [
2474
+ [
2475
"test-only: useEffect warning",
2476
1,
2477
],
@@ -2497,15 +2497,15 @@ describe('InspectedElement', () => {
2497
2498
const data = await getErrorsAndWarningsForElementAtIndex(0);
2499
expect(data).toMatchInlineSnapshot(`
2500
- Object {
2501
- "errors": Array [
2502
- Array [
2500
+ {
2501
+ "errors": [
2502
+ [
2503
"Warning: Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.
2504
at Example",
2505
1,
2506
],
2507
],
2508
- "warnings": Array [],
2508
+ "warnings": [],
2509
}
2510
`);
2511
});
@@ -2534,9 +2534,9 @@ describe('InspectedElement', () => {
2534
2535
const data = await getErrorsAndWarningsForElementAtIndex(0);
2536
expect(data).toMatchInlineSnapshot(`
2537
- Object {
2538
- "errors": Array [],
2539
- "warnings": Array [],
2537
+ {
2538
+ "errors": [],
2539
+ "warnings": [],
2540
}
2541
`);
2542
});
@@ -2577,29 +2577,29 @@ describe('InspectedElement', () => {
2577
await getErrorsAndWarningsForElementAtIndex(1),
2578
];
2579
expect(data).toMatchInlineSnapshot(`
2580
- Array [
2581
- Object {
2582
- "errors": Array [
2583
- Array [
2580
+ [
2581
+ {
2582
+ "errors": [
2583
+ [
2584
"test-only: render error #1",
2585
1,
2586
],
2587
],
2588
- "warnings": Array [
2589
- Array [
2588
+ "warnings": [
2589
+ [
2590
"test-only: render warning #1",
2591
1,
2592
],
2593
],
2594
},
2595
- Object {
2596
- "errors": Array [
2597
- Array [
2595
+ {
2596
+ "errors": [
2597
+ [
2598
"test-only: render error #2",
2599
1,
2600
],
2601
],
2602
- "warnings": Array [],
2602
+ "warnings": [],
2603
},
2604
]
2605
`);
@@ -2615,24 +2615,24 @@ describe('InspectedElement', () => {
2615
await getErrorsAndWarningsForElementAtIndex(1),
2616
];
2617
expect(data).toMatchInlineSnapshot(`
2618
- Array [
2619
- Object {
2620
- "errors": Array [
2621
- Array [
2618
+ [
2619
+ {
2620
+ "errors": [
2621
+ [
2622
"test-only: render error #1",
2623
1,
2624
],
2625
],
2626
- "warnings": Array [],
2626
+ "warnings": [],
2627
},
2628
- Object {
2629
- "errors": Array [
2630
- Array [
2628
+ {
2629
+ "errors": [
2630
+ [
2631
"test-only: render error #2",
2632
1,
2633
],
2634
],
2635
- "warnings": Array [],
2635
+ "warnings": [],
2636
},
2637
]
2638
`);
@@ -2674,25 +2674,25 @@ describe('InspectedElement', () => {
2674
await getErrorsAndWarningsForElementAtIndex(1),
2675
];
2676
expect(data).toMatchInlineSnapshot(`
2677
- Array [
2678
- Object {
2679
- "errors": Array [
2680
- Array [
2677
+ [
2678
+ {
2679
+ "errors": [
2680
+ [
2681
"test-only: render error #1",
2682
1,
2683
],
2684
],
2685
- "warnings": Array [
2686
- Array [
2685
+ "warnings": [
2686
+ [
2687
"test-only: render warning #1",
2688
1,
2689
],
2690
],
2691
},
2692
- Object {
2693
- "errors": Array [],
2694
- "warnings": Array [
2695
- Array [
2692
+ {
2693
+ "errors": [],
2694
+ "warnings": [
2695
+ [
2696
"test-only: render warning #2",
2697
1,
2698
],
@@ -2712,20 +2712,20 @@ describe('InspectedElement', () => {
2712
await getErrorsAndWarningsForElementAtIndex(1),
2713
];
2714
expect(data).toMatchInlineSnapshot(`
2715
- Array [
2716
- Object {
2717
- "errors": Array [],
2718
- "warnings": Array [
2719
- Array [
2715
+ [
2716
+ {
2717
+ "errors": [],
2718
+ "warnings": [
2719
+ [
2720
"test-only: render warning #1",
2721
1,
2722
],
2723
],
2724
},
2725
- Object {
2726
- "errors": Array [],
2727
- "warnings": Array [
2728
- Array [
2725
+ {
2726
+ "errors": [],
2727
+ "warnings": [
2728
+ [
2729
"test-only: render warning #2",
2730
1,
2731
],
@@ -2773,15 +2773,15 @@ describe('InspectedElement', () => {
2773
2774
const inspectedElement = await inspectElementAtIndex(4);
2775
expect(inspectedElement.owners).toMatchInlineSnapshot(`
2776
- Array [
2777
- Object {
2776
+ [
2777
+ {
2778
"displayName": "Child",
2779
"hocDisplayNames": null,
2780
"id": 3,
2781
"key": null,
2782
"type": 5,
2783
},
2784
- Object {
2784
+ {
2785
"displayName": "App",
2786
"hocDisplayNames": null,
2787
"id": 2,
packages/react-devtools-shared/src/__tests__/legacy/inspectElement-test.js
+50
-50
@@ -74,13 +74,13 @@ describe('InspectedElementContext', () => {
74
const inspectedElement = await read(id);
75
76
expect(inspectedElement).toMatchInlineSnapshot(`
77
- Object {
78
- "context": Object {},
77
+ {
78
+ "context": {},
79
"events": undefined,
80
"hooks": null,
81
"id": 2,
82
"owners": null,
83
- "props": Object {
83
+ "props": {
84
"a": 1,
85
"b": "abc",
86
},
@@ -117,13 +117,13 @@ describe('InspectedElementContext', () => {
117
const inspectedElement = await read(id);
118
119
expect(inspectedElement).toMatchInlineSnapshot(`
120
- Object {
121
- "context": Object {},
120
+ {
121
+ "context": {},
122
"events": undefined,
123
"hooks": null,
124
"id": 2,
125
"owners": null,
126
- "props": Object {
126
+ "props": {
127
"boolean_false": false,
128
"boolean_true": true,
129
"float": 1.23,
@@ -213,7 +213,7 @@ describe('InspectedElementContext', () => {
213
const inspectedElement = await read(id);
214
215
expect(inspectedElement.props).toMatchInlineSnapshot(`
216
- Object {
216
+ {
217
"anonymous_fn": Dehydrated {
218
"preview_short": ƒ () {},
219
"preview_long": ƒ () {},
@@ -222,7 +222,7 @@ describe('InspectedElementContext', () => {
222
"preview_short": ArrayBuffer(3),
223
"preview_long": ArrayBuffer(3),
224
},
225
- "array_of_arrays": Array [
225
+ "array_of_arrays": [
226
Dehydrated {
227
"preview_short": Array(2),
228
"preview_long": [Array(3), Array(0)],
@@ -252,7 +252,7 @@ describe('InspectedElementContext', () => {
252
"preview_short": <div />,
253
"preview_long": <div />,
254
},
255
- "immutable": Object {
255
+ "immutable": {
256
"0": Dehydrated {
257
"preview_short": Array(2),
258
"preview_long": ["a", List(3)],
@@ -266,7 +266,7 @@ describe('InspectedElementContext', () => {
266
"preview_long": ["c", Map(2)],
267
},
268
},
269
- "map": Object {
269
+ "map": {
270
"0": Dehydrated {
271
"preview_short": Array(2),
272
"preview_long": ["name", "Brian"],
@@ -276,7 +276,7 @@ describe('InspectedElementContext', () => {
276
"preview_long": ["food", "sushi"],
277
},
278
},
279
- "map_of_maps": Object {
279
+ "map_of_maps": {
280
"0": Dehydrated {
281
"preview_short": Array(2),
282
"preview_long": ["first", Map(2)],
@@ -286,7 +286,7 @@ describe('InspectedElementContext', () => {
286
"preview_long": ["second", Map(2)],
287
},
288
},
289
- "object_of_objects": Object {
289
+ "object_of_objects": {
290
"inner": Dehydrated {
291
"preview_short": {…},
292
"preview_long": {boolean: true, number: 123, string: "abc"},
@@ -300,11 +300,11 @@ describe('InspectedElementContext', () => {
300
"preview_short": /abc/giu,
301
"preview_long": /abc/giu,
302
},
303
- "set": Object {
303
+ "set": {
304
"0": "abc",
305
"1": 123,
306
},
307
- "set_of_sets": Object {
307
+ "set_of_sets": {
308
"0": Dehydrated {
309
"preview_short": Set(3),
310
"preview_long": Set(3) {"a", "b", "c"},
@@ -318,7 +318,7 @@ describe('InspectedElementContext', () => {
318
"preview_short": Symbol(symbol),
319
"preview_long": Symbol(symbol),
320
},
321
- "typed_array": Object {
321
+ "typed_array": {
322
"0": 100,
323
"1": -100,
324
"2": 0,
@@ -347,8 +347,8 @@ describe('InspectedElementContext', () => {
347
const inspectedElement = await read(id);
348
349
expect(inspectedElement.props).toMatchInlineSnapshot(`
350
- Object {
351
- "object": Object {
350
+ {
351
+ "object": {
352
"boolean": true,
353
"number": 123,
354
"string": "abc",
@@ -404,13 +404,13 @@ describe('InspectedElementContext', () => {
404
const inspectedElement = await read(id);
405
406
expect(inspectedElement).toMatchInlineSnapshot(`
407
- Object {
408
- "context": Object {},
407
+ {
408
+ "context": {},
409
"events": undefined,
410
"hooks": null,
411
"id": 2,
412
"owners": null,
413
- "props": Object {
413
+ "props": {
414
"iteratable": Dehydrated {
415
"preview_short": Generator,
416
"preview_long": Generator,
@@ -459,14 +459,14 @@ describe('InspectedElementContext', () => {
459
const inspectedElement = await read(id);
460
461
expect(inspectedElement).toMatchInlineSnapshot(`
462
- Object {
463
- "context": Object {},
462
+ {
463
+ "context": {},
464
"events": undefined,
465
"hooks": null,
466
"id": 2,
467
"owners": null,
468
- "props": Object {
469
- "data": Object {
468
+ "props": {
469
+ "data": {
470
"_number": 42,
471
"number": 42,
472
},
@@ -549,14 +549,14 @@ describe('InspectedElementContext', () => {
549
const inspectedElement = await read(id);
550
551
expect(inspectedElement).toMatchInlineSnapshot(`
552
- Object {
553
- "context": Object {},
552
+ {
553
+ "context": {},
554
"events": undefined,
555
"hooks": null,
556
"id": 2,
557
"owners": null,
558
- "props": Object {
559
- "data": Object {
558
+ "props": {
559
+ "data": {
560
"123": 3,
561
"Symbol(enumerableSymbol)": 3,
562
"Symbol(enumerableSymbolBase)": 1,
@@ -619,8 +619,8 @@ describe('InspectedElementContext', () => {
619
const inspectedElement = await read(id);
620
621
expect(inspectedElement.props).toMatchInlineSnapshot(`
622
- Object {
623
- "data": Object {
622
+ {
623
+ "data": {
624
"a": undefined,
625
"b": Infinity,
626
"c": NaN,
@@ -659,8 +659,8 @@ describe('InspectedElementContext', () => {
659
660
let inspectedElement = await read(id);
661
expect(inspectedElement.props).toMatchInlineSnapshot(`
662
- Object {
663
- "nestedObject": Object {
662
+ {
663
+ "nestedObject": {
664
"a": Dehydrated {
665
"preview_short": {…},
666
"preview_long": {b: {…}},
@@ -671,10 +671,10 @@ describe('InspectedElementContext', () => {
671
672
inspectedElement = await read(id, ['props', 'nestedObject', 'a']);
673
expect(inspectedElement.props).toMatchInlineSnapshot(`
674
- Object {
675
- "nestedObject": Object {
676
- "a": Object {
677
- "b": Object {
674
+ {
675
+ "nestedObject": {
676
+ "a": {
677
+ "b": {
678
"c": Dehydrated {
679
"preview_short": Array(1),
680
"preview_long": [{…}],
@@ -687,12 +687,12 @@ describe('InspectedElementContext', () => {
687
688
inspectedElement = await read(id, ['props', 'nestedObject', 'a', 'b', 'c']);
689
expect(inspectedElement.props).toMatchInlineSnapshot(`
690
- Object {
691
- "nestedObject": Object {
692
- "a": Object {
693
- "b": Object {
694
- "c": Array [
695
- Object {
690
+ {
691
+ "nestedObject": {
692
+ "a": {
693
+ "b": {
694
+ "c": [
695
+ {
696
"d": Dehydrated {
697
"preview_short": {…},
698
"preview_long": {e: {…}},
@@ -715,14 +715,14 @@ describe('InspectedElementContext', () => {
715
'd',
716
]);
717
expect(inspectedElement.props).toMatchInlineSnapshot(`
718
- Object {
719
- "nestedObject": Object {
720
- "a": Object {
721
- "b": Object {
722
- "c": Array [
723
- Object {
724
- "d": Object {
725
- "e": Object {},
718
+ {
719
+ "nestedObject": {
720
+ "a": {
721
+ "b": {
722
+ "c": [
723
+ {
724
+ "d": {
725
+ "e": {},
726
},
727
},
728
],
packages/react-devtools-shared/src/__tests__/ownersListContext-test.js
+5
-5
@@ -114,14 +114,14 @@ describe('OwnersListContext', () => {
114
const firstChild = ((store.getElementAtIndex(2): any): Element);
115
116
expect(await getOwnersListForOwner(parent)).toMatchInlineSnapshot(`
117
- Array [
117
+ [
118
"Grandparent",
119
"Parent",
120
]
121
`);
122
123
expect(await getOwnersListForOwner(firstChild)).toMatchInlineSnapshot(`
124
- Array [
124
+ [
125
"Grandparent",
126
"Parent",
127
"Child",
@@ -157,7 +157,7 @@ describe('OwnersListContext', () => {
157
const firstChild = ((store.getElementAtIndex(1): any): Element);
158
159
expect(await getOwnersListForOwner(firstChild)).toMatchInlineSnapshot(`
160
- Array [
160
+ [
161
"Grandparent",
162
"Parent",
163
"Child",
@@ -183,7 +183,7 @@ describe('OwnersListContext', () => {
183
const grandparent = ((store.getElementAtIndex(0): any): Element);
184
185
expect(await getOwnersListForOwner(grandparent)).toMatchInlineSnapshot(`
186
- Array [
186
+ [
187
"Grandparent",
188
]
189
`);
@@ -212,7 +212,7 @@ describe('OwnersListContext', () => {
212
const wrapped = ((store.getElementAtIndex(2): any): Element);
213
214
expect(await getOwnersListForOwner(wrapped)).toMatchInlineSnapshot(`
215
- Array [
215
+ [
216
"Grandparent",
217
"InnerComponent",
218
"InnerComponent",
packages/react-devtools-shared/src/__tests__/preprocessData-test.js
+344
-344
@@ -322,11 +322,11 @@ describe('Timeline profiler', () => {
322
randomSample,
323
]);
324
expect(data).toMatchInlineSnapshot(`
325
- Object {
325
+ {
326
"batchUIDToMeasuresMap": Map {},
327
- "componentMeasures": Array [],
327
+ "componentMeasures": [],
328
"duration": 0.005,
329
- "flamechart": Array [],
329
+ "flamechart": [],
330
"internalModuleSourceToRanges": Map {},
331
"laneToLabelMap": Map {
332
0 => "Sync",
@@ -362,48 +362,48 @@ describe('Timeline profiler', () => {
362
30 => "Offscreen",
363
},
364
"laneToReactMeasureMap": Map {
365
- 0 => Array [],
366
- 1 => Array [],
367
- 2 => Array [],
368
- 3 => Array [],
369
- 4 => Array [],
370
- 5 => Array [],
371
- 6 => Array [],
372
- 7 => Array [],
373
- 8 => Array [],
374
- 9 => Array [],
375
- 10 => Array [],
376
- 11 => Array [],
377
- 12 => Array [],
378
- 13 => Array [],
379
- 14 => Array [],
380
- 15 => Array [],
381
- 16 => Array [],
382
- 17 => Array [],
383
- 18 => Array [],
384
- 19 => Array [],
385
- 20 => Array [],
386
- 21 => Array [],
387
- 22 => Array [],
388
- 23 => Array [],
389
- 24 => Array [],
390
- 25 => Array [],
391
- 26 => Array [],
392
- 27 => Array [],
393
- 28 => Array [],
394
- 29 => Array [],
395
- 30 => Array [],
365
+ 0 => [],
366
+ 1 => [],
367
+ 2 => [],
368
+ 3 => [],
369
+ 4 => [],
370
+ 5 => [],
371
+ 6 => [],
372
+ 7 => [],
373
+ 8 => [],
374
+ 9 => [],
375
+ 10 => [],
376
+ 11 => [],
377
+ 12 => [],
378
+ 13 => [],
379
+ 14 => [],
380
+ 15 => [],
381
+ 16 => [],
382
+ 17 => [],
383
+ 18 => [],
384
+ 19 => [],
385
+ 20 => [],
386
+ 21 => [],
387
+ 22 => [],
388
+ 23 => [],
389
+ 24 => [],
390
+ 25 => [],
391
+ 26 => [],
392
+ 27 => [],
393
+ 28 => [],
394
+ 29 => [],
395
+ 30 => [],
396
},
397
- "nativeEvents": Array [],
398
- "networkMeasures": Array [],
399
- "otherUserTimingMarks": Array [],
397
+ "nativeEvents": [],
398
+ "networkMeasures": [],
399
+ "otherUserTimingMarks": [],
400
"reactVersion": "<filtered-version>",
401
- "schedulingEvents": Array [],
401
+ "schedulingEvents": [],
402
"snapshotHeight": 0,
403
- "snapshots": Array [],
403
+ "snapshots": [],
404
"startTime": 1,
405
- "suspenseEvents": Array [],
406
- "thrownErrors": Array [],
405
+ "suspenseEvents": [],
406
+ "thrownErrors": [],
407
}
408
`);
409
});
@@ -447,10 +447,10 @@ describe('Timeline profiler', () => {
447
}),
448
]);
449
expect(data).toMatchInlineSnapshot(`
450
- Object {
450
+ {
451
"batchUIDToMeasuresMap": Map {
452
- 0 => Array [
453
- Object {
452
+ 0 => [
453
+ {
454
"batchUID": 0,
455
"depth": 0,
456
"duration": 0.005,
@@ -458,7 +458,7 @@ describe('Timeline profiler', () => {
458
"timestamp": 0.006,
459
"type": "render-idle",
460
},
461
- Object {
461
+ {
462
"batchUID": 0,
463
"depth": 0,
464
"duration": 0.001,
@@ -466,7 +466,7 @@ describe('Timeline profiler', () => {
466
"timestamp": 0.006,
467
"type": "render",
468
},
469
- Object {
469
+ {
470
"batchUID": 0,
471
"depth": 0,
472
"duration": 0.003,
@@ -474,7 +474,7 @@ describe('Timeline profiler', () => {
474
"timestamp": 0.008,
475
"type": "commit",
476
},
477
- Object {
477
+ {
478
"batchUID": 0,
479
"depth": 1,
480
"duration": 0.001,
@@ -484,9 +484,9 @@ describe('Timeline profiler', () => {
484
},
485
],
486
},
487
- "componentMeasures": Array [],
487
+ "componentMeasures": [],
488
"duration": 0.011,
489
- "flamechart": Array [],
489
+ "flamechart": [],
490
"internalModuleSourceToRanges": Map {},
491
"laneToLabelMap": Map {
492
0 => "Sync",
@@ -522,17 +522,17 @@ describe('Timeline profiler', () => {
522
30 => "Offscreen",
523
},
524
"laneToReactMeasureMap": Map {
525
- 0 => Array [],
526
- 1 => Array [],
527
- 2 => Array [],
528
- 3 => Array [],
529
- 4 => Array [],
530
- 5 => Array [],
531
- 6 => Array [],
532
- 7 => Array [],
533
- 8 => Array [],
534
- 9 => Array [
535
- Object {
525
+ 0 => [],
526
+ 1 => [],
527
+ 2 => [],
528
+ 3 => [],
529
+ 4 => [],
530
+ 5 => [],
531
+ 6 => [],
532
+ 7 => [],
533
+ 8 => [],
534
+ 9 => [
535
+ {
536
"batchUID": 0,
537
"depth": 0,
538
"duration": 0.005,
@@ -540,7 +540,7 @@ describe('Timeline profiler', () => {
540
"timestamp": 0.006,
541
"type": "render-idle",
542
},
543
- Object {
543
+ {
544
"batchUID": 0,
545
"depth": 0,
546
"duration": 0.001,
@@ -548,7 +548,7 @@ describe('Timeline profiler', () => {
548
"timestamp": 0.006,
549
"type": "render",
550
},
551
- Object {
551
+ {
552
"batchUID": 0,
553
"depth": 0,
554
"duration": 0.003,
@@ -556,7 +556,7 @@ describe('Timeline profiler', () => {
556
"timestamp": 0.008,
557
"type": "commit",
558
},
559
- Object {
559
+ {
560
"batchUID": 0,
561
"depth": 1,
562
"duration": 0.001,
@@ -565,34 +565,34 @@ describe('Timeline profiler', () => {
565
"type": "layout-effects",
566
},
567
],
568
- 10 => Array [],
569
- 11 => Array [],
570
- 12 => Array [],
571
- 13 => Array [],
572
- 14 => Array [],
573
- 15 => Array [],
574
- 16 => Array [],
575
- 17 => Array [],
576
- 18 => Array [],
577
- 19 => Array [],
578
- 20 => Array [],
579
- 21 => Array [],
580
- 22 => Array [],
581
- 23 => Array [],
582
- 24 => Array [],
583
- 25 => Array [],
584
- 26 => Array [],
585
- 27 => Array [],
586
- 28 => Array [],
587
- 29 => Array [],
588
- 30 => Array [],
568
+ 10 => [],
569
+ 11 => [],
570
+ 12 => [],
571
+ 13 => [],
572
+ 14 => [],
573
+ 15 => [],
574
+ 16 => [],
575
+ 17 => [],
576
+ 18 => [],
577
+ 19 => [],
578
+ 20 => [],
579
+ 21 => [],
580
+ 22 => [],
581
+ 23 => [],
582
+ 24 => [],
583
+ 25 => [],
584
+ 26 => [],
585
+ 27 => [],
586
+ 28 => [],
587
+ 29 => [],
588
+ 30 => [],
589
},
590
- "nativeEvents": Array [],
591
- "networkMeasures": Array [],
592
- "otherUserTimingMarks": Array [],
590
+ "nativeEvents": [],
591
+ "networkMeasures": [],
592
+ "otherUserTimingMarks": [],
593
"reactVersion": "<filtered-version>",
594
- "schedulingEvents": Array [
595
- Object {
594
+ "schedulingEvents": [
595
+ {
596
"lanes": "0b0000000000000000000000000001001",
597
"timestamp": 0.005,
598
"type": "schedule-render",
@@ -600,10 +600,10 @@ describe('Timeline profiler', () => {
600
},
601
],
602
"snapshotHeight": 0,
603
- "snapshots": Array [],
603
+ "snapshots": [],
604
"startTime": 1,
605
- "suspenseEvents": Array [],
606
- "thrownErrors": Array [],
605
+ "suspenseEvents": [],
606
+ "thrownErrors": [],
607
}
608
`);
609
});
@@ -616,10 +616,10 @@ describe('Timeline profiler', () => {
616
...createUserTimingData(clearedMarks),
617
]);
618
expect(data).toMatchInlineSnapshot(`
619
- Object {
619
+ {
620
"batchUIDToMeasuresMap": Map {
621
- 0 => Array [
622
- Object {
621
+ 0 => [
622
+ {
623
"batchUID": 0,
624
"depth": 0,
625
"duration": 0.01,
@@ -627,7 +627,7 @@ describe('Timeline profiler', () => {
627
"timestamp": 0.006,
628
"type": "render-idle",
629
},
630
- Object {
630
+ {
631
"batchUID": 0,
632
"depth": 0,
633
"duration": 0.001,
@@ -635,7 +635,7 @@ describe('Timeline profiler', () => {
635
"timestamp": 0.006,
636
"type": "render",
637
},
638
- Object {
638
+ {
639
"batchUID": 0,
640
"depth": 0,
641
"duration": 0.008,
@@ -643,7 +643,7 @@ describe('Timeline profiler', () => {
643
"timestamp": 0.008,
644
"type": "commit",
645
},
646
- Object {
646
+ {
647
"batchUID": 0,
648
"depth": 1,
649
"duration": 0.001,
@@ -653,19 +653,19 @@ describe('Timeline profiler', () => {
653
},
654
],
655
},
656
- "componentMeasures": Array [],
656
+ "componentMeasures": [],
657
"duration": 0.016,
658
- "flamechart": Array [],
658
+ "flamechart": [],
659
"internalModuleSourceToRanges": Map {
660
- undefined => Array [
661
- Array [
662
- Object {
660
+ undefined => [
661
+ [
662
+ {
663
"columnNumber": 0,
664
"functionName": "filtered",
665
"lineNumber": 0,
666
"source": " at filtered (<anonymous>:0:0)",
667
},
668
- Object {
668
+ {
669
"columnNumber": 1,
670
"functionName": "filtered",
671
"lineNumber": 1,
@@ -708,9 +708,9 @@ describe('Timeline profiler', () => {
708
30 => "Offscreen",
709
},
710
"laneToReactMeasureMap": Map {
711
- 0 => Array [],
712
- 1 => Array [
713
- Object {
711
+ 0 => [],
712
+ 1 => [
713
+ {
714
"batchUID": 0,
715
"depth": 0,
716
"duration": 0.01,
@@ -718,7 +718,7 @@ describe('Timeline profiler', () => {
718
"timestamp": 0.006,
719
"type": "render-idle",
720
},
721
- Object {
721
+ {
722
"batchUID": 0,
723
"depth": 0,
724
"duration": 0.001,
@@ -726,7 +726,7 @@ describe('Timeline profiler', () => {
726
"timestamp": 0.006,
727
"type": "render",
728
},
729
- Object {
729
+ {
730
"batchUID": 0,
731
"depth": 0,
732
"duration": 0.008,
@@ -734,7 +734,7 @@ describe('Timeline profiler', () => {
734
"timestamp": 0.008,
735
"type": "commit",
736
},
737
- Object {
737
+ {
738
"batchUID": 0,
739
"depth": 1,
740
"duration": 0.001,
@@ -743,42 +743,42 @@ describe('Timeline profiler', () => {
743
"type": "layout-effects",
744
},
745
],
746
- 2 => Array [],
747
- 3 => Array [],
748
- 4 => Array [],
749
- 5 => Array [],
750
- 6 => Array [],
751
- 7 => Array [],
752
- 8 => Array [],
753
- 9 => Array [],
754
- 10 => Array [],
755
- 11 => Array [],
756
- 12 => Array [],
757
- 13 => Array [],
758
- 14 => Array [],
759
- 15 => Array [],
760
- 16 => Array [],
761
- 17 => Array [],
762
- 18 => Array [],
763
- 19 => Array [],
764
- 20 => Array [],
765
- 21 => Array [],
766
- 22 => Array [],
767
- 23 => Array [],
768
- 24 => Array [],
769
- 25 => Array [],
770
- 26 => Array [],
771
- 27 => Array [],
772
- 28 => Array [],
773
- 29 => Array [],
774
- 30 => Array [],
746
+ 2 => [],
747
+ 3 => [],
748
+ 4 => [],
749
+ 5 => [],
750
+ 6 => [],
751
+ 7 => [],
752
+ 8 => [],
753
+ 9 => [],
754
+ 10 => [],
755
+ 11 => [],
756
+ 12 => [],
757
+ 13 => [],
758
+ 14 => [],
759
+ 15 => [],
760
+ 16 => [],
761
+ 17 => [],
762
+ 18 => [],
763
+ 19 => [],
764
+ 20 => [],
765
+ 21 => [],
766
+ 22 => [],
767
+ 23 => [],
768
+ 24 => [],
769
+ 25 => [],
770
+ 26 => [],
771
+ 27 => [],
772
+ 28 => [],
773
+ 29 => [],
774
+ 30 => [],
775
},
776
- "nativeEvents": Array [],
777
- "networkMeasures": Array [],
778
- "otherUserTimingMarks": Array [],
776
+ "nativeEvents": [],
777
+ "networkMeasures": [],
778
+ "otherUserTimingMarks": [],
779
"reactVersion": "<filtered-version>",
780
- "schedulingEvents": Array [
781
- Object {
780
+ "schedulingEvents": [
781
+ {
782
"lanes": "0b0000000000000000000000000000001",
783
"timestamp": 0.005,
784
"type": "schedule-render",
@@ -786,10 +786,10 @@ describe('Timeline profiler', () => {
786
},
787
],
788
"snapshotHeight": 0,
789
- "snapshots": Array [],
789
+ "snapshots": [],
790
"startTime": 4,
791
- "suspenseEvents": Array [],
792
- "thrownErrors": Array [],
791
+ "suspenseEvents": [],
792
+ "thrownErrors": [],
793
}
794
`);
795
});
@@ -813,10 +813,10 @@ describe('Timeline profiler', () => {
813
...createUserTimingData(clearedMarks),
814
]);
815
expect(data).toMatchInlineSnapshot(`
816
- Object {
816
+ {
817
"batchUIDToMeasuresMap": Map {
818
- 0 => Array [
819
- Object {
818
+ 0 => [
819
+ {
820
"batchUID": 0,
821
"depth": 0,
822
"duration": 0.012,
@@ -824,7 +824,7 @@ describe('Timeline profiler', () => {
824
"timestamp": 0.006,
825
"type": "render-idle",
826
},
827
- Object {
827
+ {
828
"batchUID": 0,
829
"depth": 0,
830
"duration": 0.003,
@@ -832,7 +832,7 @@ describe('Timeline profiler', () => {
832
"timestamp": 0.006,
833
"type": "render",
834
},
835
- Object {
835
+ {
836
"batchUID": 0,
837
"depth": 0,
838
"duration": 0.008,
@@ -840,7 +840,7 @@ describe('Timeline profiler', () => {
840
"timestamp": 0.01,
841
"type": "commit",
842
},
843
- Object {
843
+ {
844
"batchUID": 0,
845
"depth": 1,
846
"duration": 0.001,
@@ -848,7 +848,7 @@ describe('Timeline profiler', () => {
848
"timestamp": 0.016,
849
"type": "layout-effects",
850
},
851
- Object {
851
+ {
852
"batchUID": 0,
853
"depth": 0,
854
"duration": 0.004,
@@ -857,8 +857,8 @@ describe('Timeline profiler', () => {
857
"type": "passive-effects",
858
},
859
],
860
- 1 => Array [
861
- Object {
860
+ 1 => [
861
+ {
862
"batchUID": 1,
863
"depth": 0,
864
"duration": 0.012,
@@ -866,7 +866,7 @@ describe('Timeline profiler', () => {
866
"timestamp": 0.024,
867
"type": "render-idle",
868
},
869
- Object {
869
+ {
870
"batchUID": 1,
871
"depth": 0,
872
"duration": 0.003,
@@ -874,7 +874,7 @@ describe('Timeline profiler', () => {
874
"timestamp": 0.024,
875
"type": "render",
876
},
877
- Object {
877
+ {
878
"batchUID": 1,
879
"depth": 0,
880
"duration": 0.008,
@@ -882,7 +882,7 @@ describe('Timeline profiler', () => {
882
"timestamp": 0.028,
883
"type": "commit",
884
},
885
- Object {
885
+ {
886
"batchUID": 1,
887
"depth": 1,
888
"duration": 0.001,
@@ -890,7 +890,7 @@ describe('Timeline profiler', () => {
890
"timestamp": 0.034,
891
"type": "layout-effects",
892
},
893
- Object {
893
+ {
894
"batchUID": 1,
895
"depth": 0,
896
"duration": 0.003,
@@ -900,29 +900,29 @@ describe('Timeline profiler', () => {
900
},
901
],
902
},
903
- "componentMeasures": Array [
904
- Object {
903
+ "componentMeasures": [
904
+ {
905
"componentName": "App",
906
"duration": 0.001,
907
"timestamp": 0.007,
908
"type": "render",
909
"warning": null,
910
},
911
- Object {
911
+ {
912
"componentName": "App",
913
"duration": 0.002,
914
"timestamp": 0.02,
915
"type": "passive-effect-mount",
916
"warning": null,
917
},
918
- Object {
918
+ {
919
"componentName": "App",
920
"duration": 0.001,
921
"timestamp": 0.025,
922
"type": "render",
923
"warning": null,
924
},
925
- Object {
925
+ {
926
"componentName": "App",
927
"duration": 0.001,
928
"timestamp": 0.038,
@@ -931,17 +931,17 @@ describe('Timeline profiler', () => {
931
},
932
],
933
"duration": 0.04,
934
- "flamechart": Array [],
934
+ "flamechart": [],
935
"internalModuleSourceToRanges": Map {
936
- undefined => Array [
937
- Array [
938
- Object {
936
+ undefined => [
937
+ [
938
+ {
939
"columnNumber": 0,
940
"functionName": "filtered",
941
"lineNumber": 0,
942
"source": " at filtered (<anonymous>:0:0)",
943
},
944
- Object {
944
+ {
945
"columnNumber": 1,
946
"functionName": "filtered",
947
"lineNumber": 1,
@@ -984,13 +984,13 @@ describe('Timeline profiler', () => {
984
30 => "Offscreen",
985
},
986
"laneToReactMeasureMap": Map {
987
- 0 => Array [],
988
- 1 => Array [],
989
- 2 => Array [],
990
- 3 => Array [],
991
- 4 => Array [],
992
- 5 => Array [
993
- Object {
987
+ 0 => [],
988
+ 1 => [],
989
+ 2 => [],
990
+ 3 => [],
991
+ 4 => [],
992
+ 5 => [
993
+ {
994
"batchUID": 0,
995
"depth": 0,
996
"duration": 0.012,
@@ -998,7 +998,7 @@ describe('Timeline profiler', () => {
998
"timestamp": 0.006,
999
"type": "render-idle",
1000
},
1001
- Object {
1001
+ {
1002
"batchUID": 0,
1003
"depth": 0,
1004
"duration": 0.003,
@@ -1006,7 +1006,7 @@ describe('Timeline profiler', () => {
1006
"timestamp": 0.006,
1007
"type": "render",
1008
},
1009
- Object {
1009
+ {
1010
"batchUID": 0,
1011
"depth": 0,
1012
"duration": 0.008,
@@ -1014,7 +1014,7 @@ describe('Timeline profiler', () => {
1014
"timestamp": 0.01,
1015
"type": "commit",
1016
},
1017
- Object {
1017
+ {
1018
"batchUID": 0,
1019
"depth": 1,
1020
"duration": 0.001,
@@ -1022,7 +1022,7 @@ describe('Timeline profiler', () => {
1022
"timestamp": 0.016,
1023
"type": "layout-effects",
1024
},
1025
- Object {
1025
+ {
1026
"batchUID": 0,
1027
"depth": 0,
1028
"duration": 0.004,
@@ -1030,7 +1030,7 @@ describe('Timeline profiler', () => {
1030
"timestamp": 0.019,
1031
"type": "passive-effects",
1032
},
1033
- Object {
1033
+ {
1034
"batchUID": 1,
1035
"depth": 0,
1036
"duration": 0.012,
@@ -1038,7 +1038,7 @@ describe('Timeline profiler', () => {
1038
"timestamp": 0.024,
1039
"type": "render-idle",
1040
},
1041
- Object {
1041
+ {
1042
"batchUID": 1,
1043
"depth": 0,
1044
"duration": 0.003,
@@ -1046,7 +1046,7 @@ describe('Timeline profiler', () => {
1046
"timestamp": 0.024,
1047
"type": "render",
1048
},
1049
- Object {
1049
+ {
1050
"batchUID": 1,
1051
"depth": 0,
1052
"duration": 0.008,
@@ -1054,7 +1054,7 @@ describe('Timeline profiler', () => {
1054
"timestamp": 0.028,
1055
"type": "commit",
1056
},
1057
- Object {
1057
+ {
1058
"batchUID": 1,
1059
"depth": 1,
1060
"duration": 0.001,
@@ -1062,7 +1062,7 @@ describe('Timeline profiler', () => {
1062
"timestamp": 0.034,
1063
"type": "layout-effects",
1064
},
1065
- Object {
1065
+ {
1066
"batchUID": 1,
1067
"depth": 0,
1068
"duration": 0.003,
@@ -1071,44 +1071,44 @@ describe('Timeline profiler', () => {
1071
"type": "passive-effects",
1072
},
1073
],
1074
- 6 => Array [],
1075
- 7 => Array [],
1076
- 8 => Array [],
1077
- 9 => Array [],
1078
- 10 => Array [],
1079
- 11 => Array [],
1080
- 12 => Array [],
1081
- 13 => Array [],
1082
- 14 => Array [],
1083
- 15 => Array [],
1084
- 16 => Array [],
1085
- 17 => Array [],
1086
- 18 => Array [],
1087
- 19 => Array [],
1088
- 20 => Array [],
1089
- 21 => Array [],
1090
- 22 => Array [],
1091
- 23 => Array [],
1092
- 24 => Array [],
1093
- 25 => Array [],
1094
- 26 => Array [],
1095
- 27 => Array [],
1096
- 28 => Array [],
1097
- 29 => Array [],
1098
- 30 => Array [],
1074
+ 6 => [],
1075
+ 7 => [],
1076
+ 8 => [],
1077
+ 9 => [],
1078
+ 10 => [],
1079
+ 11 => [],
1080
+ 12 => [],
1081
+ 13 => [],
1082
+ 14 => [],
1083
+ 15 => [],
1084
+ 16 => [],
1085
+ 17 => [],
1086
+ 18 => [],
1087
+ 19 => [],
1088
+ 20 => [],
1089
+ 21 => [],
1090
+ 22 => [],
1091
+ 23 => [],
1092
+ 24 => [],
1093
+ 25 => [],
1094
+ 26 => [],
1095
+ 27 => [],
1096
+ 28 => [],
1097
+ 29 => [],
1098
+ 30 => [],
1099
},
1100
- "nativeEvents": Array [],
1101
- "networkMeasures": Array [],
1102
- "otherUserTimingMarks": Array [],
1100
+ "nativeEvents": [],
1101
+ "networkMeasures": [],
1102
+ "otherUserTimingMarks": [],
1103
"reactVersion": "<filtered-version>",
1104
- "schedulingEvents": Array [
1105
- Object {
1104
+ "schedulingEvents": [
1105
+ {
1106
"lanes": "0b0000000000000000000000000000101",
1107
"timestamp": 0.005,
1108
"type": "schedule-render",
1109
"warning": null,
1110
},
1111
- Object {
1111
+ {
1112
"componentName": "App",
1113
"lanes": "0b0000000000000000000000000000101",
1114
"timestamp": 0.021,
@@ -1117,10 +1117,10 @@ describe('Timeline profiler', () => {
1117
},
1118
],
1119
"snapshotHeight": 0,
1120
- "snapshots": Array [],
1120
+ "snapshots": [],
1121
"startTime": 4,
1122
- "suspenseEvents": Array [],
1123
- "thrownErrors": Array [],
1122
+ "suspenseEvents": [],
1123
+ "thrownErrors": [],
1124
}
1125
`);
1126
});
@@ -1194,16 +1194,16 @@ describe('Timeline profiler', () => {
1194
...userTimingData,
1195
]);
1196
expect(data.otherUserTimingMarks).toMatchInlineSnapshot(`
1197
- Array [
1198
- Object {
1197
+ [
1198
+ {
1199
"name": "VCWithoutImage: root",
1200
"timestamp": 0.003,
1201
},
1202
- Object {
1202
+ {
1203
"name": "--a-mark-that-looks-like-one-of-ours",
1204
"timestamp": 0.004,
1205
},
1206
- Object {
1206
+ {
1207
"name": "Some other mark",
1208
"timestamp": 0.005,
1209
},
@@ -1948,10 +1948,10 @@ describe('Timeline profiler', () => {
1948
expect(data).toHaveLength(1);
1949
const timelineData = data[0];
1950
expect(timelineData).toMatchInlineSnapshot(`
1951
- Object {
1951
+ {
1952
"batchUIDToMeasuresMap": Map {
1953
- 1 => Array [
1954
- Object {
1953
+ 1 => [
1954
+ {
1955
"batchUID": 1,
1956
"depth": 0,
1957
"duration": 0,
@@ -1959,7 +1959,7 @@ describe('Timeline profiler', () => {
1959
"timestamp": 10,
1960
"type": "render-idle",
1961
},
1962
- Object {
1962
+ {
1963
"batchUID": 1,
1964
"depth": 0,
1965
"duration": 0,
@@ -1967,7 +1967,7 @@ describe('Timeline profiler', () => {
1967
"timestamp": 10,
1968
"type": "render",
1969
},
1970
- Object {
1970
+ {
1971
"batchUID": 1,
1972
"depth": 0,
1973
"duration": 0,
@@ -1975,7 +1975,7 @@ describe('Timeline profiler', () => {
1975
"timestamp": 10,
1976
"type": "commit",
1977
},
1978
- Object {
1978
+ {
1979
"batchUID": 1,
1980
"depth": 1,
1981
"duration": 0,
@@ -1985,9 +1985,9 @@ describe('Timeline profiler', () => {
1985
},
1986
],
1987
},
1988
- "componentMeasures": Array [],
1988
+ "componentMeasures": [],
1989
"duration": 20,
1990
- "flamechart": Array [],
1990
+ "flamechart": [],
1991
"internalModuleSourceToRanges": Map {},
1992
"laneToLabelMap": Map {
1993
1 => "SyncHydrationLane",
@@ -2023,9 +2023,9 @@ describe('Timeline profiler', () => {
2023
1073741824 => "Offscreen",
2024
},
2025
"laneToReactMeasureMap": Map {
2026
- 1 => Array [],
2027
- 2 => Array [
2028
- Object {
2026
+ 1 => [],
2027
+ 2 => [
2028
+ {
2029
"batchUID": 1,
2030
"depth": 0,
2031
"duration": 0,
@@ -2033,7 +2033,7 @@ describe('Timeline profiler', () => {
2033
"timestamp": 10,
2034
"type": "render-idle",
2035
},
2036
- Object {
2036
+ {
2037
"batchUID": 1,
2038
"depth": 0,
2039
"duration": 0,
@@ -2041,7 +2041,7 @@ describe('Timeline profiler', () => {
2041
"timestamp": 10,
2042
"type": "render",
2043
},
2044
- Object {
2044
+ {
2045
"batchUID": 1,
2046
"depth": 0,
2047
"duration": 0,
@@ -2049,7 +2049,7 @@ describe('Timeline profiler', () => {
2049
"timestamp": 10,
2050
"type": "commit",
2051
},
2052
- Object {
2052
+ {
2053
"batchUID": 1,
2054
"depth": 1,
2055
"duration": 0,
@@ -2058,42 +2058,42 @@ describe('Timeline profiler', () => {
2058
"type": "layout-effects",
2059
},
2060
],
2061
- 4 => Array [],
2062
- 8 => Array [],
2063
- 16 => Array [],
2064
- 32 => Array [],
2065
- 64 => Array [],
2066
- 128 => Array [],
2067
- 256 => Array [],
2068
- 512 => Array [],
2069
- 1024 => Array [],
2070
- 2048 => Array [],
2071
- 4096 => Array [],
2072
- 8192 => Array [],
2073
- 16384 => Array [],
2074
- 32768 => Array [],
2075
- 65536 => Array [],
2076
- 131072 => Array [],
2077
- 262144 => Array [],
2078
- 524288 => Array [],
2079
- 1048576 => Array [],
2080
- 2097152 => Array [],
2081
- 4194304 => Array [],
2082
- 8388608 => Array [],
2083
- 16777216 => Array [],
2084
- 33554432 => Array [],
2085
- 67108864 => Array [],
2086
- 134217728 => Array [],
2087
- 268435456 => Array [],
2088
- 536870912 => Array [],
2089
- 1073741824 => Array [],
2061
+ 4 => [],
2062
+ 8 => [],
2063
+ 16 => [],
2064
+ 32 => [],
2065
+ 64 => [],
2066
+ 128 => [],
2067
+ 256 => [],
2068
+ 512 => [],
2069
+ 1024 => [],
2070
+ 2048 => [],
2071
+ 4096 => [],
2072
+ 8192 => [],
2073
+ 16384 => [],
2074
+ 32768 => [],
2075
+ 65536 => [],
2076
+ 131072 => [],
2077
+ 262144 => [],
2078
+ 524288 => [],
2079
+ 1048576 => [],
2080
+ 2097152 => [],
2081
+ 4194304 => [],
2082
+ 8388608 => [],
2083
+ 16777216 => [],
2084
+ 33554432 => [],
2085
+ 67108864 => [],
2086
+ 134217728 => [],
2087
+ 268435456 => [],
2088
+ 536870912 => [],
2089
+ 1073741824 => [],
2090
},
2091
- "nativeEvents": Array [],
2092
- "networkMeasures": Array [],
2093
- "otherUserTimingMarks": Array [],
2091
+ "nativeEvents": [],
2092
+ "networkMeasures": [],
2093
+ "otherUserTimingMarks": [],
2094
"reactVersion": "<filtered-version>",
2095
- "schedulingEvents": Array [
2096
- Object {
2095
+ "schedulingEvents": [
2096
+ {
2097
"lanes": "0b0000000000000000000000000000010",
2098
"timestamp": 10,
2099
"type": "schedule-render",
@@ -2101,10 +2101,10 @@ describe('Timeline profiler', () => {
2101
},
2102
],
2103
"snapshotHeight": 0,
2104
- "snapshots": Array [],
2104
+ "snapshots": [],
2105
"startTime": -10,
2106
- "suspenseEvents": Array [],
2107
- "thrownErrors": Array [],
2106
+ "suspenseEvents": [],
2107
+ "thrownErrors": [],
2108
}
2109
`);
2110
});
@@ -2137,10 +2137,10 @@ describe('Timeline profiler', () => {
2137
});
2138
2139
expect(timelineData).toMatchInlineSnapshot(`
2140
- Object {
2140
+ {
2141
"batchUIDToMeasuresMap": Map {
2142
- 1 => Array [
2143
- Object {
2142
+ 1 => [
2143
+ {
2144
"batchUID": 1,
2145
"depth": 0,
2146
"duration": 0,
@@ -2148,7 +2148,7 @@ describe('Timeline profiler', () => {
2148
"timestamp": 10,
2149
"type": "render-idle",
2150
},
2151
- Object {
2151
+ {
2152
"batchUID": 1,
2153
"depth": 0,
2154
"duration": 0,
@@ -2156,7 +2156,7 @@ describe('Timeline profiler', () => {
2156
"timestamp": 10,
2157
"type": "render",
2158
},
2159
- Object {
2159
+ {
2160
"batchUID": 1,
2161
"depth": 0,
2162
"duration": 0,
@@ -2164,7 +2164,7 @@ describe('Timeline profiler', () => {
2164
"timestamp": 10,
2165
"type": "commit",
2166
},
2167
- Object {
2167
+ {
2168
"batchUID": 1,
2169
"depth": 1,
2170
"duration": 0,
@@ -2172,7 +2172,7 @@ describe('Timeline profiler', () => {
2172
"timestamp": 10,
2173
"type": "layout-effects",
2174
},
2175
- Object {
2175
+ {
2176
"batchUID": 1,
2177
"depth": 0,
2178
"duration": 0,
@@ -2181,8 +2181,8 @@ describe('Timeline profiler', () => {
2181
"type": "passive-effects",
2182
},
2183
],
2184
- 2 => Array [
2185
- Object {
2184
+ 2 => [
2185
+ {
2186
"batchUID": 2,
2187
"depth": 0,
2188
"duration": 0,
@@ -2190,7 +2190,7 @@ describe('Timeline profiler', () => {
2190
"timestamp": 10,
2191
"type": "render-idle",
2192
},
2193
- Object {
2193
+ {
2194
"batchUID": 2,
2195
"depth": 0,
2196
"duration": 0,
@@ -2198,7 +2198,7 @@ describe('Timeline profiler', () => {
2198
"timestamp": 10,
2199
"type": "render",
2200
},
2201
- Object {
2201
+ {
2202
"batchUID": 2,
2203
"depth": 0,
2204
"duration": 0,
@@ -2206,7 +2206,7 @@ describe('Timeline profiler', () => {
2206
"timestamp": 10,
2207
"type": "commit",
2208
},
2209
- Object {
2209
+ {
2210
"batchUID": 2,
2211
"depth": 1,
2212
"duration": 0,
@@ -2214,7 +2214,7 @@ describe('Timeline profiler', () => {
2214
"timestamp": 10,
2215
"type": "layout-effects",
2216
},
2217
- Object {
2217
+ {
2218
"batchUID": 2,
2219
"depth": 0,
2220
"duration": 0,
@@ -2224,29 +2224,29 @@ describe('Timeline profiler', () => {
2224
},
2225
],
2226
},
2227
- "componentMeasures": Array [
2228
- Object {
2227
+ "componentMeasures": [
2228
+ {
2229
"componentName": "App",
2230
"duration": 0,
2231
"timestamp": 10,
2232
"type": "render",
2233
"warning": null,
2234
},
2235
- Object {
2235
+ {
2236
"componentName": "App",
2237
"duration": 0,
2238
"timestamp": 10,
2239
"type": "passive-effect-mount",
2240
"warning": null,
2241
},
2242
- Object {
2242
+ {
2243
"componentName": "App",
2244
"duration": 0,
2245
"timestamp": 10,
2246
"type": "render",
2247
"warning": null,
2248
},
2249
- Object {
2249
+ {
2250
"componentName": "App",
2251
"duration": 0,
2252
"timestamp": 10,
@@ -2255,7 +2255,7 @@ describe('Timeline profiler', () => {
2255
},
2256
],
2257
"duration": 20,
2258
- "flamechart": Array [],
2258
+ "flamechart": [],
2259
"internalModuleSourceToRanges": Map {},
2260
"laneToLabelMap": Map {
2261
1 => "SyncHydrationLane",
@@ -2291,13 +2291,13 @@ describe('Timeline profiler', () => {
2291
1073741824 => "Offscreen",
2292
},
2293
"laneToReactMeasureMap": Map {
2294
- 1 => Array [],
2295
- 2 => Array [],
2296
- 4 => Array [],
2297
- 8 => Array [],
2298
- 16 => Array [],
2299
- 32 => Array [
2300
- Object {
2294
+ 1 => [],
2295
+ 2 => [],
2296
+ 4 => [],
2297
+ 8 => [],
2298
+ 16 => [],
2299
+ 32 => [
2300
+ {
2301
"batchUID": 1,
2302
"depth": 0,
2303
"duration": 0,
@@ -2305,7 +2305,7 @@ describe('Timeline profiler', () => {
2305
"timestamp": 10,
2306
"type": "render-idle",
2307
},
2308
- Object {
2308
+ {
2309
"batchUID": 1,
2310
"depth": 0,
2311
"duration": 0,
@@ -2313,7 +2313,7 @@ describe('Timeline profiler', () => {
2313
"timestamp": 10,
2314
"type": "render",
2315
},
2316
- Object {
2316
+ {
2317
"batchUID": 1,
2318
"depth": 0,
2319
"duration": 0,
@@ -2321,7 +2321,7 @@ describe('Timeline profiler', () => {
2321
"timestamp": 10,
2322
"type": "commit",
2323
},
2324
- Object {
2324
+ {
2325
"batchUID": 1,
2326
"depth": 1,
2327
"duration": 0,
@@ -2329,7 +2329,7 @@ describe('Timeline profiler', () => {
2329
"timestamp": 10,
2330
"type": "layout-effects",
2331
},
2332
- Object {
2332
+ {
2333
"batchUID": 1,
2334
"depth": 0,
2335
"duration": 0,
@@ -2337,7 +2337,7 @@ describe('Timeline profiler', () => {
2337
"timestamp": 10,
2338
"type": "passive-effects",
2339
},
2340
- Object {
2340
+ {
2341
"batchUID": 2,
2342
"depth": 0,
2343
"duration": 0,
@@ -2345,7 +2345,7 @@ describe('Timeline profiler', () => {
2345
"timestamp": 10,
2346
"type": "render-idle",
2347
},
2348
- Object {
2348
+ {
2349
"batchUID": 2,
2350
"depth": 0,
2351
"duration": 0,
@@ -2353,7 +2353,7 @@ describe('Timeline profiler', () => {
2353
"timestamp": 10,
2354
"type": "render",
2355
},
2356
- Object {
2356
+ {
2357
"batchUID": 2,
2358
"depth": 0,
2359
"duration": 0,
@@ -2361,7 +2361,7 @@ describe('Timeline profiler', () => {
2361
"timestamp": 10,
2362
"type": "commit",
2363
},
2364
- Object {
2364
+ {
2365
"batchUID": 2,
2366
"depth": 1,
2367
"duration": 0,
@@ -2369,7 +2369,7 @@ describe('Timeline profiler', () => {
2369
"timestamp": 10,
2370
"type": "layout-effects",
2371
},
2372
- Object {
2372
+ {
2373
"batchUID": 2,
2374
"depth": 0,
2375
"duration": 0,
@@ -2378,44 +2378,44 @@ describe('Timeline profiler', () => {
2378
"type": "passive-effects",
2379
},
2380
],
2381
- 64 => Array [],
2382
- 128 => Array [],
2383
- 256 => Array [],
2384
- 512 => Array [],
2385
- 1024 => Array [],
2386
- 2048 => Array [],
2387
- 4096 => Array [],
2388
- 8192 => Array [],
2389
- 16384 => Array [],
2390
- 32768 => Array [],
2391
- 65536 => Array [],
2392
- 131072 => Array [],
2393
- 262144 => Array [],
2394
- 524288 => Array [],
2395
- 1048576 => Array [],
2396
- 2097152 => Array [],
2397
- 4194304 => Array [],
2398
- 8388608 => Array [],
2399
- 16777216 => Array [],
2400
- 33554432 => Array [],
2401
- 67108864 => Array [],
2402
- 134217728 => Array [],
2403
- 268435456 => Array [],
2404
- 536870912 => Array [],
2405
- 1073741824 => Array [],
2381
+ 64 => [],
2382
+ 128 => [],
2383
+ 256 => [],
2384
+ 512 => [],
2385
+ 1024 => [],
2386
+ 2048 => [],
2387
+ 4096 => [],
2388
+ 8192 => [],
2389
+ 16384 => [],
2390
+ 32768 => [],
2391
+ 65536 => [],
2392
+ 131072 => [],
2393
+ 262144 => [],
2394
+ 524288 => [],
2395
+ 1048576 => [],
2396
+ 2097152 => [],
2397
+ 4194304 => [],
2398
+ 8388608 => [],
2399
+ 16777216 => [],
2400
+ 33554432 => [],
2401
+ 67108864 => [],
2402
+ 134217728 => [],
2403
+ 268435456 => [],
2404
+ 536870912 => [],
2405
+ 1073741824 => [],
2406
},
2407
- "nativeEvents": Array [],
2408
- "networkMeasures": Array [],
2409
- "otherUserTimingMarks": Array [],
2407
+ "nativeEvents": [],
2408
+ "networkMeasures": [],
2409
+ "otherUserTimingMarks": [],
2410
"reactVersion": "<filtered-version>",
2411
- "schedulingEvents": Array [
2412
- Object {
2411
+ "schedulingEvents": [
2412
+ {
2413
"lanes": "0b0000000000000000000000000100000",
2414
"timestamp": 10,
2415
"type": "schedule-render",
2416
"warning": null,
2417
},
2418
- Object {
2418
+ {
2419
"componentName": "App",
2420
"componentStack": "
2421
in App (at **)",
@@ -2426,10 +2426,10 @@ describe('Timeline profiler', () => {
2426
},
2427
],
2428
"snapshotHeight": 0,
2429
- "snapshots": Array [],
2429
+ "snapshots": [],
2430
"startTime": -10,
2431
- "suspenseEvents": Array [],
2432
- "thrownErrors": Array [],
2431
+ "suspenseEvents": [],
2432
+ "thrownErrors": [],
2433
}
2434
`);
2435
});
packages/react-devtools-shared/src/__tests__/profilerChangeDescriptions-test.js
+8
-8
@@ -89,12 +89,12 @@ describe('Profiler change descriptions', () => {
89
expect(element.hocDisplayNames).toBeNull();
90
expect(commitData.changeDescriptions.get(element.id))
91
.toMatchInlineSnapshot(`
92
- Object {
92
+ {
93
"context": true,
94
"didHooksChange": false,
95
"hooks": null,
96
"isFirstMount": false,
97
- "props": Array [],
97
+ "props": [],
98
"state": null,
99
}
100
`);
@@ -109,12 +109,12 @@ describe('Profiler change descriptions', () => {
109
expect(element.hocDisplayNames).toBeNull();
110
expect(commitData.changeDescriptions.get(element.id))
111
.toMatchInlineSnapshot(`
112
- Object {
112
+ {
113
"context": true,
114
"didHooksChange": false,
115
"hooks": null,
116
"isFirstMount": false,
117
- "props": Array [],
117
+ "props": [],
118
"state": null,
119
}
120
`);
@@ -124,12 +124,12 @@ describe('Profiler change descriptions', () => {
124
expect(element.hocDisplayNames).toEqual(['ForwardRef']);
125
expect(commitData.changeDescriptions.get(element.id))
126
.toMatchInlineSnapshot(`
127
- Object {
127
+ {
128
"context": null,
129
"didHooksChange": false,
130
"hooks": null,
131
"isFirstMount": false,
132
- "props": Array [],
132
+ "props": [],
133
"state": null,
134
}
135
`);
@@ -139,12 +139,12 @@ describe('Profiler change descriptions', () => {
139
expect(element.hocDisplayNames).toBeNull();
140
expect(commitData.changeDescriptions.get(element.id))
141
.toMatchInlineSnapshot(`
142
- Object {
142
+ {
143
"context": true,
144
"didHooksChange": false,
145
"hooks": null,
146
"isFirstMount": false,
147
- "props": Array [],
147
+ "props": [],
148
"state": null,
149
}
150
`);
packages/react-devtools-shared/src/__tests__/profilingCache-test.js
+91
-91
@@ -267,35 +267,35 @@ describe('ProfilingCache', () => {
267
expect(changeDescriptions).toHaveLength(5);
268
expect(changeDescriptions[0]).toMatchInlineSnapshot(`
269
Map {
270
- 2 => Object {
270
+ 2 => {
271
"context": null,
272
"didHooksChange": false,
273
"isFirstMount": true,
274
"props": null,
275
"state": null,
276
},
277
- 4 => Object {
277
+ 4 => {
278
"context": null,
279
"didHooksChange": false,
280
"isFirstMount": true,
281
"props": null,
282
"state": null,
283
},
284
- 5 => Object {
284
+ 5 => {
285
"context": null,
286
"didHooksChange": false,
287
"isFirstMount": true,
288
"props": null,
289
"state": null,
290
},
291
- 6 => Object {
291
+ 6 => {
292
"context": null,
293
"didHooksChange": false,
294
"isFirstMount": true,
295
"props": null,
296
"state": null,
297
},
298
- 7 => Object {
298
+ 7 => {
299
"context": null,
300
"didHooksChange": false,
301
"isFirstMount": true,
@@ -306,51 +306,51 @@ describe('ProfilingCache', () => {
306
`);
307
expect(changeDescriptions[1]).toMatchInlineSnapshot(`
308
Map {
309
- 5 => Object {
309
+ 5 => {
310
"context": null,
311
"didHooksChange": false,
312
- "hooks": Array [],
312
+ "hooks": [],
313
"isFirstMount": false,
314
- "props": Array [
314
+ "props": [
315
"count",
316
],
317
"state": null,
318
},
319
- 4 => Object {
319
+ 4 => {
320
"context": true,
321
"didHooksChange": false,
322
"hooks": null,
323
"isFirstMount": false,
324
- "props": Array [],
324
+ "props": [],
325
"state": null,
326
},
327
- 7 => Object {
327
+ 7 => {
328
"context": null,
329
"didHooksChange": false,
330
- "hooks": Array [],
330
+ "hooks": [],
331
"isFirstMount": false,
332
- "props": Array [
332
+ "props": [
333
"count",
334
],
335
"state": null,
336
},
337
- 6 => Object {
338
- "context": Array [
337
+ 6 => {
338
+ "context": [
339
"count",
340
],
341
"didHooksChange": false,
342
"hooks": null,
343
"isFirstMount": false,
344
- "props": Array [],
344
+ "props": [],
345
"state": null,
346
},
347
- 2 => Object {
347
+ 2 => {
348
"context": null,
349
"didHooksChange": false,
350
- "hooks": Array [],
350
+ "hooks": [],
351
"isFirstMount": false,
352
- "props": Array [],
353
- "state": Array [
352
+ "props": [],
353
+ "state": [
354
"count",
355
],
356
},
@@ -358,140 +358,140 @@ describe('ProfilingCache', () => {
358
`);
359
expect(changeDescriptions[2]).toMatchInlineSnapshot(`
360
Map {
361
- 5 => Object {
361
+ 5 => {
362
"context": null,
363
"didHooksChange": false,
364
- "hooks": Array [],
364
+ "hooks": [],
365
"isFirstMount": false,
366
- "props": Array [],
366
+ "props": [],
367
"state": null,
368
},
369
- 4 => Object {
369
+ 4 => {
370
"context": false,
371
"didHooksChange": false,
372
"hooks": null,
373
"isFirstMount": false,
374
- "props": Array [],
374
+ "props": [],
375
"state": null,
376
},
377
- 7 => Object {
377
+ 7 => {
378
"context": null,
379
"didHooksChange": false,
380
- "hooks": Array [],
380
+ "hooks": [],
381
"isFirstMount": false,
382
- "props": Array [],
382
+ "props": [],
383
"state": null,
384
},
385
- 6 => Object {
386
- "context": Array [],
385
+ 6 => {
386
+ "context": [],
387
"didHooksChange": false,
388
"hooks": null,
389
"isFirstMount": false,
390
- "props": Array [],
390
+ "props": [],
391
"state": null,
392
},
393
- 2 => Object {
393
+ 2 => {
394
"context": null,
395
"didHooksChange": false,
396
- "hooks": Array [],
396
+ "hooks": [],
397
"isFirstMount": false,
398
- "props": Array [
398
+ "props": [
399
"foo",
400
],
401
- "state": Array [],
401
+ "state": [],
402
},
403
}
404
`);
405
expect(changeDescriptions[3]).toMatchInlineSnapshot(`
406
Map {
407
- 5 => Object {
407
+ 5 => {
408
"context": null,
409
"didHooksChange": false,
410
- "hooks": Array [],
410
+ "hooks": [],
411
"isFirstMount": false,
412
- "props": Array [],
412
+ "props": [],
413
"state": null,
414
},
415
- 4 => Object {
415
+ 4 => {
416
"context": false,
417
"didHooksChange": false,
418
"hooks": null,
419
"isFirstMount": false,
420
- "props": Array [],
420
+ "props": [],
421
"state": null,
422
},
423
- 7 => Object {
423
+ 7 => {
424
"context": null,
425
"didHooksChange": false,
426
- "hooks": Array [],
426
+ "hooks": [],
427
"isFirstMount": false,
428
- "props": Array [],
428
+ "props": [],
429
"state": null,
430
},
431
- 6 => Object {
432
- "context": Array [],
431
+ 6 => {
432
+ "context": [],
433
"didHooksChange": false,
434
"hooks": null,
435
"isFirstMount": false,
436
- "props": Array [],
436
+ "props": [],
437
"state": null,
438
},
439
- 2 => Object {
439
+ 2 => {
440
"context": null,
441
"didHooksChange": false,
442
- "hooks": Array [],
442
+ "hooks": [],
443
"isFirstMount": false,
444
- "props": Array [
444
+ "props": [
445
"foo",
446
"bar",
447
],
448
- "state": Array [],
448
+ "state": [],
449
},
450
}
451
`);
452
expect(changeDescriptions[4]).toMatchInlineSnapshot(`
453
Map {
454
- 5 => Object {
454
+ 5 => {
455
"context": null,
456
"didHooksChange": false,
457
- "hooks": Array [],
457
+ "hooks": [],
458
"isFirstMount": false,
459
- "props": Array [],
459
+ "props": [],
460
"state": null,
461
},
462
- 4 => Object {
462
+ 4 => {
463
"context": false,
464
"didHooksChange": false,
465
"hooks": null,
466
"isFirstMount": false,
467
- "props": Array [],
467
+ "props": [],
468
"state": null,
469
},
470
- 7 => Object {
470
+ 7 => {
471
"context": null,
472
"didHooksChange": false,
473
- "hooks": Array [],
473
+ "hooks": [],
474
"isFirstMount": false,
475
- "props": Array [],
475
+ "props": [],
476
"state": null,
477
},
478
- 6 => Object {
479
- "context": Array [],
478
+ 6 => {
479
+ "context": [],
480
"didHooksChange": false,
481
"hooks": null,
482
"isFirstMount": false,
483
- "props": Array [],
483
+ "props": [],
484
"state": null,
485
},
486
- 2 => Object {
486
+ 2 => {
487
"context": null,
488
"didHooksChange": false,
489
- "hooks": Array [],
489
+ "hooks": [],
490
"isFirstMount": false,
491
- "props": Array [
491
+ "props": [
492
"bar",
493
],
494
- "state": Array [],
494
+ "state": [],
495
},
496
}
497
`);
@@ -630,7 +630,7 @@ describe('ProfilingCache', () => {
630
// 1st render: No change
631
expect(changeDescriptions[0]).toMatchInlineSnapshot(`
632
Map {
633
- 3 => Object {
633
+ 3 => {
634
"context": null,
635
"didHooksChange": false,
636
"isFirstMount": true,
@@ -643,12 +643,12 @@ describe('ProfilingCache', () => {
643
// 2nd render: Changed props
644
expect(changeDescriptions[1]).toMatchInlineSnapshot(`
645
Map {
646
- 3 => Object {
646
+ 3 => {
647
"context": false,
648
"didHooksChange": false,
649
- "hooks": Array [],
649
+ "hooks": [],
650
"isFirstMount": false,
651
- "props": Array [
651
+ "props": [
652
"count",
653
],
654
"state": null,
@@ -659,14 +659,14 @@ describe('ProfilingCache', () => {
659
// 3rd render: Changed useReducer
660
expect(changeDescriptions[2]).toMatchInlineSnapshot(`
661
Map {
662
- 3 => Object {
662
+ 3 => {
663
"context": false,
664
"didHooksChange": true,
665
- "hooks": Array [
665
+ "hooks": [
666
1,
667
],
668
"isFirstMount": false,
669
- "props": Array [],
669
+ "props": [],
670
"state": null,
671
},
672
}
@@ -675,14 +675,14 @@ describe('ProfilingCache', () => {
675
// 4th render: Changed useState
676
expect(changeDescriptions[3]).toMatchInlineSnapshot(`
677
Map {
678
- 3 => Object {
678
+ 3 => {
679
"context": false,
680
"didHooksChange": true,
681
- "hooks": Array [
681
+ "hooks": [
682
0,
683
],
684
"isFirstMount": false,
685
- "props": Array [],
685
+ "props": [],
686
"state": null,
687
},
688
}
@@ -691,12 +691,12 @@ describe('ProfilingCache', () => {
691
// 5th render: Changed context
692
expect(changeDescriptions[4]).toMatchInlineSnapshot(`
693
Map {
694
- 3 => Object {
694
+ 3 => {
695
"context": true,
696
"didHooksChange": false,
697
- "hooks": Array [],
697
+ "hooks": [],
698
"isFirstMount": false,
699
- "props": Array [],
699
+ "props": [],
700
"state": null,
701
},
702
}
@@ -705,14 +705,14 @@ describe('ProfilingCache', () => {
705
// 6th render: Sync external store
706
expect(changeDescriptions[5]).toMatchInlineSnapshot(`
707
Map {
708
- 3 => Object {
708
+ 3 => {
709
"context": false,
710
"didHooksChange": true,
711
- "hooks": Array [
711
+ "hooks": [
712
2,
713
],
714
"isFirstMount": false,
715
- "props": Array [],
715
+ "props": [],
716
"state": null,
717
},
718
}
@@ -901,25 +901,25 @@ describe('ProfilingCache', () => {
901
}
902
903
expect(allFiberCommits).toMatchInlineSnapshot(`
904
- Array [
905
- Array [
904
+ [
905
+ [
906
0,
907
1,
908
2,
909
],
910
- Array [
910
+ [
911
0,
912
1,
913
2,
914
],
915
- Array [
915
+ [
916
1,
917
2,
918
],
919
- Array [
919
+ [
920
2,
921
],
922
- Array [
922
+ [
923
0,
924
],
925
]
@@ -949,8 +949,8 @@ describe('ProfilingCache', () => {
949
const rootID = store.roots[0];
950
const commitData = store.profilerStore.getDataForRoot(rootID).commitData;
951
expect(commitData).toMatchInlineSnapshot(`
952
- Array [
953
- Object {
952
+ [
953
+ {
954
"changeDescriptions": Map {},
955
"duration": 0,
956
"effectDuration": null,
@@ -965,8 +965,8 @@ describe('ProfilingCache', () => {
965
"passiveEffectDuration": null,
966
"priorityLevel": "Immediate",
967
"timestamp": 0,
968
- "updaters": Array [
969
- Object {
968
+ "updaters": [
969
+ {
970
"displayName": "render()",
971
"hocDisplayNames": null,
972
"id": 1,
packages/react-devtools-shared/src/__tests__/profilingCharts-test.js
+21
-21
@@ -107,9 +107,9 @@ describe('profiling charts', () => {
107
const firstCommitData = getFlamegraphChartData(rootID, 0);
108
expect(firstCommitData.commitTree.nodes.size).toBe(5);
109
expect(firstCommitData.chartData.rows).toMatchInlineSnapshot(`
110
- Array [
111
- Array [
112
- Object {
110
+ [
111
+ [
112
+ {
113
"actualDuration": 15,
114
"didRender": true,
115
"id": 2,
@@ -120,8 +120,8 @@ describe('profiling charts', () => {
120
"treeBaseDuration": 15,
121
},
122
],
123
- Array [
124
- Object {
123
+ [
124
+ {
125
"actualDuration": 0,
126
"didRender": true,
127
"id": 5,
@@ -131,7 +131,7 @@ describe('profiling charts', () => {
131
"selfDuration": 0,
132
"treeBaseDuration": 0,
133
},
134
- Object {
134
+ {
135
"actualDuration": 2,
136
"didRender": true,
137
"id": 4,
@@ -141,7 +141,7 @@ describe('profiling charts', () => {
141
"selfDuration": 2,
142
"treeBaseDuration": 2,
143
},
144
- Object {
144
+ {
145
"actualDuration": 3,
146
"didRender": true,
147
"id": 3,
@@ -158,9 +158,9 @@ describe('profiling charts', () => {
158
const secondCommitData = getFlamegraphChartData(rootID, 1);
159
expect(secondCommitData.commitTree.nodes.size).toBe(5);
160
expect(secondCommitData.chartData.rows).toMatchInlineSnapshot(`
161
- Array [
162
- Array [
163
- Object {
161
+ [
162
+ [
163
+ {
164
"actualDuration": 10,
165
"didRender": true,
166
"id": 2,
@@ -171,8 +171,8 @@ describe('profiling charts', () => {
171
"treeBaseDuration": 15,
172
},
173
],
174
- Array [
175
- Object {
174
+ [
175
+ {
176
"actualDuration": 0,
177
"didRender": false,
178
"id": 5,
@@ -182,7 +182,7 @@ describe('profiling charts', () => {
182
"selfDuration": 0,
183
"treeBaseDuration": 0,
184
},
185
- Object {
185
+ {
186
"actualDuration": 0,
187
"didRender": false,
188
"id": 4,
@@ -192,7 +192,7 @@ describe('profiling charts', () => {
192
"selfDuration": 0,
193
"treeBaseDuration": 2,
194
},
195
- Object {
195
+ {
196
"actualDuration": 0,
197
"didRender": false,
198
"id": 3,
@@ -258,26 +258,26 @@ describe('profiling charts', () => {
258
const firstCommitData = getRankedChartData(rootID, 0);
259
expect(firstCommitData.commitTree.nodes.size).toBe(5);
260
expect(firstCommitData.chartData.nodes).toMatchInlineSnapshot(`
261
- Array [
262
- Object {
261
+ [
262
+ {
263
"id": 2,
264
"label": "Parent (10ms)",
265
"name": "Parent",
266
"value": 10,
267
},
268
- Object {
268
+ {
269
"id": 3,
270
"label": "Memo(Child) (Memo) key="first" (3ms)",
271
"name": "Memo(Child)",
272
"value": 3,
273
},
274
- Object {
274
+ {
275
"id": 4,
276
"label": "Memo(Child) (Memo) key="second" (2ms)",
277
"name": "Memo(Child)",
278
"value": 2,
279
},
280
- Object {
280
+ {
281
"id": 5,
282
"label": "Memo(Child) (Memo) key="third" (<0.1ms)",
283
"name": "Memo(Child)",
@@ -290,8 +290,8 @@ describe('profiling charts', () => {
290
const secondCommitData = getRankedChartData(rootID, 1);
291
expect(secondCommitData.commitTree.nodes.size).toBe(5);
292
expect(secondCommitData.chartData.nodes).toMatchInlineSnapshot(`
293
- Array [
294
- Object {
293
+ [
294
+ {
295
"id": 2,
296
"label": "Parent (10ms)",
297
"name": "Parent",
packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js
+3
-3
@@ -259,7 +259,7 @@ describe('StoreStressConcurrent', () => {
259
}
260
261
expect(snapshots).toMatchInlineSnapshot(`
262
- Array [
262
+ [
263
"[root]
264
▾ <Root>
265
<A key="a">",
@@ -430,7 +430,7 @@ describe('StoreStressConcurrent', () => {
430
}
431
432
expect(snapshots).toMatchInlineSnapshot(`
433
- Array [
433
+ [
434
"[root]
435
▾ <Root>
436
<X>
@@ -950,7 +950,7 @@ describe('StoreStressConcurrent', () => {
950
}
951
952
expect(snapshots).toMatchInlineSnapshot(`
953
- Array [
953
+ [
954
"[root]
955
▾ <Root>
956
<X>
packages/react-devtools-shared/src/backend/StyleX/__tests__/utils-test.js
+28
-28
@@ -35,30 +35,30 @@ describe('Stylex plugin utils', () => {
35
36
it('should gracefully handle empty values', () => {
37
expect(getStyleXData(null)).toMatchInlineSnapshot(`
38
- Object {
39
- "resolvedStyles": Object {},
40
- "sources": Array [],
38
+ {
39
+ "resolvedStyles": {},
40
+ "sources": [],
41
}
42
`);
43
44
expect(getStyleXData(undefined)).toMatchInlineSnapshot(`
45
- Object {
46
- "resolvedStyles": Object {},
47
- "sources": Array [],
45
+ {
46
+ "resolvedStyles": {},
47
+ "sources": [],
48
}
49
`);
50
51
expect(getStyleXData('')).toMatchInlineSnapshot(`
52
- Object {
53
- "resolvedStyles": Object {},
54
- "sources": Array [],
52
+ {
53
+ "resolvedStyles": {},
54
+ "sources": [],
55
}
56
`);
57
58
expect(getStyleXData([undefined])).toMatchInlineSnapshot(`
59
- Object {
60
- "resolvedStyles": Object {},
61
- "sources": Array [],
59
+ {
60
+ "resolvedStyles": {},
61
+ "sources": [],
62
}
63
`);
64
});
@@ -87,13 +87,13 @@ describe('Stylex plugin utils', () => {
87
alignItems: 'bar',
88
}),
89
).toMatchInlineSnapshot(`
90
- Object {
91
- "resolvedStyles": Object {
90
+ {
91
+ "resolvedStyles": {
92
"alignItems": "center",
93
"display": "flex",
94
"flexDirection": "center",
95
},
96
- "sources": Array [
96
+ "sources": [
97
"Example__style",
98
],
99
}
@@ -123,13 +123,13 @@ describe('Stylex plugin utils', () => {
123
},
124
]),
125
).toMatchInlineSnapshot(`
126
- Object {
127
- "resolvedStyles": Object {
126
+ {
127
+ "resolvedStyles": {
128
"alignItems": "center",
129
"display": "flex",
130
"flexDirection": "center",
131
},
132
- "sources": Array [
132
+ "sources": [
133
"Example1__style",
134
"Example2__style",
135
],
@@ -164,13 +164,13 @@ describe('Stylex plugin utils', () => {
164
false,
165
]),
166
).toMatchInlineSnapshot(`
167
- Object {
168
- "resolvedStyles": Object {
167
+ {
168
+ "resolvedStyles": {
169
"alignItems": "center",
170
"display": "flex",
171
"flexDirection": "center",
172
},
173
- "sources": Array [
173
+ "sources": [
174
"Example1__style",
175
"Example2__style",
176
],
@@ -204,15 +204,15 @@ describe('Stylex plugin utils', () => {
204
},
205
}),
206
).toMatchInlineSnapshot(`
207
- Object {
208
- "resolvedStyles": Object {
209
- ":hover": Object {
207
+ {
208
+ "resolvedStyles": {
209
+ ":hover": {
210
"color": "blue",
211
"textDecoration": "none",
212
},
213
"color": "black",
214
},
215
- "sources": Array [
215
+ "sources": [
216
"Example__style",
217
],
218
}
@@ -244,13 +244,13 @@ describe('Stylex plugin utils', () => {
244
false,
245
]),
246
).toMatchInlineSnapshot(`
247
- Object {
248
- "resolvedStyles": Object {
247
+ {
248
+ "resolvedStyles": {
249
"alignItems": "center",
250
"display": "flex",
251
"flexDirection": "center",
252
},
253
- "sources": Array [
253
+ "sources": [
254
"Example1__style",
255
"Example2__style",
256
"Example3__style",
packages/react-devtools-shared/src/hooks/__tests__/generateHookMap-test.js
+8
-8
@@ -70,9 +70,9 @@ export function Component() {
70
71
const encodedHookMap = generateEncodedHookMap(parsed);
72
expect(encodedHookMap).toMatchInlineSnapshot(`
73
- Object {
73
+ {
74
"mappings": "CAAD;KYCA,AgBDA;MREA,AWFA;SnBGA,AaHA,AMIA,AaJA;WpBKA,AiCLA;Y7CMA,AYNA",
75
- "names": Array [
75
+ "names": [
76
"<no-hook>",
77
"a",
78
"b",
@@ -115,9 +115,9 @@ export function Component() {
115
116
const encodedHookMap = generateEncodedHookMap(parsed);
117
expect(encodedHookMap).toMatchInlineSnapshot(`
118
- Object {
118
+ {
119
"mappings": "CAAD;MgBCA,AUDA;OFEA,AUFA",
120
- "names": Array [
120
+ "names": [
121
"<no-hook>",
122
"theme",
123
"val",
@@ -158,9 +158,9 @@ export function Component() {
158
159
const encodedHookMap = generateEncodedHookMap(parsed);
160
expect(encodedHookMap).toMatchInlineSnapshot(`
161
- Object {
161
+ {
162
"mappings": "CAAD;KyBCA;MKCA,AWDA;SrCDA",
163
- "names": Array [
163
+ "names": [
164
"<no-hook>",
165
"InnerComponent",
166
"state",
@@ -200,9 +200,9 @@ export function Component() {
200
201
const encodedHookMap = generateEncodedHookMap(parsed);
202
expect(encodedHookMap).toMatchInlineSnapshot(`
203
- Object {
203
+ {
204
"mappings": "CAAD;MwBCA,AWDA",
205
- "names": Array [
205
+ "names": [
206
"<no-hook>",
207
"val",
208
],
packages/react-devtools-timeline/src/content-views/utils/__tests__/colors-test.js
+1
-1
@@ -41,7 +41,7 @@ describe(ColorGenerator, () => {
41
describe(ColorGenerator.prototype.colorForID, () => {
42
it('should generate a color for an ID', () => {
43
expect(new ColorGenerator().colorForID('123')).toMatchInlineSnapshot(`
44
- Object {
44
+ {
45
"a": 1,
46
"h": 190,
47
"l": 80,
packages/react-devtools-timeline/src/view-base/utils/__tests__/scrollState-test.js
+2
-2
@@ -210,7 +210,7 @@ describe(zoomState, () => {
210
});
211
212
expect(zoomedState).toMatchInlineSnapshot(`
213
- Object {
213
+ {
214
"length": 200,
215
"offset": -50,
216
}
@@ -232,7 +232,7 @@ describe(moveStateToRange, () => {
232
});
233
234
expect(movedState).toMatchInlineSnapshot(`
235
- Object {
235
+ {
236
"length": 400,
237
"offset": -50,
238
}
packages/react-dom/src/__tests__/ReactDOMHydrationDiff-test.js
+37
-37
@@ -91,7 +91,7 @@ describe('ReactDOMServerHydration', () => {
91
}
92
if (gate(flags => flags.enableClientRenderFallbackOnTextMismatch)) {
93
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
94
- Array [
94
+ [
95
"Warning: Text content did not match. Server: "server" Client: "client"
96
in main (at **)
97
in div (at **)
@@ -103,7 +103,7 @@ describe('ReactDOMServerHydration', () => {
103
`);
104
} else {
105
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
106
- Array [
106
+ [
107
"Warning: Text content did not match. Server: "server" Client: "client"
108
in main (at **)
109
in div (at **)
@@ -130,7 +130,7 @@ describe('ReactDOMServerHydration', () => {
130
);
131
}
132
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
133
- Array [
133
+ [
134
"Warning: Prop \`dangerouslySetInnerHTML\` did not match. Server: "<span>server</span>" Client: "<span>client</span>"
135
in main (at **)
136
in div (at **)
@@ -154,7 +154,7 @@ describe('ReactDOMServerHydration', () => {
154
);
155
}
156
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
157
- Array [
157
+ [
158
"Warning: Prop \`className\` did not match. Server: "child server" Client: "child client"
159
in main (at **)
160
in div (at **)
@@ -177,7 +177,7 @@ describe('ReactDOMServerHydration', () => {
177
);
178
}
179
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
180
- Array [
180
+ [
181
"Warning: Prop \`tabIndex\` did not match. Server: "null" Client: "1"
182
in main (at **)
183
in div (at **)
@@ -200,7 +200,7 @@ describe('ReactDOMServerHydration', () => {
200
);
201
}
202
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
203
- Array [
203
+ [
204
"Warning: Extra attributes from the server: tabindex,dir
205
in main (at **)
206
in div (at **)
@@ -223,7 +223,7 @@ describe('ReactDOMServerHydration', () => {
223
);
224
}
225
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
226
- Array [
226
+ [
227
"Warning: Prop \`tabIndex\` did not match. Server: "null" Client: "1"
228
in main (at **)
229
in div (at **)
@@ -247,7 +247,7 @@ describe('ReactDOMServerHydration', () => {
247
);
248
}
249
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
250
- Array [
250
+ [
251
"Warning: Prop \`style\` did not match. Server: "opacity:0" Client: "opacity:1"
252
in main (at **)
253
in div (at **)
@@ -269,7 +269,7 @@ describe('ReactDOMServerHydration', () => {
269
);
270
}
271
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
272
- Array [
272
+ [
273
"Warning: Expected server HTML to contain a matching <main> in <div>.
274
in main (at **)
275
in div (at **)
@@ -293,7 +293,7 @@ describe('ReactDOMServerHydration', () => {
293
);
294
}
295
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
296
- Array [
296
+ [
297
"Warning: Expected server HTML to contain a matching <header> in <div>.
298
in header (at **)
299
in div (at **)
@@ -317,7 +317,7 @@ describe('ReactDOMServerHydration', () => {
317
);
318
}
319
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
320
- Array [
320
+ [
321
"Warning: Expected server HTML to contain a matching <main> in <div>.
322
in main (at **)
323
in div (at **)
@@ -341,7 +341,7 @@ describe('ReactDOMServerHydration', () => {
341
);
342
}
343
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
344
- Array [
344
+ [
345
"Warning: Expected server HTML to contain a matching <footer> in <div>.
346
in footer (at **)
347
in div (at **)
@@ -362,7 +362,7 @@ describe('ReactDOMServerHydration', () => {
362
}
363
if (gate(flags => flags.enableClientRenderFallbackOnTextMismatch)) {
364
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
365
- Array [
365
+ [
366
"Warning: Text content did not match. Server: "" Client: "only"
367
in div (at **)
368
in Mismatch (at **)",
@@ -373,7 +373,7 @@ describe('ReactDOMServerHydration', () => {
373
`);
374
} else {
375
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
376
- Array [
376
+ [
377
"Warning: Text content did not match. Server: "" Client: "only"
378
in div (at **)
379
in Mismatch (at **)",
@@ -394,7 +394,7 @@ describe('ReactDOMServerHydration', () => {
394
);
395
}
396
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
397
- Array [
397
+ [
398
"Warning: Expected server HTML to contain a matching text node for "second" in <div>.
399
in div (at **)
400
in Mismatch (at **)",
@@ -417,7 +417,7 @@ describe('ReactDOMServerHydration', () => {
417
);
418
}
419
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
420
- Array [
420
+ [
421
"Warning: Expected server HTML to contain a matching text node for "first" in <div>.
422
in div (at **)
423
in Mismatch (at **)",
@@ -440,7 +440,7 @@ describe('ReactDOMServerHydration', () => {
440
);
441
}
442
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
443
- Array [
443
+ [
444
"Warning: Expected server HTML to contain a matching text node for "third" in <div>.
445
in div (at **)
446
in Mismatch (at **)",
@@ -465,7 +465,7 @@ describe('ReactDOMServerHydration', () => {
465
);
466
}
467
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
468
- Array [
468
+ [
469
"Warning: Did not expect server HTML to contain a <main> in <div>.
470
in div (at **)
471
in Mismatch (at **)",
@@ -488,7 +488,7 @@ describe('ReactDOMServerHydration', () => {
488
);
489
}
490
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
491
- Array [
491
+ [
492
"Warning: Expected server HTML to contain a matching <main> in <div>.
493
in main (at **)
494
in div (at **)
@@ -513,7 +513,7 @@ describe('ReactDOMServerHydration', () => {
513
);
514
}
515
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
516
- Array [
516
+ [
517
"Warning: Expected server HTML to contain a matching <footer> in <div>.
518
in footer (at **)
519
in div (at **)
@@ -537,7 +537,7 @@ describe('ReactDOMServerHydration', () => {
537
);
538
}
539
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
540
- Array [
540
+ [
541
"Warning: Did not expect server HTML to contain a <footer> in <div>.
542
in div (at **)
543
in Mismatch (at **)",
@@ -556,7 +556,7 @@ describe('ReactDOMServerHydration', () => {
556
return <div className="parent">{!isClient && 'only'}</div>;
557
}
558
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
559
- Array [
559
+ [
560
"Warning: Did not expect server HTML to contain the text node "only" in <div>.
561
in div (at **)
562
in Mismatch (at **)",
@@ -579,7 +579,7 @@ describe('ReactDOMServerHydration', () => {
579
);
580
}
581
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
582
- Array [
582
+ [
583
"Warning: Expected server HTML to contain a matching <main> in <div>.
584
in main (at **)
585
in div (at **)
@@ -604,7 +604,7 @@ describe('ReactDOMServerHydration', () => {
604
);
605
}
606
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
607
- Array [
607
+ [
608
"Warning: Expected server HTML to contain a matching <footer> in <div>.
609
in footer (at **)
610
in div (at **)
@@ -628,7 +628,7 @@ describe('ReactDOMServerHydration', () => {
628
);
629
}
630
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
631
- Array [
631
+ [
632
"Warning: Did not expect server HTML to contain the text node "third" in <div>.
633
in div (at **)
634
in Mismatch (at **)",
@@ -662,7 +662,7 @@ describe('ReactDOMServerHydration', () => {
662
}
663
// TODO: This message doesn't seem to have any useful details.
664
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
665
- Array [
665
+ [
666
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
667
"Caught [Hydration failed because the initial UI does not match what was rendered on the server.]",
668
"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', () => {
684
);
685
}
686
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
687
- Array [
687
+ [
688
"Warning: Did not expect server HTML to contain a <main> in <div>.
689
in div (at **)
690
in Mismatch (at **)",
@@ -711,7 +711,7 @@ describe('ReactDOMServerHydration', () => {
711
}
712
// TODO: This message doesn't seem to have any useful details.
713
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
714
- Array [
714
+ [
715
"Warning: An error occurred during hydration. The server HTML was replaced with client content in <div>.",
716
"Caught [Hydration failed because the initial UI does not match what was rendered on the server.]",
717
"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', () => {
739
// unhydrated tail nodes and this template is the first match. When we add special case handling for client
740
// rendered suspense boundaries this test will likely change again
741
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
742
- Array [
742
+ [
743
"Warning: Did not expect server HTML to contain a <template> in <div>.
744
in div (at **)
745
in Mismatch (at **)",
@@ -764,7 +764,7 @@ describe('ReactDOMServerHydration', () => {
764
);
765
}
766
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
767
- Array [
767
+ [
768
"Warning: Expected server HTML to contain a matching <main> in <div>.
769
in main (at **)
770
in Suspense (at **)
@@ -790,7 +790,7 @@ describe('ReactDOMServerHydration', () => {
790
);
791
}
792
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
793
- Array [
793
+ [
794
"Warning: Expected server HTML to contain a matching <footer> in <div>.
795
in footer (at **)
796
in Suspense (at **)
@@ -822,7 +822,7 @@ describe('ReactDOMServerHydration', () => {
822
}
823
824
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
825
- Array [
825
+ [
826
"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]",
827
]
828
`);
@@ -848,7 +848,7 @@ describe('ReactDOMServerHydration', () => {
848
}
849
850
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
851
- Array [
851
+ [
852
"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]",
853
]
854
`);
@@ -872,7 +872,7 @@ describe('ReactDOMServerHydration', () => {
872
);
873
}
874
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
875
- Array [
875
+ [
876
"Warning: Expected server HTML to contain a matching <header> in <div>.
877
in header (at **)
878
in div (at **)
@@ -902,7 +902,7 @@ describe('ReactDOMServerHydration', () => {
902
);
903
}
904
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
905
- Array [
905
+ [
906
"Warning: Did not expect server HTML to contain a <header> in <div>.
907
in div (at **)
908
in Mismatch (at **)",
@@ -951,7 +951,7 @@ describe('ReactDOMServerHydration', () => {
951
}
952
953
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
954
- Array [
954
+ [
955
"Warning: Expected server HTML to contain a matching <footer> in <div>.
956
in footer (at **)
957
in Panel (at **)
@@ -1000,7 +1000,7 @@ describe('ReactDOMServerHydration', () => {
1000
}
1001
1002
expect(testMismatch(Mismatch)).toMatchInlineSnapshot(`
1003
- Array [
1003
+ [
1004
"Warning: Did not expect server HTML to contain a <footer> in <div>.
1005
in div (at **)
1006
in ProfileSettings (at **)
packages/react-dom/src/__tests__/__snapshots__/ReactTestUtils-test.js.snap
+1
-1
@@ -1,7 +1,7 @@
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
3
exports[`ReactTestUtils Simulate should have locally attached media events 1`] = `
4
-Array [
4
+[
5
"abort",
6
"animationEnd",
7
"animationIteration",
packages/react-native-renderer/src/__tests__/__snapshots__/ReactFabric-test.internal.js.snap
+1
-1
@@ -103,7 +103,7 @@ exports[`ReactFabric renders and reorders children 2`] = `
103
`;
104
105
exports[`ReactFabric should call complete after inserting children 1`] = `
106
-Array [
106
+[
107
"RCTView {"foo":"a"}
108
RCTView {"foo":"b"}",
109
]
packages/react-server-native-relay/src/__tests__/__snapshots__/ReactFlightNativeRelay-test.internal.js.snap
+2
-2
@@ -9,8 +9,8 @@ exports[`ReactFlightNativeRelay can render a Client Component using a module ref
9
`;
10
11
exports[`ReactFlightNativeRelay can render a Server Component 1`] = `
12
-Object {
13
- "foo": Object {
12
+{
13
+ "foo": {
14
"bar": <RCTView>
15
<RCTText>
16
A
packages/react/src/__tests__/__snapshots__/ReactProfiler-test.internal.js.snap
+2
-2
@@ -19,7 +19,7 @@ exports[`Profiler works in profiling and non-profiling bundles enableProfilerTim
19
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:disabled should support an empty Profiler (with no children) 2`] = `<div />`;
20
21
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:disabled should support nested Profilers 1`] = `
22
-Array [
22
+[
23
<div>
24
outer function component
25
</div>,
@@ -51,7 +51,7 @@ exports[`Profiler works in profiling and non-profiling bundles enableProfilerTim
51
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:enabled should support an empty Profiler (with no children) 2`] = `<div />`;
52
53
exports[`Profiler works in profiling and non-profiling bundles enableProfilerTimer:enabled should support nested Profilers 1`] = `
54
-Array [
54
+[
55
<div>
56
outer function component
57
</div>,
scripts/jest/config.base.js
-3
@@ -24,9 +24,6 @@ module.exports = {
24
enableGlobally: true,
25
legacyFakeTimers: true,
26
},
27
- snapshotFormat: {
28
- printBasicPrototype: true,
29
- },
27
snapshotSerializers: [require.resolve('jest-snapshot-serializer-raw')],
28
29
testSequencer: require.resolve('./jestSequencer'),