Skip to content

Instantly share code, notes, and snippets.

@MikeyBurkman
Last active November 5, 2019 20:18
Show Gist options
  • Save MikeyBurkman/43bd7cbd3f49e5667c993fb176fece32 to your computer and use it in GitHub Desktop.
Save MikeyBurkman/43bd7cbd3f49e5667c993fb176fece32 to your computer and use it in GitHub Desktop.
Default mocha test debugging in VS Code
{
// 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": [
{
"name": "Start",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/.bin/ts-node",
"args": ["index.ts"],
"stopOnEntry": false,
"runtimeExecutable": null,
"env": {
"TS_NODE_FILES": "true",
"NODE_PATH": "."
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
],
"outputCapture": "std"
},
{
"name": "Test All",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"stopOnEntry": false,
"args": [
"--require",
"ts-node/register",
"--no-timeouts",
"--exit",
"--colors",
"--recursive",
"test/**/*.ts"
],
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"NODE_ENV": "test",
"NODE_PATH": "."
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
],
"outputCapture": "std"
},
{
"name": "Test This File",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
"args": [
"--require",
"ts-node/register",
"--no-timeouts",
"--exit",
"--colors",
"--recursive",
"${file}"
],
"stopOnEntry": false,
"cwd": "${workspaceRoot}",
"runtimeExecutable": null,
"env": {
"NODE_ENV": "test",
"NODE_PATH": "."
},
"skipFiles": [
"${workspaceRoot}/node_modules/**/*.js",
"<node_internals>/**/*.js"
],
"outputCapture": "std"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment