From 2ff67801e078d208a565a0eac9ec55a5a1bab5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Wed, 16 Sep 2026 17:32:08 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20VS=20Code=20node:test=20debug?= =?UTF-8?q?ging=20and=20runner=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit launch.json: 'Debug current test file' F5 config running node --test --strip-types on the active file. settings.json: register .ts with the connor4312.nodejs-testing extension via nodejs-testing.extensions, using --strip-types (the repo pins node >=26 with native type stripping) instead of tsx, so the extension discovers src/*.test.ts and shows Run/Debug lenses above test() calls in the native Testing UI. extensions.json: recommend connor4312.nodejs-testing; cspell.json: allow 'connor' for the extension id. .gitignore: un-ignore .vscode/launch.json so the config is shared. --- .gitignore | 3 ++- .vscode/extensions.json | 1 + .vscode/launch.json | 15 +++++++++++++++ .vscode/settings.json | 10 ++++++++++ cspell.json | 3 ++- 5 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index f0a5812..9ec4b74 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,6 @@ coverage !.vscode/extensions.json !.vscode/settings.json !.vscode/tasks.json +!.vscode/launch.json .idea -.DS_Store \ No newline at end of file +.DS_Store diff --git a/.vscode/extensions.json b/.vscode/extensions.json index d826373..9002534 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ + "connor4312.nodejs-testing", "oxc.oxc-vscode", "streetsidesoftware.code-spell-checker", "typescriptteam.native-preview", diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..668656c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Debug current test file", + "runtimeExecutable": "node", + "runtimeArgs": ["--test", "--strip-types"], + "args": ["${file}"], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal" + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 4473f94..2021886 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,14 @@ { + "nodejs-testing.extensions": [ + { + "extensions": ["mjs", "cjs", "js"], + "parameters": [] + }, + { + "extensions": ["ts"], + "parameters": ["--strip-types"] + } + ], "[typescript]": { "editor.defaultFormatter": "oxc.oxc-vscode", "editor.formatOnSave": true diff --git a/cspell.json b/cspell.json index bebc052..f0e5dff 100644 --- a/cspell.json +++ b/cspell.json @@ -42,7 +42,8 @@ "bestikk", "silverwind", "idris", - "todotasks" + "todotasks", + "connor" ], "ignorePaths": ["dist", "node_modules", "coverage", "*.svg", ".gitignore"] }