Registry / testing / utap
library0.2.0jsnpmunverified

A minimal TAP (Test Anything Protocol) formatter designed for Node.js >=18 built-in `node:test` harness. Version 0.2.0, single-file (~100 lines of code) with a dependency on `chalk` for colorized output. Inspired by AVA's output style. Provides a readable, developer-friendly test report by formatting TAP stream from `node:test` or other TAP producers. Lightweight alternative to full TAP reporters like tap-spec or faucet.

npm install utap
INSTALL
IMPORT
SIG · UTAP
U
utap
testingjavascriptv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

utap
Installed globally or used via npx; no programmatic API.
utap is CLI-only; there is no JavaScript import. Use via command line.

Demonstrates using node:test and piping TAP output to utap via the command line.

// Create a test file: tests/example.test.js import { describe, it } from 'node:test'; import assert from 'node:assert'; describe('example suite', () => { it('should pass', () => { assert.strictEqual(1 + 1, 2); }); it('should fail', () => { assert.strictEqual(1 + 1, 3); }); }); // Run tests piped to utap: // node tests/example.test.js | npx utap
Debug
Known issues
gotchautap expects TAP input on stdin; it will hang if no input is piped.
fix
Always pipe output from a TAP-producing command, e.g., `node test.js | utap`.
affects: >=0.1.0
gotchaThe `# utap-src:filename` annotation is non-standard and only works with utap.
fix
Ensure your test runner outputs `# utap-src:` comment before each file's TAP output to enable filename display. Otherwise filenames are omitted.
affects: >=0.1.0
deprecatedNode.js 18 is the minimum; older versions are unsupported.
fix
Upgrade Node.js to >=18.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'chalk'
chalk is a dependency but not installed when utap is used globally without installing locally.
fix
Install utap locally: `npm install --save-dev utap` and run via `npx utap` or add it to your project's node_modules.
utap requires stdin input
Running utap without piping TAP output results in no input, causing it to hang.
fix
Always pipe a TAP stream: `node test.js | utap`
Upgrade
Version history
0.2.0latest on npm
Audit
Dependencies
chalkrequiredColorized terminal output
Agent activity
5 hits · last 30 days
node
4
Resources
packageutap
utap — npm install utap · libregistry