From: Jérôme Benoit Date: Sat, 29 Oct 2022 10:37:28 +0000 (+0200) Subject: Add UTs debugging configuration X-Git-Tag: v1.1.87~20 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3e985d188b320d1bc333fbcd9420ebb7c5e7040d;p=e-mobility-charging-stations-simulator.git Add UTs debugging configuration Signed-off-by: Jérôme Benoit --- diff --git a/.vscode/launch.json b/.vscode/launch.json index d8958467..7cca9d16 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -24,6 +24,20 @@ "runtimeArgs": ["run-script", "start:dev:debug"], "skipFiles": ["/**"], "stopOnEntry": true + }, + { + "name": "Debug Simulator Unit Tests", + "type": "node", + "request": "attach", + "port": 9229, + "continueOnAttach": true, + "autoAttachChildProcesses": false, + "timeout": 30000, + "resolveSourceMapLocations": [ + "!**/node_modules/**", + "!**/.vscode/extensions/hbenl.vscode-mocha-test-adapter-*/**" + ], + "skipFiles": ["/**"] } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index f522dcb8..06f6d6a0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,5 +3,6 @@ "source.fixAll": true }, "testExplorer.useNativeTesting": true, - "mochaExplorer.files": ["test/**/*Test.ts"] + "mochaExplorer.files": ["test/**/*Test.ts"], + "mochaExplorer.debuggerConfig": "Debug Simulator Unit Tests" } diff --git a/package.json b/package.json index 07373506..af2a7a72 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "lint:fix": "cross-env TIMING=1 eslint --cache --fix --ext .js,.ts src", "format": "prettier --write .", "test": "c8 mocha test/**/*Test.ts", + "test:debug": "mocha --no-parallel --inspect test/**/*Test.ts", "coverage": "c8 report --reporter=lcov", "coverage:html": "c8 report --reporter=html", "clinic:clean": "clinic clean",