Skip to content

Commit

Permalink
fix: VSCode Jest debugging (#28388)
Browse files Browse the repository at this point in the history
  • Loading branch information
zharinov committed Apr 15, 2024
1 parent 03b9582 commit 301fd86
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
31 changes: 23 additions & 8 deletions .vscode/launch.json
Expand Up @@ -31,7 +31,7 @@
"request": "launch",
"name": "Jest Current File",
"runtimeExecutable": "pnpm",
"program": "jest:vscode",
"program": "jest",
"args": [
"--runInBand",
"--collectCoverage=false",
Expand All @@ -52,7 +52,7 @@
"request": "launch",
"name": "Jest All",
"runtimeExecutable": "pnpm",
"program": "jest:vscode",
"program": "jest",
"args": [
"--runInBand",
"--collectCoverage=false",
Expand All @@ -71,7 +71,7 @@
"request": "launch",
"name": "Jest Current Folder",
"runtimeExecutable": "pnpm",
"program": "jest:vscode",
"program": "jest",
"args": [
"--runInBand",
"--collectCoverage=false",
Expand All @@ -84,14 +84,29 @@
},
{
"type": "node",
"name": "vscode-jest-tests",
"name": "vscode-jest-tests.v2",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"internalConsoleOptions": "openOnSessionStart",
"cwd": "${workspaceFolder}",
"runtimeExecutable": "pnpm",
"program": "jest:vscode",
"args": ["--runInBand", "--watchAll=false", "--testTimeout=100000000"]
"runtimeExecutable": "node",
"runtimeArgs": ["--experimental-vm-modules"],
"program": "node_modules/jest/bin/jest.js",
"args": [
"--runInBand",
"--watchAll=false",
"--testTimeout=100000000",
"--coverage=false",
"--runTestsByPath",
"${jest.testFile}",
"--testNamePattern",
"${jest.testNamePattern}"
],
"env": {
"NODE_ENV": "test",
"LOG_LEVEL": "trace",
"GIT_ALLOW_PROTOCOL": "file"
}
}
]
}
9 changes: 7 additions & 2 deletions .vscode/settings.json
Expand Up @@ -16,8 +16,13 @@
".releaserc": "json"
},
"omnisharp.autoStart": false,
"jest.autoRun": "off",
"jest.jestCommandLine": "pnpm jest",
"jest.runMode": "on-demand",
"jest.jestCommandLine": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"jest.nodeEnv": {
"NODE_ENV": "test",
"LOG_LEVEL": "trace",
"GIT_ALLOW_PROTOCOL": "file"
},
"npm.packageManager": "pnpm",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
Expand Down
2 changes: 0 additions & 2 deletions package.json
Expand Up @@ -28,8 +28,6 @@
"generate:imports": "node tools/generate-imports.mjs",
"git-check": "node tools/check-git-version.mjs",
"jest": "node tools/jest.mjs",
"jest:vscode": "node tools/jest.mjs",
"jest-debug": "NODE_OPTIONS='$NODE_OPTIONS --inspect-brk' node tools/jest.mjs --testTimeout=100000000",
"lint": "run-s ls-lint type-check eslint prettier markdown-lint git-check doc-fence-check",
"lint-fix": "run-s eslint-fix prettier-fix markdown-lint-fix",
"ls-lint": "ls-lint",
Expand Down

0 comments on commit 301fd86

Please sign in to comment.