neat-tap
v2.0.0
Published
Fast and simple TAP parser.
Downloads
946
Readme
neat-tap
Fast and simple TAP parser.
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.