Skip to content

Commit 956d011

Browse files
authored
Update Jest to v29 (#1271)
* Update Jest to v29 * Add stream to workspace test Without `--stream` in the workspace package, the command ends successfully without correctly running the tests.
1 parent 8ddb6a2 commit 956d011

File tree

4 files changed

+983
-16
lines changed

4 files changed

+983
-16
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"reset": "yarn && yarn clean && yarn build",
1717
"clean": "lerna run clean",
1818
"build": "lerna run build",
19-
"test": "yarn workspace foam-vscode test",
19+
"test": "yarn workspace foam-vscode test --stream",
2020
"lint": "lerna run lint",
2121
"watch": "lerna run watch --concurrency 20 --stream"
2222
},

packages/foam-vscode/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,7 @@
561561
},
562562
"devDependencies": {
563563
"@types/dateformat": "^3.0.1",
564-
"@types/jest": "^27.5.1",
564+
"@types/jest": "^29.5.3",
565565
"@types/lodash": "^4.14.157",
566566
"@types/markdown-it": "^12.0.1",
567567
"@types/micromatch": "^4.0.1",
@@ -578,12 +578,12 @@
578578
"eslint-plugin-import": "^2.27.5",
579579
"eslint-plugin-jest": "^27.2.1",
580580
"husky": "^4.2.5",
581-
"jest": "^27.5.1",
581+
"jest": "^29.6.2",
582582
"jest-extended": "^3.2.3",
583583
"markdown-it": "^12.0.4",
584584
"micromatch": "^4.0.2",
585585
"rimraf": "^3.0.2",
586-
"ts-jest": "^27.1.5",
586+
"ts-jest": "^29.1.1",
587587
"tslib": "^2.0.0",
588588
"typescript": "^4.9.5",
589589
"vscode-test": "^1.3.0",

packages/foam-vscode/src/test/support/vscode-environment.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const NodeEnvironment = require('jest-environment-node');
1+
const { TestEnvironment } = require('jest-environment-node');
22
const vscode = require('vscode');
33

4-
class VscodeEnvironment extends NodeEnvironment {
4+
class VscodeEnvironment extends TestEnvironment {
55
async setup() {
66
await super.setup();
77
this.global.vscode = vscode;

0 commit comments

Comments
 (0)