Skip to content

Commit 7dbbcb7

Browse files
committed
update jest
1 parent 54ae170 commit 7dbbcb7

File tree

3 files changed

+410
-474
lines changed

3 files changed

+410
-474
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"author": "Elisha Nuchi",
3535
"license": "MIT",
3636
"engines": {
37-
"node": ">=10.0.0",
37+
"node": ">=20.0.0",
3838
"npm": ">=6.0.0"
3939
},
4040
"dependencies": {
@@ -74,8 +74,8 @@
7474
"eslint-plugin-react-hooks": "^4.6.0",
7575
"eslint-plugin-react-refresh": "^0.4.6",
7676
"gas-types-detailed": "^1.1.2",
77-
"jest": "^28.1.1",
78-
"jest-environment-node": "^28.1.1",
77+
"jest": "^29.7.0",
78+
"jest-environment-node": "^29.7.0",
7979
"jest-image-snapshot": "^5.1.0",
8080
"postcss": "^8.4.38",
8181
"postcss-preset-env": "^9.5.4",

test/puppeteer-environment.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import NodeEnvironment from 'jest-environment-node';
1010

1111
const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup');
1212

13-
export default class PuppeteerEnvironment extends NodeEnvironment.TestEnvironment {
13+
export default class PuppeteerEnvironment extends NodeEnvironment.default {
1414
async setup() {
15+
await super.setup();
1516
// get the wsEndpoint
1617
const wsEndpoint = await readFile(path.join(DIR, 'wsEndpoint'), 'utf8');
1718
if (!wsEndpoint) {
@@ -23,4 +24,12 @@ export default class PuppeteerEnvironment extends NodeEnvironment.TestEnvironmen
2324
browserWSEndpoint: wsEndpoint,
2425
});
2526
}
27+
28+
async teardown() {
29+
await super.teardown();
30+
}
31+
32+
getVmContext() {
33+
return super.getVmContext();
34+
}
2635
}

0 commit comments

Comments
 (0)