Skip to content

Commit 5c7515a

Browse files
authored
Update all of jest 29.7.0 → 30.0.0 (major) (#5495)
2 parents 9598fe1 + a15db04 commit 5c7515a

15 files changed

+1297
-1038
lines changed

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
"test-coverage": "run-s test-build-coverage test-serve-coverage",
5555
"test-alex": "alex ./docs-* *.md",
5656
"test-lockfile": "lockfile-lint --path yarn.lock --allowed-hosts yarn --validate-https",
57-
"test-debug": "node --inspect-brk node_modules/.bin/jest --runInBand"
57+
"test-debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
58+
"postinstall": "patch-package"
5859
},
5960
"license": "MPL-2.0",
6061
"repository": {
@@ -123,7 +124,7 @@
123124
"@testing-library/react": "^16.3.0",
124125
"alex": "^11.0.1",
125126
"autoprefixer": "^10.4.21",
126-
"babel-jest": "^29.7.0",
127+
"babel-jest": "^30.0.0",
127128
"babel-loader": "^10.0.0",
128129
"babel-plugin-module-resolver": "^5.0.2",
129130
"browserslist": "^4.25.0",
@@ -152,17 +153,19 @@
152153
"glob": "^11.0.3",
153154
"html-webpack-plugin": "^5.6.3",
154155
"husky": "^4.3.8",
155-
"jest": "^29.7.0",
156-
"jest-environment-jsdom": "^29.7.0",
156+
"jest": "^30.0.0",
157+
"jest-environment-jsdom": "^30.0.0",
157158
"jest-extended": "^6.0.0",
158159
"json-loader": "^0.5.7",
159160
"local-web-server": "^5.4.0",
160161
"lockfile-lint": "^4.14.1",
161162
"mkdirp": "^3.0.1",
162163
"npm-run-all2": "^8.0.4",
163164
"open": "^10.1.2",
165+
"patch-package": "^8.0.0",
164166
"postcss": "^8.5.4",
165167
"postcss-loader": "^8.1.1",
168+
"postinstall-postinstall": "^2.1.0",
166169
"prettier": "^3.5.3",
167170
"raw-loader": "^4.0.2",
168171
"rimraf": "^5.0.10",

patches/jsdom+26.1.0.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/node_modules/jsdom/lib/jsdom/browser/Window.js b/node_modules/jsdom/lib/jsdom/browser/Window.js
2+
index 52d011c..5b29f5a 100644
3+
--- a/node_modules/jsdom/lib/jsdom/browser/Window.js
4+
+++ b/node_modules/jsdom/lib/jsdom/browser/Window.js
5+
@@ -507,7 +507,7 @@ function installOwnProperties(window, options) {
6+
// [LegacyUnforgeable]:
7+
window: { configurable: false },
8+
document: { configurable: false },
9+
- location: { configurable: false },
10+
+ location: { configurable: true },
11+
top: { configurable: false }
12+
});
13+

src/test/components/NetworkChart.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ describe('NetworkChartRowBar phase calculations', function () {
455455
const barStyles = getBarElementStyles();
456456
expect(barStyles).toHaveLength(2);
457457
expect(barStyles).toEqual([
458-
'width: 40px; left: -18870px;',
458+
'left: -18870px; width: 40px;',
459459
'width: 198px; left: 150px;',
460460
]);
461461
});
@@ -485,7 +485,7 @@ describe('NetworkChartRowBar phase calculations', function () {
485485
const barStyles = getBarElementStyles();
486486
expect(barStyles).toHaveLength(2);
487487
expect(barStyles).toEqual([
488-
'width: 40px; left: -18870px;',
488+
'left: -18870px; width: 40px;',
489489
'width: 198px; left: 150px;',
490490
]);
491491
});

src/test/components/__snapshots__/CallTreeSidebar.test.js.snap

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`CallTreeSidebar can expand subcategories 1`] = `
44
<aside
@@ -125,7 +125,7 @@ exports[`CallTreeSidebar can expand subcategories 1`] = `
125125
>
126126
<div
127127
class="sidebar-histogram-bar-color category-color-purple"
128-
style="width: 100.0000%;"
128+
style="width: 100%;"
129129
/>
130130
</div>
131131
<h4
@@ -168,7 +168,7 @@ exports[`CallTreeSidebar can expand subcategories 1`] = `
168168
>
169169
<div
170170
class="sidebar-histogram-bar-color category-color-purple"
171-
style="width: 100.0000%;"
171+
style="width: 100%;"
172172
/>
173173
</div>
174174
</div>
@@ -300,7 +300,7 @@ exports[`CallTreeSidebar can expand subcategories 2`] = `
300300
>
301301
<div
302302
class="sidebar-histogram-bar-color category-color-purple"
303-
style="width: 100.0000%;"
303+
style="width: 100%;"
304304
/>
305305
</div>
306306
<div
@@ -373,7 +373,7 @@ exports[`CallTreeSidebar can expand subcategories 2`] = `
373373
>
374374
<div
375375
class="sidebar-histogram-bar-color category-color-purple"
376-
style="width: 100.0000%;"
376+
style="width: 100%;"
377377
/>
378378
</div>
379379
</div>
@@ -485,7 +485,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying bytes data 2`] =
485485
>
486486
<div
487487
class="sidebar-histogram-bar-color category-color-yellow"
488-
style="width: 100.0000%;"
488+
style="width: 100%;"
489489
/>
490490
</div>
491491
</div>
@@ -623,7 +623,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
623623
>
624624
<div
625625
class="sidebar-histogram-bar-color category-color-yellow"
626-
style="width: 100.0000%;"
626+
style="width: 100%;"
627627
/>
628628
</div>
629629
</div>
@@ -749,7 +749,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
749749
>
750750
<div
751751
class="sidebar-histogram-bar-color category-color-yellow"
752-
style="width: 100.0000%;"
752+
style="width: 100%;"
753753
/>
754754
</div>
755755
</div>
@@ -875,7 +875,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
875875
>
876876
<div
877877
class="sidebar-histogram-bar-color category-color-transparent"
878-
style="width: 50.0000%;"
878+
style="width: 50%;"
879879
/>
880880
</div>
881881
<div
@@ -898,7 +898,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
898898
>
899899
<div
900900
class="sidebar-histogram-bar-color category-color-purple"
901-
style="width: 50.0000%;"
901+
style="width: 50%;"
902902
/>
903903
</div>
904904
<h4
@@ -935,7 +935,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
935935
>
936936
<div
937937
class="sidebar-histogram-bar-color category-color-purple"
938-
style="width: 100.0000%;"
938+
style="width: 100%;"
939939
/>
940940
</div>
941941
</div>
@@ -1061,7 +1061,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
10611061
>
10621062
<div
10631063
class="sidebar-histogram-bar-color category-color-yellow"
1064-
style="width: 100.0000%;"
1064+
style="width: 100%;"
10651065
/>
10661066
</div>
10671067
<h4
@@ -1098,7 +1098,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
10981098
>
10991099
<div
11001100
class="sidebar-histogram-bar-color category-color-yellow"
1101-
style="width: 100.0000%;"
1101+
style="width: 100%;"
11021102
/>
11031103
</div>
11041104
</div>
@@ -1236,7 +1236,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
12361236
>
12371237
<div
12381238
class="sidebar-histogram-bar-color category-color-yellow"
1239-
style="width: 100.0000%;"
1239+
style="width: 100%;"
12401240
/>
12411241
</div>
12421242
</div>
@@ -1362,7 +1362,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
13621362
>
13631363
<div
13641364
class="sidebar-histogram-bar-color category-color-purple"
1365-
style="width: 100.0000%;"
1365+
style="width: 100%;"
13661366
/>
13671367
</div>
13681368
</div>
@@ -1488,7 +1488,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
14881488
>
14891489
<div
14901490
class="sidebar-histogram-bar-color category-color-transparent"
1491-
style="width: 100.0000%;"
1491+
style="width: 100%;"
14921492
/>
14931493
</div>
14941494
</div>
@@ -1614,7 +1614,7 @@ exports[`CallTreeSidebar matches the snapshots when displaying data about the cu
16141614
>
16151615
<div
16161616
class="sidebar-histogram-bar-color category-color-purple"
1617-
style="width: 100.0000%;"
1617+
style="width: 100%;"
16181618
/>
16191619
</div>
16201620
</div>

src/test/components/__snapshots__/FlameGraph.test.js.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`FlameGraph EmptyReasons matches the snapshot when a profile has no samples 1`] = `
44
<div
@@ -120,7 +120,7 @@ exports[`FlameGraph has a tooltip that matches the snapshot with categories 1`]
120120
>
121121
<div
122122
class="tooltipCallNodeGraphMeterBar"
123-
style="width: 100%;"
123+
style="width: 100%; background: var(--blue-40);"
124124
/>
125125
</div>
126126
<div
@@ -160,7 +160,7 @@ exports[`FlameGraph has a tooltip that matches the snapshot with categories 1`]
160160
>
161161
<div
162162
class="tooltipCallNodeGraphMeterBar"
163-
style="width: 33.33333333333333%;"
163+
style="width: 33.33333333333333%; background: var(--category-color-lightblue);"
164164
/>
165165
</div>
166166
<div
@@ -200,7 +200,7 @@ exports[`FlameGraph has a tooltip that matches the snapshot with categories 1`]
200200
>
201201
<div
202202
class="tooltipCallNodeGraphMeterBar"
203-
style="width: 66.66666666666666%;"
203+
style="width: 66.66666666666666%; background: var(--category-color-green);"
204204
/>
205205
</div>
206206
<div
@@ -331,7 +331,7 @@ exports[`FlameGraph has a tooltip that matches the snapshot with categories when
331331
>
332332
<div
333333
class="tooltipCallNodeGraphMeterBar"
334-
style="width: 100%;"
334+
style="width: 100%; background: var(--blue-40);"
335335
/>
336336
</div>
337337
<div
@@ -371,7 +371,7 @@ exports[`FlameGraph has a tooltip that matches the snapshot with categories when
371371
>
372372
<div
373373
class="tooltipCallNodeGraphMeterBar"
374-
style="width: 100%;"
374+
style="width: 100%; background: var(--category-color-lightblue);"
375375
/>
376376
</div>
377377
<div
@@ -933,7 +933,7 @@ exports[`FlameGraph shows a tooltip with the resource information with categorie
933933
>
934934
<div
935935
class="tooltipCallNodeGraphMeterBar"
936-
style="width: 100%;"
936+
style="width: 100%; background: var(--blue-40);"
937937
/>
938938
</div>
939939
<div
@@ -946,7 +946,7 @@ exports[`FlameGraph shows a tooltip with the resource information with categorie
946946
>
947947
<div
948948
class="tooltipCallNodeGraphMeterBar"
949-
style="width: 100%;"
949+
style="width: 100%; background: var(--blue-40);"
950950
/>
951951
</div>
952952
</div>
@@ -978,7 +978,7 @@ exports[`FlameGraph shows a tooltip with the resource information with categorie
978978
>
979979
<div
980980
class="tooltipCallNodeGraphMeterBar"
981-
style="width: 100%;"
981+
style="width: 100%; background: var(--category-color-green);"
982982
/>
983983
</div>
984984
<div
@@ -991,7 +991,7 @@ exports[`FlameGraph shows a tooltip with the resource information with categorie
991991
>
992992
<div
993993
class="tooltipCallNodeGraphMeterBar"
994-
style="width: 100%;"
994+
style="width: 100%; background: var(--category-color-green);"
995995
/>
996996
</div>
997997
</div>

src/test/components/__snapshots__/SampleTooltipContents.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`SampleTooltipContents renders the CPU usage only when outside of the activity graph is hovered 1`] = `
44
<div

src/test/components/__snapshots__/TooltipMarker.test.js.snap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`TooltipMarker renders profiled off-main thread FileIO markers properly 1`] = `
44
<div
@@ -414,7 +414,7 @@ exports[`TooltipMarker renders properly network markers where content type is bl
414414
<div
415415
aria-hidden="true"
416416
class="tooltipNetworkPhase tooltipNetworkPhaseEmpty"
417-
style="margin-left: 83.7404047452896%;"
417+
style="margin-left: 83.7404047452896%; margin-right: 7.105427357601002e-15%;"
418418
/>
419419
</div>
420420
</div>
@@ -600,7 +600,7 @@ exports[`TooltipMarker renders properly network markers where content type is mi
600600
<div
601601
aria-hidden="true"
602602
class="tooltipNetworkPhase tooltipNetworkPhaseEmpty"
603-
style="margin-left: 83.7404047452896%;"
603+
style="margin-left: 83.7404047452896%; margin-right: 7.105427357601002e-15%;"
604604
/>
605605
</div>
606606
</div>
@@ -791,7 +791,7 @@ exports[`TooltipMarker renders properly network markers with a preconnect part 2
791791
<div
792792
aria-hidden="true"
793793
class="tooltipNetworkPhase"
794-
style="margin-left: 95.9090909090909%; opacity: 0.5;"
794+
style="margin-left: 95.9090909090909%; margin-right: 2.6645352591003757e-15%; opacity: 0.5;"
795795
/>
796796
<h3
797797
class="tooltipNetworkTitle3"
@@ -860,7 +860,7 @@ exports[`TooltipMarker renders properly network markers with a preconnect part 2
860860
<div
861861
aria-hidden="true"
862862
class="tooltipNetworkPhase tooltipNetworkPhaseEmpty"
863-
style="margin-left: 83.7404047452896%;"
863+
style="margin-left: 83.7404047452896%; margin-right: 7.105427357601002e-15%;"
864864
/>
865865
</div>
866866
</div>
@@ -1056,7 +1056,7 @@ exports[`TooltipMarker renders properly network markers with a preconnect part c
10561056
<div
10571057
aria-hidden="true"
10581058
class="tooltipNetworkPhase tooltipNetworkPhaseEmpty"
1059-
style="margin-left: 83.7404047452896%;"
1059+
style="margin-left: 83.7404047452896%; margin-right: 7.105427357601002e-15%;"
10601060
/>
10611061
</div>
10621062
</div>
@@ -1310,7 +1310,7 @@ exports[`TooltipMarker renders properly normal network markers 1`] = `
13101310
<div
13111311
aria-hidden="true"
13121312
class="tooltipNetworkPhase tooltipNetworkPhaseEmpty"
1313-
style="margin-left: 83.69368112707495%;"
1313+
style="margin-left: 83.69368112707495%; margin-right: -3.552713678800501e-15%;"
13141314
/>
13151315
</div>
13161316
</div>

src/test/components/__snapshots__/TrackBandwidth.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`TrackBandwidth draws a dot that matches the snapshot 1`] = `
44
<div

src/test/components/__snapshots__/TrackCustomMarker.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`TrackCustomMarker draws a dot that matches the snapshot 1`] = `
44
<div

src/test/components/__snapshots__/TrackMemory.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Jest Snapshot v1, https://goo.gl/fbAQLP
1+
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
22

33
exports[`TrackMemory draws a dot that matches the snapshot 1`] = `
44
<div

0 commit comments

Comments
 (0)