tape is a minimal TAP-producing test framework for Node and browsers with serial tests, rich assertions, and many reporter pipes.
Overview
tape is a test harness for JavaScript that emits Test Anything Protocol output for Node.js and browser runs. Tests execute serially through test(name, cb) blocks influenced by node-tap APIs.
The tape CLI glob-tests files, supports --require and ES module --import preloads, ignore patterns, and flags such as --no-only for CI safety. Assertion methods cover equal, deepEqual, ok, throws, and related matchers with optional timeouts.
Pretty reporters consume piped TAP via modules like tap-spec or faucet. tape-catch can intercept uncaught exceptions, and companion plugins extend the minimal core.
Browser tests run with bundlers or tape-run, keeping the same TAP stream for tooling integration.
Key features
- TAP output stream
- Serial test execution
- CLI glob test runner
- Module preload flags
- CI no-only guard
- Browser-compatible tests
- Pipe-friendly reporters
- tape-catch exception hook
Use cases
- Node unit test suites
- Minimal TAP-based CI logs
- Browser test harnesses
- Piping tests to pretty reporters