Run your node-tap (tap) tests from the VS Code Testing view and from the
play buttons next to each t.test(...) in your editor. Failures show up at the failing line, with the diff.
This answers the long-standing request for a VS Code extension for node-tap
(tapjs/tapjs#980): tests in the Testing panel, run from the gutter,
debugging, and working out of the box with an optional custom command.
Features
Finds your tests without running them. Test files come from tap list (so your .taprc / package.jsontap settings are respected). Tests inside each file, including nested t.test, t.skip, t.todo and t.only,
are read from the source as you edit.
Run a file, a test, or one nested test. A single test is run with tap's own --grep filter, so only that test runs.
Failures where they happened. Each failing assertion becomes a message at its line, with tap's diff
(- expected / + actual). A parent test that only failed because a child failed is not repeated.
Tests named at runtime (for example t.test(`case ${n}`) inside a loop) appear in the tree after the first run.
Skip and todo are shown as skipped. Thrown errors and files that crash on load are shown with their output.
Debug (preview) starts the run under the JavaScript debugger, attached to tap's test processes.
Monorepos and several workspace folders: every folder whose package.json uses tap is picked up.
TypeScript test files work the way tap runs them.
Requirements
tap 18 or later installed in your project (tested with tap 21). Older versions get a warning and limited support.
Node.js on your PATH (or set tapTestExplorer.nodePath).
Settings
Setting
Default
What it does
tapTestExplorer.command
[]
Command that starts tap, e.g. ["npx", "tap"] or ["pnpm", "exec", "tap"]. Empty: use the project's own node_modules/tap.
tapTestExplorer.nodePath
node
Node.js used when command is empty.
tapTestExplorer.args
[]
Extra arguments for every run.
tapTestExplorer.env
{}
Extra environment variables.
tapTestExplorer.coverage
false
Collect coverage during runs (slower).
Command: node-tap: Refresh tap tests re-reads everything.
Known limitations
Coverage is not shown in the editor yet (planned).
Two tests with exactly the same name under the same parent are shown as one.
Debugging has not been checked on every platform yet; please report problems.
Feedback
Problems and ideas are welcome on the Marketplace page (Q & A / rating). This is an independent extension and is
not affiliated with the node-tap project. It was built with AI assistance by Honestrel and checked against a real
tap 21 install by automated tests.