Skip to content

Instantly share code, notes, and snippets.

@cmfsotelo
Last active November 11, 2019 11:12
Show Gist options
  • Save cmfsotelo/38ebd9d082a8c96f7f8965782f8fdcfa to your computer and use it in GitHub Desktop.
Save cmfsotelo/38ebd9d082a8c96f7f8965782f8fdcfa to your computer and use it in GitHub Desktop.
VSCode Mocha Launch.json
{
// 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": [
{ // To run on a selected spec.ts file
"type": "node",
"request": "launch",
"name": "File Mocha Typescript File",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--compilers",
"ts:ts-node/register"
"--no-timeouts",
"--colors",
"**/${fileBasenameNoExtension}.ts"
],
"internalConsoleOptions": "openOnSessionStart",
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/**/*.ts"
]
},
{ // To run on your test suit, might need tweaking according to your test configurations
"type": "node",
"request": "launch",
"name": "Tests Mocha Typescript",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"--compilers",
"ts:ts-node/register",
"--colors"
],
"internalConsoleOptions": "openOnSessionStart",
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/**/*.ts"
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment