I have a node.js project tested with mocha.js. I use mocha-cakes-2 to write my test in cucumber style.
This is my package.json
"devDependencies": {
"chai": "^4.1.2",
"chai-spies": "^1.0.0",
"mocha": "^5.2.0",
"mocha-cakes-2": "^3.3.0",
"should": "^13.2.3",
"should-sinon": "0.0.6",
"sinon": "^6.3.4"},"scripts": {"test": "mocha ./scenarios/**/*.test.js --ui mocha-cakes-2"}
This is my launch.json in VS Code
{
"type": "node",
"request": "launch",
"name": "Mocha All",
"program": "${workspaceFolder}/tests/node_modules/mocha/bin/_mocha",
"args": [
"--timeout",
"999999",
"--colors",
"'${workspaceFolder}/tests/scenarios/**/*.test.js'"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
}
When I run the tests everything works perfectly. But when I debug the tests with VS Code I get the following error. ReferenceError: feature is not defined
How can I configure VS Code debug options to set mocha-cakes-2 as the UI for mocha?