Skip to content

Commit 4bec6e2

Browse files
authored
Upgrade Jest to 30.2.0 (#536)
* Upgrade Jest to 30.2.0, bump CI node version support * Revert node version change * Add skip-lib-check to work around a broken dependency
1 parent 2cb9c11 commit 4bec6e2

23 files changed

+6187
-5014
lines changed

package-lock.json

Lines changed: 5755 additions & 4533 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@
4343
"eslint": "8.0.0",
4444
"eslint-plugin-prettier": "5.1.2",
4545
"eslint-plugin-react-hooks": "4.6.0",
46-
"jest": "24.3.0",
46+
"jest": "30.2.0",
47+
"jest-environment-jsdom": "29.7.0",
4748
"jfrview": "0.2.0",
4849
"jsverify": "0.8.3",
4950
"jszip": "3.1.5",
@@ -52,14 +53,15 @@
5253
"prettier": "3.1.1",
5354
"protobufjs": "6.8.8",
5455
"source-map": "0.6.1",
55-
"ts-jest": "24.3.0",
56+
"ts-jest": "29.4.6",
5657
"tsx": "4.19.2",
5758
"typescript": "5.9.3",
5859
"typescript-json-schema": "0.67.0",
5960
"uglify-es": "3.2.2",
6061
"uint8array-json-parser": "0.0.2"
6162
},
6263
"jest": {
64+
"testEnvironment": "jsdom",
6365
"transform": {
6466
"^.+\\.tsx?$": "ts-jest",
6567
"^.+\\.js$": "esbuild-jest"

scripts/generate-file-format-schema-json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const child_process = require('child_process')
33

44
// Convert the file-format-spec.ts file into a json schema file
55
let jsonSchema = child_process.execSync(
6-
'node_modules/.bin/typescript-json-schema ./src/lib/file-format-spec.ts --titles --required --topRef "*"',
6+
'node_modules/.bin/typescript-json-schema ./src/lib/file-format-spec.ts --titles --required --topRef "*" --skipLibCheck',
77
{
88
encoding: 'utf8',
99
},

src/import/__snapshots__/bg-flamegraph.test.ts.snap

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

33
exports[`importFromBGFlameGraph 1`] = `
4-
Object {
5-
"frames": Array [
4+
{
5+
"frames": [
66
Frame {
77
"col": undefined,
88
"file": undefined,
@@ -41,7 +41,7 @@ Object {
4141
},
4242
],
4343
"name": "simple.txt",
44-
"stacks": Array [
44+
"stacks": [
4545
"a;b;c 2",
4646
"a;b;d 4",
4747
"a;b;c 3",
@@ -51,8 +51,8 @@ Object {
5151
`;
5252

5353
exports[`importFromBGFlameGraph with CRLF 1`] = `
54-
Object {
55-
"frames": Array [
54+
{
55+
"frames": [
5656
Frame {
5757
"col": undefined,
5858
"file": undefined,
@@ -91,7 +91,7 @@ Object {
9191
},
9292
],
9393
"name": "simple-crlf.txt",
94-
"stacks": Array [
94+
"stacks": [
9595
"a;b;c 2",
9696
"a;b;d 4",
9797
"a;b;c 3",
@@ -105,8 +105,8 @@ exports[`importFromBGFlameGraph with CRLF: indexToView 1`] = `0`;
105105
exports[`importFromBGFlameGraph with CRLF: profileGroup.name 1`] = `"simple-crlf.txt"`;
106106

107107
exports[`importFromBGFlameGraph with UTF-16, Big Endian 1`] = `
108-
Object {
109-
"frames": Array [
108+
{
109+
"frames": [
110110
Frame {
111111
"col": undefined,
112112
"file": undefined,
@@ -145,7 +145,7 @@ Object {
145145
},
146146
],
147147
"name": "simple-utf16-be.txt",
148-
"stacks": Array [
148+
"stacks": [
149149
"a;b;c 2",
150150
"a;b;d 4",
151151
"a;b;c 3",
@@ -159,8 +159,8 @@ exports[`importFromBGFlameGraph with UTF-16, Big Endian: indexToView 1`] = `0`;
159159
exports[`importFromBGFlameGraph with UTF-16, Big Endian: profileGroup.name 1`] = `"simple-utf16-be.txt"`;
160160

161161
exports[`importFromBGFlameGraph with UTF-16, Little Endian 1`] = `
162-
Object {
163-
"frames": Array [
162+
{
163+
"frames": [
164164
Frame {
165165
"col": undefined,
166166
"file": undefined,
@@ -199,7 +199,7 @@ Object {
199199
},
200200
],
201201
"name": "simple-utf16-le.txt",
202-
"stacks": Array [
202+
"stacks": [
203203
"a;b;c 2",
204204
"a;b;d 4",
205205
"a;b;c 3",
@@ -213,8 +213,8 @@ exports[`importFromBGFlameGraph with UTF-16, Little Endian: indexToView 1`] = `0
213213
exports[`importFromBGFlameGraph with UTF-16, Little Endian: profileGroup.name 1`] = `"simple-utf16-le.txt"`;
214214

215215
exports[`importFromBGFlameGraph with invalid lines 1`] = `
216-
Object {
217-
"frames": Array [
216+
{
217+
"frames": [
218218
Frame {
219219
"col": undefined,
220220
"file": undefined,
@@ -253,7 +253,7 @@ Object {
253253
},
254254
],
255255
"name": "simple-with-invalids.txt",
256-
"stacks": Array [
256+
"stacks": [
257257
"a;b;c 2",
258258
"a;b;d 4",
259259
"a;b;c 3",

src/import/__snapshots__/callgrind.test.ts.snap

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

33
exports[`importFromCallgrind 1`] = `
4-
Object {
5-
"frames": Array [
4+
{
5+
"frames": [
66
Frame {
77
"col": undefined,
88
"file": "file1.c",
@@ -32,7 +32,7 @@ Object {
3232
},
3333
],
3434
"name": "callgrind.example.log -- Instructions",
35-
"stacks": Array [
35+
"stacks": [
3636
"main;func1;func2 300",
3737
"main;func1 100",
3838
"main;func2 400",
@@ -42,8 +42,8 @@ Object {
4242
`;
4343

4444
exports[`importFromCallgrind cfn reset 1`] = `
45-
Object {
46-
"frames": Array [
45+
{
46+
"frames": [
4747
Frame {
4848
"col": undefined,
4949
"file": "alpha.c",
@@ -82,7 +82,7 @@ Object {
8282
},
8383
],
8484
"name": "callgrind.cfn-reset.log -- Instructions",
85-
"stacks": Array [
85+
"stacks": [
8686
"alpha;beta 10",
8787
"alpha;gamma 10",
8888
"alpha;delta;gamma 10",
@@ -97,8 +97,8 @@ exports[`importFromCallgrind cfn reset: indexToView 1`] = `0`;
9797
exports[`importFromCallgrind cfn reset: profileGroup.name 1`] = `"callgrind.cfn-reset.log"`;
9898

9999
exports[`importFromCallgrind multiple event types 1`] = `
100-
Object {
101-
"frames": Array [
100+
{
101+
"frames": [
102102
Frame {
103103
"col": undefined,
104104
"file": "file1.c",
@@ -128,7 +128,7 @@ Object {
128128
},
129129
],
130130
"name": "callgrind.multiple-event-types.log -- Time",
131-
"stacks": Array [
131+
"stacks": [
132132
"main;func1;func2 3.00µs",
133133
"main;func1 1.00µs",
134134
"main;func2 4.00µs",
@@ -138,8 +138,8 @@ Object {
138138
`;
139139

140140
exports[`importFromCallgrind multiple event types 2`] = `
141-
Object {
142-
"frames": Array [
141+
{
142+
"frames": [
143143
Frame {
144144
"col": undefined,
145145
"file": "file1.c",
@@ -169,7 +169,7 @@ Object {
169169
},
170170
],
171171
"name": "callgrind.multiple-event-types.log -- Memory",
172-
"stacks": Array [
172+
"stacks": [
173173
"main;func1;func2 4.88 KB",
174174
"main;func1 14.65 KB",
175175
"main;func2 2.93 KB",
@@ -183,8 +183,8 @@ exports[`importFromCallgrind multiple event types: indexToView 1`] = `0`;
183183
exports[`importFromCallgrind multiple event types: profileGroup.name 1`] = `"callgrind.multiple-event-types.log"`;
184184

185185
exports[`importFromCallgrind name compression 1`] = `
186-
Object {
187-
"frames": Array [
186+
{
187+
"frames": [
188188
Frame {
189189
"col": undefined,
190190
"file": "file1.c",
@@ -214,7 +214,7 @@ Object {
214214
},
215215
],
216216
"name": "callgrind.name-compression.log -- Instructions",
217-
"stacks": Array [
217+
"stacks": [
218218
"main;func1;func2 300",
219219
"main;func1 100",
220220
"main;func2 400",
@@ -228,8 +228,8 @@ exports[`importFromCallgrind name compression: indexToView 1`] = `0`;
228228
exports[`importFromCallgrind name compression: profileGroup.name 1`] = `"callgrind.name-compression.log"`;
229229

230230
exports[`importFromCallgrind subposition compression 1`] = `
231-
Object {
232-
"frames": Array [
231+
{
232+
"frames": [
233233
Frame {
234234
"col": undefined,
235235
"file": "file1.c",
@@ -259,7 +259,7 @@ Object {
259259
},
260260
],
261261
"name": "callgrind.subposition-compression.log -- Instructions",
262-
"stacks": Array [
262+
"stacks": [
263263
"main;func1;func2 300",
264264
"main;func1 100",
265265
"main;func2 400",

0 commit comments

Comments
 (0)