zora-tap-reporter
Test Anything Protocol reporters for zora.
Two flavors of TAP protocol which work both on the browser and on Nodejs
Install
npm install zora-tap-reporter
TAP reporter
Basic TAP reporter which outputs a TAP stream compatible with any tape reporter
;; const h = ; const test = h; ; ; h;
will output
TAP version 13# hello worldok 1 - should be truthy# nestednot ok 2 - should be equivalent --- actual: "foo" expected: "fob" operator: "equal" at: " file:///Volumes/data/code/zora-reporters/tap/example.mjs:12:11" ...# hello worldok 3 - should be truthy# nestednot ok 4 - should be equivalent --- actual: "foo" expected: "fob" operator: "equal" at: " file:///Volumes/data/code/zora-reporters/tap/example.mjs:20:11" ...1..4 # not ok# success: 2# skipped: 0# failure: 2
Indented TAP reporter
Richer structure which can be parsed by any TAP parser and will provide better information for parsers (or downstream reporters) which understand this specific structure. Example: tap-mocha-reporter
;; const h = ; const test = h; ; ; h;
will output
TAP version 13# Subtest: hello world ok 1 - should be truthy # Subtest: nested not ok 1 - should be equivalent --- wanted: "fob" found: "foo" at: " file:///Volumes/data/code/zora-reporters/tap/example.mjs:12:11" operator: "equal" ... 1..1 not ok 2 - nested # 5ms 1..2not ok 1 - hello world # 7ms# Subtest: hello world ok 1 - should be truthy # Subtest: nested not ok 1 - should be equivalent --- wanted: "fob" found: "foo" at: " file:///Volumes/data/code/zora-reporters/tap/example.mjs:20:11" operator: "equal" ... 1..1 not ok 2 - nested # 3ms 1..2not ok 2 - hello world # 3ms1..2 # not ok# success: 2# skipped: 0# failure: 2