with one click
run-tests
// Set up `npm test` and run tape-six tests for a project. Use when configuring a project's test scripts in package.json, picking a runner, or debugging test invocation.
// Set up `npm test` and run tape-six tests for a project. Use when configuring a project's test scripts in package.json, picking a runner, or debugging test invocation.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | run-tests |
| description | Set up `npm test` and run tape-six tests for a project. Use when configuring a project's test scripts in package.json, picking a runner, or debugging test invocation. |
Configure and invoke tape-six tests for a project that uses tape-six.
tape-six test files are directly executable — node tests/test-foo.js (or bun tests/test-foo.js, deno run -A tests/test-foo.js) works without any runner, no transpilation, no harness wrapping the test code. This is a defining property of tape-six.
The tape6 runner exists only for orchestration: parallel execution via worker threads, glob-based test discovery, per-environment filtering (Node / Bun / Deno / browser), and aggregated reporting. When iterating on a single file, run it directly — it's faster and gives cleaner stack traces. Use the runner for npm test (full-suite invocation) and CI.
Install tape-six as a dev dependency: npm install -D tape-six.
Add the test script to package.json#scripts:
{
"scripts": {
"test": "tape6 --flags FO"
}
}
Optional siblings:
"test:seq": "tape6-seq --flags FO" — sequential, in-process; easier to debug."test:bun": "tape6-bun --flags FO" / "test:deno": "tape6-deno --flags FO" — explicit-runtime sweeps for cross-runtime libraries."start": "tape6-server --trace" — browser-test HTTP harness.Add the tape6 config block to package.json for test discovery:
{
"tape6": {
"tests": ["/tests/test-*.js"],
"importmap": {
"imports": {
"my-package": "/index.js",
"my-package/": "/src/"
}
}
}
}
Per-environment globs (cli, node, bun, deno, browser) are additive on top of tests. Use them when a test imports environment-specific APIs (e.g. node:http tests under cli so they don't run in the browser worker).
Verify: npm test. To run a single file directly without the runner: node tests/test-foo.js (tape-six tests are directly executable; this is the fastest path when iterating on one file).
--flags FO — Failures only, fail Once (quiet on green, stop on the first red). It is a recommended default, not a mandate; some teams prefer the verbose default (no flags) or just F without early-exit. Lowercase disables, so --flags fo inverts both for one run (shows passes, continues past failures). Override per-invocation with the TAPE6_FLAGS environment variable: TAPE6_FLAGS=FO node tests/test-foo.js. Other flag letters cover banner / time / data / numbers / color — see Supported flags for the full list and override precedence.
Pick by environment, not preference. Default tape6 auto-detects the runtime and routes appropriately; explicit pinning is for cross-runtime CI sweeps.
tape6 — default. Auto-detects Node / Bun / Deno.tape6-bun / tape6-deno / tape6-node — pin to a specific runtime (typically for cross-runtime CI matrices).tape6-seq — sequential, in-process. Use for debugging or when tests share state.tape6-server — browser-test HTTP harness. Run npx tape6-server --trace, then open http://localhost:3000.tape-six-proc (separate npm package) — process-per-file isolation when worker threads aren't enough.For anything beyond this skill, consult the wiki — it has the long tail:
tape6 config-block reference, every per-environment glob.TAPE6_FLAGS, TAPE6_PAR, TAPE6_WORKER_START_TIMEOUT), parallelism control, --info.