Skip to content

Repository files navigation

tape-six-proc NPM version

tape-six-proc is a helper for tape-six to run tests in separate processes. It works with Node, Deno, and Bun, and supports TypeScript natively without transpilation.

Why?

The standard tape6 runner uses worker threads. tape6-proc spawns each test file in its own subprocess instead, providing full process isolation. This prevents shared-state leaks and is useful when tests need a clean environment. TypeScript test files (.ts) run natively on modern Node, Deno, and Bun — no transpilation needed.

A control channel lets the runner stop workers mid-run: failOnce (flag O) drains the test files still in flight, and TAPE6_WORKER_TIMEOUT sets a per-worker time limit. Both cancel cooperatively (cleanup hooks run) with a force-kill backstop after TAPE6_GRACE_TIMEOUT. See Stopping tests early.

Install

npm i -D tape-six-proc

Quick start

  1. Write tests using tape-six:
import test from 'tape-six';

test('example', t => {
  t.ok(true, 'truthy');
  t.equal(1 + 1, 2, 'math works');
});
  1. Configure tests in package.json:
{
  "scripts": {
    "test": "tape6-proc --flags FO"
  },
  "tape6": {
    "tests": ["/tests/test-*.*js"]
  }
}
  1. Run:
npm test

Cross-runtime usage

{
  "scripts": {
    "test": "tape6-proc --flags FO",
    "test:bun": "bun run `tape6-proc --self` --flags FO",
    "test:deno": "deno run -A `tape6-proc --self` --flags FO -r -A"
  }
}

Docs

Full documentation is in the wiki — browse the index, or search it by name. tape-six has its own wiki.

tape-six-proc uses the same test configuration and CLI conventions as tape-six.

Command-line utilities

  • tape6-proc — the main utility of this package to run tests in different environments.

AI agents

If you are an AI coding agent, see AGENTS.md for project conventions, commands, and architecture.

LLM-friendly documentation is available:

Release notes

The most recent releases:

  • 1.3.1 Updated dependencies (includes a workaround for Bun's stream bug).
  • 1.3.0 Implemented the terminate protocol. Updated dependencies.
  • 1.2.9 Added js-check, Bun + Deno CI, tuned dependabot. Updated dependencies.
  • 1.2.8 Fixed Bun stdout flush bug. Added GitHub Actions CI. Updated dependencies.
  • 1.2.7 Added --help and --version flags. Updated dependencies.
  • 1.2.6 Updated dependencies. Added AI agent rule files. Improved workflows.
  • 1.2.5 Synchronized with tape-six 1.7.6+. Simplified CLI via shared config utilities. Added --info flag. Fixed Deno stdout flush.
  • 1.2.4 Synchronized with tape-six 1.7.4. Added Min reporter support. Improved docs and npm keywords.
  • 1.2.3 Updated dependencies, cleaned up docs, added AI-friendly links and TS info.
  • 1.2.2 Synchronized the implementation with tape-six 1.7.0.
  • 1.2.1 Synchronized the implementation with tape-six 1.5.1.
  • 1.2.0 Updated dependencies and synchronized the implementation with tape-six 1.5.0.
  • 1.1.6 Updated dependencies.
  • 1.1.5 Updated dependencies.
  • 1.1.4 Updated dependencies.
  • 1.1.3 Updated dependencies.
  • 1.1.2 Fixed bug with Deno (spawned process can end before processing streams (stdout/stderr)).
  • 1.1.1 Updated dependencies.
  • 1.1.0 Added support for stdout/stderr and tape-six 1.3.4.
  • 1.0.2 Fixed concurrency detection. Updated dependencies.
  • 1.0.1 Updated dependencies.
  • 1.0.0 The first official release.

See the full release notes for details.

About

Process-isolated test runner for tape-six. Runs each test file in its own subprocess. Works with Node, Deno, and Bun. Supports TypeScript without transpilation.

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Sponsor this project

Used by

Contributors

Languages