-
-
Save Jeff-Tian/2d0b7a0c560bf897137b95f1780f53d9 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
{ | |
// Use IntelliSense to learn about possible 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 e2e Tests", | |
"cwd": "${workspaceFolder}", | |
"args": [ | |
"--inspect-brk", | |
"${workspaceRoot}/node_modules/.bin/jest", | |
"--runInBand", | |
"--config", | |
"${workspaceRoot}/test/jest-e2e.json" | |
], | |
"windows": { | |
"args": [ | |
"--inspect-brk", | |
"${workspaceRoot}/node_modules/jest/bin/jest.js", | |
"--runInBand", | |
"--config", | |
"${workspaceRoot}/test/jest-e2e.json" | |
], | |
}, | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen" | |
} | |
] | |
} |
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
{ | |
"moduleFileExtensions": ["js", "json", "ts"], | |
"rootDir": "..", | |
"testEnvironment": "node", | |
"testRegex": ".e2e-spec.ts$", | |
"transform": { | |
"^.+\\.(t|j)s$": "ts-jest" | |
}, | |
"moduleNameMapper": { | |
"@/(.*)": "<rootDir>/src/$1" | |
} | |
} |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"allowJs": true, | |
"allowSyntheticDefaultImports": true, | |
"baseUrl": ".", | |
"experimentalDecorators": true, | |
"emitDecoratorMetadata": true, | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"noImplicitAny": false, | |
"noUnusedLocals": false, | |
"noUnusedParameters": false, | |
"outDir": "./dist", | |
"preserveConstEnums": true, | |
"removeComments": false, | |
"resolveJsonModule": true, | |
"rootDir": ".", | |
"sourceMap": true, | |
"strictNullChecks": true, | |
"target": "es2017", | |
"typeRoots": [ | |
"node_modules/@types" | |
], | |
"paths": { | |
"@/*": [ | |
"src/*" | |
] | |
} | |
}, | |
"exclude": [ | |
"node_modules", | |
"dist", | |
"deploy" | |
], | |
"compileOnSave": false | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment