Created
January 29, 2018 21:31
-
-
Save aliustaoglu/419826fc9467a936d1d3cbb97a4e8749 to your computer and use it in GitHub Desktop.
Debugging mocha tests with Visual Studio Code using TypeScript
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
{ | |
// 3. important points | |
// My tests are located in /tests/ folder and they all have .spec.js extension | |
// sourceMaps are enabled because I am using TypeScript | |
// outFiles: My generated CommonJS files. They are located under /dist/ folder | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Run mocha", | |
"type": "node", | |
"request": "launch", | |
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha", | |
"sourceMaps": true, | |
"outFiles": ["${workspaceRoot}/dist/**/*.js"], | |
"stopOnEntry": false, | |
"args": ["tests/**/*.spec.js", "--no-timeouts"], | |
"cwd": "${workspaceRoot}", | |
"runtimeExecutable": null, | |
"env": { "NODE_ENV": "testing"} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment