Skip to content

Instantly share code, notes, and snippets.

@aholachek
Last active July 19, 2018 15:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aholachek/26ab17e898580bd6f8ad9ab65179221b to your computer and use it in GitHub Desktop.
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
{
"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