Last active
February 12, 2020 07:47
-
-
Save LukasBombach/1bd7068407576aaf60b4e85d23401a12 to your computer and use it in GitHub Desktop.
Debugging Jest with TypeScript in VSCode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"preset": "ts-jest", | |
"testEnvironment": "node" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"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