Merge multiple Test Anything Protocol streams

License: ISC

Language: LiveScript

tap-merge Travis CI status npm package version

Merge TAP 13 streams.

Re-numbers tests and test plans to remove conficts. The test plan (e.g. 1..5) line is emitted last. Can be used from the command line or as a module. Streams everything, so it can process concurrently with the TAP producers.

Only asserts, plans and the version header lines are parsed. Everything else is left alone, so extras like YAML blocks or subtests will work.

CLI usage

cat <(tapProducer1) <(tapProducer2) | tap-merge

or otherwise concatenate two TAP streams and feed them on stdin to tap-merge.

Module usage

var tapMerge = require("tap-merge");
process.stdin              // or any readable stream
    .pipe(process.stdout); // or any writable stream

If you want to give it multiple streams one after the other, use a module like multistream.


Input (two TAP streams, one after the other):

TAP version 13
# first test
ok 1 - yep
# second test
ok 2 - yep
# third test
ok 3 - yep

TAP version 13
not ok 1 - fail
ok 2 - just fine

Output (one TAP stream; conflicts resolved):

TAP version 13
# first test
ok 1 - yep
# second test
ok 2 - yep
# third test
ok 3 - yep

not ok 4 - fail
ok 5 - just fine


Doesn't do validation. Provide valid input.



Project Statistics

Sourcerank 8
Repository Size 15.6 KB
Stars 5
Forks 1
Watchers 1
Open issues 1
Dependencies 0
Contributors 1
Tags 2
Last updated
Last pushed

Top Contributors See all

Antti Korpi

Packages Referencing this Repo

Merge multiple TAP streams into one
Latest release 0.3.1 - Updated - 5 stars

Recent Tags See all

v0.3.1 June 11, 2015
v0.3.0 June 01, 2015

Something wrong with this page? Make a suggestion

Login to resync this repository