Last active
July 19, 2018 15:20
-
-
Save aholachek/26ab17e898580bd6f8ad9ab65179221b to your computer and use it in GitHub Desktop.
Simple VSCode Node.js launch config for 1) running currently open JS file 2) running jest tests for currently open file
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": [ | |
{ | |
"name": "Launch current file", | |
"type": "node", | |
"request": "launch", | |
"program": "${file}", | |
"runtimeExecutable": "${env:HOME}/.nvm/versions/node/v8.4.0/bin/node" | |
}, | |
{ | |
"name": "Run jest test", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "${env:HOME}/.nvm/versions/node/v8.4.0/bin/node", | |
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | |
"args": ["--runInBand", "--no-cache", "${file}"], | |
"runtimeArgs": ["--inspect=9222"], | |
"cwd": "${workspaceRoot}", | |
"protocol": "inspector", | |
"console": "integratedTerminal" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment