Created
March 26, 2019 14:23
-
-
Save tonyhallett/e1b36e479028a737ad92d0103dca2809 to your computer and use it in GitHub Desktop.
vscode launch.json for jest debugging
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"name": "vscode-jest-tests", | |
"request": "launch", | |
"args": [ | |
"--runInBand", | |
"--coverage", "false" | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | |
}, | |
{ | |
"type": "node", | |
"name": "vscode-jest-tests selected text", | |
"request": "launch", | |
"args": [ | |
"--runInBand", | |
"--testNamePattern", | |
"${selectedText}", | |
"--coverage", "false", | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | |
}, | |
{ | |
"type": "node", | |
"name": "vscode-jest-tests prompt pattern", | |
"request": "launch", | |
"args": [ | |
"--runInBand", | |
"--testNamePattern", | |
"${input:jestSpecificTest}", | |
"--coverage", "false", | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | |
}, | |
, | |
{ | |
"type": "node", | |
"name": "vscode-jest-tests current file", | |
"request": "launch", | |
"args": [ | |
"--runInBand", | |
"--coverage", "false", | |
"--runTestsByPath", | |
"${relativeFile}", | |
], | |
"cwd": "${workspaceFolder}", | |
"console": "integratedTerminal", | |
"internalConsoleOptions": "neverOpen", | |
"program": "${workspaceFolder}/node_modules/jest/bin/jest" | |
}], | |
"inputs": [ | |
{ | |
"id": "jestSpecificTest", | |
"type": "promptString", | |
"description":"testNamePattern" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment