Skip to content

Instantly share code, notes, and snippets.

@zxkane
Created April 8, 2024 14:59
Show Gist options
  • Save zxkane/f62af1c9713a8d4c05d5b15d4821ce4b to your computer and use it in GitHub Desktop.
Save zxkane/f62af1c9713a8d4c05d5b15d4821ce4b to your computer and use it in GitHub Desktop.
run/debug a jest test file in vs code
{
"configurations": [
{
"name": "Jest file",
"type": "pwa-node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--runInBand",
"--watch",
"--coverage=false",
"--no-cache"
],
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment