Skip to content

Instantly share code, notes, and snippets.

@Jeff-Tian
Forked from jsynowiec/jest.config.json
Last active April 21, 2021 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jeff-Tian/2d0b7a0c560bf897137b95f1780f53d9 to your computer and use it in GitHub Desktop.
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
{
// 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"
}
]
}
{
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": "..",
"testEnvironment": "node",
"testRegex": ".e2e-spec.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"moduleNameMapper": {
"@/(.*)": "<rootDir>/src/$1"
}
}
{
"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