Skip to content

Instantly share code, notes, and snippets.

@LukasBombach
Last active February 12, 2020 07:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LukasBombach/1bd7068407576aaf60b4e85d23401a12 to your computer and use it in GitHub Desktop.
Save LukasBombach/1bd7068407576aaf60b4e85d23401a12 to your computer and use it in GitHub Desktop.
Debugging Jest with TypeScript in VSCode
{
"preset": "ts-jest",
"testEnvironment": "node"
}
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Tests",
"program": "${workspaceRoot}/node_modules/.bin/jest",
"args": ["--runInBand"],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true
}
]
}
{
"name": "your-package",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"test": "jest"
},
"devDependencies": {
"@types/jest": "25.1.2",
"jest": "25.1.0",
"ts-jest": "25.2.0"
}
}
{
"compilerOptions": {
"esModuleInterop": true,
"moduleResolution": "Node",
"resolveJsonModule": true,
"strict": true,
"target": "ESNext"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment