package
Generate TAP output
npm install supertapGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Generate TAP output
$ npm install supertapimport * as supertap from 'supertap';
console.log(supertap.start());
console.log(supertap.test('passing', {
index: 1,
passed: true
}));
console.log(supertap.finish({
passed: 1
}));Output:
TAP version 13
# passing
ok 1 - passing
1..1
# tests 1
# pass 1
# fail 0Always returns 'TAP version 13' string.
Type: string
Test title.
Type: number
Index of the test. Should start with one, not zero.
Type: boolean
Default: false
Status of the test.
Type: Error object
If test has failed (passed is false), error should be an instance of an actual error.
It can also be an object, which fields will be included in the output (e.g. name, message, actual, expected).
supertest.test('failing', {
index: 1,
passed: false,
error: new Error()
});Type: boolean
Default: false
Mark test as to-do or as skipped.
Type: string array
Comments for that test.
Type: number
Default: 0
Number of tests that passed, failed, skipped or marked as todo. crashed is a special option, which adds to failed test count in the output, but not total test count. AVA uses it to count unhandled exceptions.
vdemedes
vadimdemedes@hey.com
Estimated unpacked size across 10 packages.
2.3 MB
Includes dependencies.
4 direct · 3 outdated
^3.14.1
5.5.0
^7.0.1
7.2.0
^5.0.0
6.0.0
^7.0.1
13.1.0