
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@freecube/tap-out
Advanced tools
A different tap parser
This is a fork of https://github.com/scottcorgan/tap-out maintained by Nicolas Lochet
npm install tap-out --save
CLI
$ something-that-produces-tap | tap-out
{
tests: [
{ name: 'is true', number: 1, raw: '# is true', type: 'test' }
],
asserts: [
{ name: 'true value', number: 1, ok: true, raw: 'ok 1 true value', test: 1, type: 'assert' },
{ name: 'true value', number: 2, ok: true, raw: 'ok 2 true value', test: 1, type: 'assert' }
],
versions: [],
results: [],
comments: [],
plans: [{ type: 'plan', raw: '1..2', from: 1, to: 2, skip: false }],
pass: [
{ name: 'true value', number: 1, ok: true, raw: 'ok 1 true value', test: 1, type: 'assert' },
{ name: 'true value', number: 2, ok: true, raw: 'ok 2 true value', test: 1, type: 'assert' }
],
fail: [],
errors: []
}
API
var tapOut = require('tap-out');
var t = tapOut(function (output) {
console.log(output);
});
t.on('assert', function (assert) {
// Do something
});
process.stdin.pipe(t);
Returns a stream that emits events with various TAP data. Takes a callback which is called when all parsing is done.
All output after all TAP data is parsed.
Example output
{
tests: [
{ name: 'is true', number: 1, raw: '# is true', type: 'test' }
],
asserts: [
{ name: 'true value', number: 1, ok: true, raw: 'ok 1 true value', test: 1, type: 'assert' },
{ name: 'true value', number: 2, ok: true, raw: 'ok 2 true value', test: 1, type: 'assert' }
],
results: [],
versions: [],
comments: [],
fail: [],
pass: [
{ name: 'true value', number: 1, ok: true, raw: 'ok 1 true value', test: 1, type: 'assert' },
{ name: 'true value', number: 2, ok: true, raw: 'ok 2 true value', test: 1, type: 'assert' }
],
}
Parsed test object with details.
type - value will always be testname - name of the testraw - the raw output before it was parsednumber - the number of the test{
type: 'test',
name: 'is true',
raw: '# is true',
number: 1
}
Parsed assert object details.
type - this will always be assertname - the name of the assertionraw - the raw output before it was parsednumber - the number of the assertionok - whether the assertion passed or failedtest - the number of the test this assertion belongs to{
name: 'true value',
number: 1,
ok: true,
raw: 'ok 1 true value',
test: 1,
type: 'assert'
}
Parsed version data.
type - this will always be versionraw - the raw output before it was parsed{
raw: 'TAP version 13',
type: 'version'
}
Parsed test result data for tests, pass, fail.
type - this will always be resultname - the name of the resultraw - the raw output before it was parsedcount - the number of tests related to this resultTests
{
count: '15',
name: 'tests',
raw: '# tests 15',
type: 'result'
}
Pass
{
count: '13',
name: 'pass',
raw: '# pass 13',
type: 'result'
}
Fail
{
count: '2',
name: 'fail',
raw: '# fail 2',
type: 'result'
}
Parsed assertion that has passed with details. The assertion formate is the same as the assert event.
Failed assertion that has passed with details. The assertion formate is the same as the assert event.
Generic output like console.log() in your tests.
type - this will always be commentraw - the raw output before it was parsedtest - the number of the test this comment belongs to{
type: 'comment',
raw: 'this is a console log',
test: 1
}
git clone git@github.com:scottcorgan/tap-out.git && cd tap-out
npm install
npm test
FAQs
A different tap parser
We found that @freecube/tap-out demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.