From 3e985d188b320d1bc333fbcd9420ebb7c5e7040d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 29 Oct 2022 12:37:28 +0200 Subject: [PATCH] Add UTs debugging configuration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .vscode/launch.json | 14 ++++++++++++++ .vscode/settings.json | 3 ++- package.json | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) 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", -- 2.34.1