Skip to content

Raynos/tap-render

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tap-render

build status

browser support

A readable stream of TAP output

Refactored out of substack/tape

tap-render only emits the start and end of a valid TAP output once even if there are multiple Render's. This is to allow you to use multiple TAP outputting test frameworks in one process.

If you want an individual Render to output the correct TAP header and footer on it's own pass the force option

var r = Render({ force: true })

Example

var Render = require("tap-render")

var r = Render()

r.pipe(process.stdout)

r.begin()
// TAP version 13

r.push({
    name: "first test"
})
// # first test

r.push(null, {
    ok: true
})
// ok 1

r.push(null, {
    ok: true
    , name: "this test passes"
})
// ok 2 this test passes

r.push(null, {
    ok: false
    , name: "this test fails"
    , operator: "equal"
    , expected: "one"
    , actual: "two"
})
/*
not ok 2 this test fails
  ---
    operator: equal
    expected: "one"
    actual:   "two"
  ...
*/

r.close()
/*

1..3
# tests 3
# pass  2
# fail  1
*/

Installation

npm install tap-render

Contributors

  • Raynos

MIT Licenced

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages