tap-out is a JavaScript library designed to parse Test Anything Protocol (TAP) output streams, converting them into structured JavaScript objects and emitting events for various TAP data types. Currently at version 3.0.0, its release cadence is tied to significant internal changes or feature additions, with major versions indicating potential breaking changes. It distinguishes itself by providing both a streaming API and a final callback for comprehensive results, allowing detailed programmatic inspection of test results, assertions, and metadata. Unlike simple TAP formatters, tap-out focuses on programmatic access to the parsed data, making it suitable for building custom test reporters, analysis tools, or integrating with CI/CD pipelines.
npm install tap-outVerified import paths — ran on the pinned version, not inferred.
Demonstrates piping a simulated TAP stream into `tap-out`, logging individual assertion events and the final parsed output object.
Manually end the input stream (e.g., `process.stdin.end()` or `tapInput.push(null)` for Readable streams) after all TAP data has been sent to trigger the parser's final callback and `end` event.
Update callback signatures to `function (err, output) {}` and check for errors before processing the `output` object.Use `const tapOut = require('tap-out');` for CommonJS environments. For native ESM, consider upgrading to `tap-out` v4.x or later, which provides ESM support.Change `import tapOut from 'tap-out'` to `const tapOut = require('tap-out');` or configure your project for ESM and upgrade to `tap-out` v4.x.Ensure `tapOut` is called as a function: `const parser = tapOut(callback);`.
Ensure the input stream to `tap-out` is explicitly ended (e.g., `input_stream.push(null)` for a Readable stream, or `process.stdin.end()` when piping from stdin) to signal the end of the TAP data and trigger the final callback.
No dependency data recorded yet.