tap-strings
Generate valid TAP output as strings
Last updated 3 years ago by tehshrike .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tap-strings 
SYNC missed versions from official npm registry.

tap-strings

Generate valid TAP output as strings.

API

const parse = require('tap-strings')

parse.version(number)

parse.version(13) // => `TAP version 13`

parse.plan(start, end)

parse.plan(1, 5) // => `1..5`

parse.test(ok, number, [description])

parse.test(true, 1, `lookin' cool my man`) // => `ok 1 lookin' cool my man`

parse.todo(ok, number, [descriptor, [directive]])

const todoOutput = parse.todo(false, 2, `everything's groovy`, `Fix this later`)
todoOutput // => `not ok 2 everything's groovy # TODO Fix this later`

parse.skip(ok, number, [descriptor, [directive]])

parse.skip(true, 3, null, `Don't care`) // => `ok 3 # SKIP Don't care`

parse.bail([message])

parse.bail(`eek`) // => `Bail out! eek`

parse.diagnostic([message])

parse.diagnostic(`yo`) // => `# yo`

parse.message(message)

const messageOutput = parse.message(`This is totally
a multiline string`)

const expected = `  ---
  message: |-
    This is totally
    a multiline string
  ...`

messageOutput // => expected

License

WTFPL

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |