Add UTs debugging configuration
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 29 Oct 2022 10:37:28 +0000 (12:37 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 29 Oct 2022 10:37:28 +0000 (12:37 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
.vscode/launch.json
.vscode/settings.json
package.json

index d89584673667e4760be43992f61254975890d798..7cca9d16ce2cb3eb187c02d22df8fda68bfed584 100644 (file)
       "runtimeArgs": ["run-script", "start:dev:debug"],
       "skipFiles": ["<node_internals>/**"],
       "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": ["<node_internals>/**"]
     }
   ]
 }
index f522dcb8748b84bd46f0cc05843901c8281beb27..06f6d6a01589ead1eb583feac816464e2bc4d90d 100644 (file)
@@ -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"
 }
index 07373506aa4934f7ba235ebb3fcd9a25d97a04df..af2a7a721363d8f0381ea1a60613d17addf04c9d 100644 (file)
@@ -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",