neat-tap
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

neat-tap Travis CI Build Status

Fast and simple TAP parser.

NPM Badge

Install

npm install neat-tap

Usage

const neatTap = require("neat-tap");

const tapData = `
1..4
ok 1 - A
not ok 2 - B
ok 3 - C
not ok 4 - D
`;

(async () => {
	await neatTap(tapData);
	//=> { version: undefined, ok: false ... }
})();

CLI Usage

$ tap test.js | neat-tap
{ version: undefined, ok: false ... }

API

neatTap(data, options?)

data

Type: string | Buffer | ReadableStream

The TAP data to parse.

options

Type: object

strict

Type: boolean
Default: true

Whether to fail when provided with non-TAP data.

bail

Type: boolean
Default: false

Whether to stop parsing when a bail line is hit.

omitVersion

Type: boolean
Default: false

Ignore TAP version lines.

/neat-tap/

    Package Sidebar

    Install

    npm i neat-tap

    Weekly Downloads

    145

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    5.62 kB

    Total Files

    7

    Last publish

    Collaborators

    • richienb