Skip to content

Instantly share code, notes, and snippets.

@risingnote
Last active November 15, 2016 22:12
Show Gist options
  • Save risingnote/ec2cacd7d882e60403c49dedc85644d8 to your computer and use it in GitHub Desktop.
Save risingnote/ec2cacd7d882e60403c49dedc85644d8 to your computer and use it in GitHub Desktop.
Setup Visual Studio Code with a debug config to run a Jest test. Select the test in an editor and run the debug task.
{
// Use IntelliSense to learn about possible Node.js debug attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "JEST Test",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js",
"stopOnEntry": false,
"args": ["--runInBand", "${file}"],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"externalConsole": false,
"sourceMaps": false,
"outDir": null
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment