Last active
April 21, 2021 08:37
-
-
Save jsynowiec/6a186ee14fa775ba73092eaa11af4983 to your computer and use it in GitHub Desktop.
[Jest config for debugging TypeScript tests in Visual Studio Code] #vscode #jest #typescript
This file contains 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
{ | |
"testEnvironment": "node", | |
"transform": { | |
"^.+\\.ts$": "ts-jest" | |
}, | |
"moduleFileExtensions": [ | |
"ts", | |
"js", | |
"json", | |
"node" | |
], | |
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(ts|js)$", | |
"coverageDirectory": "coverage", | |
"collectCoverageFrom": [ | |
"src/**/*.{ts,js}", | |
"!src/**/*.d.ts" | |
] | |
} |
This file contains 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
{ | |
// Use IntelliSense to learn about possible Node.js debug attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Debug Jest Tests", | |
"cwd": "${workspaceFolder}", | |
"args": [ | |
"--inspect-brk", | |
"${workspaceRoot}/node_modules/.bin/jest", | |
"--runInBand", | |
"--config", | |
"${workspaceRoot}/jest.config.json" | |
], | |
"windows": { | |
"args": [ | |
"--inspect-brk", | |
"${workspaceRoot}/node_modules/jest/bin/jest.js", | |
"--runInBand" | |
"--config", | |
"${workspaceRoot}/jest.config.json" | |
], | |
}, | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen" | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is missing comma at the end of line 23