Skip to content

Commit b6c04ed

Browse files
committed
Fix Jest with Node 22.18
1 parent a1383f8 commit b6c04ed

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.vscode/settings.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"jest.autoRun": "off",
4141
"jest.nodeEnv": {
4242
"LANG": "en-US",
43-
"TZ": "UTC"
43+
"TZ": "UTC",
44+
"NODE_OPTIONS": "--no-experimental-strip-types"
4445
},
4546

4647
// These custom rules are read in extensions/ql-vscode/.markdownlint-cli2.cjs
@@ -79,6 +80,7 @@
7980
"env": {
8081
"LANG": "en-US",
8182
"TZ": "UTC",
83+
"NODE_OPTIONS": "--no-experimental-strip-types",
8284

8385
// Uncomment to set a custom path to a CodeQL checkout.
8486
// "TEST_CODEQL_PATH": "/absolute/path/to/checkout/of/codeql",
@@ -88,7 +90,7 @@
8890
// "CLI_PATH": "/absolute/path/to/custom/codeql",
8991

9092
// Uncomment to debug integration tests
91-
"VSCODE_WAIT_FOR_DEBUGGER": "true",
93+
"VSCODE_WAIT_FOR_DEBUGGER": "true"
9294
}
9395
},
9496
"terminal.integrated.env.linux": {
@@ -105,10 +107,10 @@
105107
},
106108
"[typescript]": {
107109
"editor.defaultFormatter": "esbenp.prettier-vscode",
108-
"editor.formatOnSave": true,
110+
"editor.formatOnSave": true
109111
},
110112
"[typescriptreact]": {
111113
"editor.defaultFormatter": "esbenp.prettier-vscode",
112-
"editor.formatOnSave": true,
113-
},
114+
"editor.formatOnSave": true
115+
}
114116
}

extensions/ql-vscode/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,13 +1976,13 @@
19761976
"build": "gulp",
19771977
"watch": "gulp watch",
19781978
"test": "npm-run-all test:*",
1979-
"test:unit": "cross-env TZ=UTC LANG=en-US jest --projects test/unit-tests",
1980-
"test:view": "jest --projects src/view",
1979+
"test:unit": "cross-env TZ=UTC LANG=en-US NODE_OPTIONS=--no-experimental-strip-types jest --projects test/unit-tests",
1980+
"test:view": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects src/view",
19811981
"test:vscode-integration": "npm-run-all test:vscode-integration:*",
1982-
"test:vscode-integration:activated-extension": "jest --projects test/vscode-tests/activated-extension",
1983-
"test:vscode-integration:no-workspace": "jest --projects test/vscode-tests/no-workspace",
1984-
"test:vscode-integration:minimal-workspace": "jest --projects test/vscode-tests/minimal-workspace",
1985-
"test:cli-integration": "jest --projects test/vscode-tests/cli-integration --verbose",
1982+
"test:vscode-integration:activated-extension": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects test/vscode-tests/activated-extension",
1983+
"test:vscode-integration:no-workspace": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects test/vscode-tests/no-workspace",
1984+
"test:vscode-integration:minimal-workspace": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects test/vscode-tests/minimal-workspace",
1985+
"test:cli-integration": "cross-env NODE_OPTIONS=--no-experimental-strip-types jest --projects test/vscode-tests/cli-integration --verbose",
19861986
"clean-test-dir": "find . -type d -name .vscode-test -exec rm -r {} +",
19871987
"update-vscode": "node ./node_modules/vscode/bin/install",
19881988
"format": "prettier --write **/*.{ts,tsx} && eslint . --fix",

0 commit comments

Comments
 (0)