pax_global_header 0000666 0000000 0000000 00000000064 13206406237 0014515 g ustar 00root root 0000000 0000000 52 comment=f189c50e9b0767fe0de7513dbfc1bd93d36f0ead
node-tap-11.0.0/ 0000775 0000000 0000000 00000000000 13206406237 0013303 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/.gitignore 0000664 0000000 0000000 00000000061 13206406237 0015270 0 ustar 00root root 0000000 0000000 node_modules/
coverage/
.nyc_output/
nyc_output/
node-tap-11.0.0/.travis.yml 0000664 0000000 0000000 00000000121 13206406237 0015406 0 ustar 00root root 0000000 0000000 language: node_js
sudo: false
node_js:
- 8
- 6
notifications:
email: false
node-tap-11.0.0/CHANGELOG.md 0000664 0000000 0000000 00000000134 13206406237 0015112 0 ustar 00root root 0000000 0000000 Please see [the tap website](http://www.node-tap.org/changelog/) for
the curated changelog.
node-tap-11.0.0/CONTRIBUTING.md 0000664 0000000 0000000 00000001676 13206406237 0015546 0 ustar 00root root 0000000 0000000 Please consider signing [the neveragain.tech pledge](http://neveragain.tech/)
- Check the [issues](https://github.com/tapjs/node-tap/issues) to see
stuff that is likely to be accepted.
- Every patch should have a new test that fails without the patch and
passes with the patch.
- All tests should pass on Node 0.8 and above. If some tests have to
be skipped for very old Node versions that's fine, but the
functionality should still work as intended.
- Run `npm run regen-fixtures` to re-generate the output tests
whenever output is changed. However, when you do this, make sure to
check the change to ensure that it's what you intended, and that it
didn't cause any other inadvertent changes.
- Prefer adding cases to an existing test rather than writing a new
one from scratch. For example, add a new test in `test/test/*.js`
rather than create a new test that validates test output.
- Docs should be changed on the `gh-pages` branch
node-tap-11.0.0/LICENSE 0000664 0000000 0000000 00000001375 13206406237 0014316 0 ustar 00root root 0000000 0000000 The ISC License
Copyright (c) Isaac Z. Schlueter and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
node-tap-11.0.0/README.md 0000664 0000000 0000000 00000015674 13206406237 0014577 0 ustar 00root root 0000000 0000000 # node-tap
A TAP test framework for
Node.js.
[](https://travis-ci.org/tapjs/node-tap) [](https://ci.appveyor.com/project/isaacs/node-tap) [](https://coveralls.io/github/tapjs/node-tap?branch=master)
_Just wanna see some code? [Get started!](http://www.node-tap.org/basics/)_
It includes a command line test runner for consuming TAP-generating
test scripts, and a JavaScript framework for writing such scripts.
* [Getting started guide](http://www.node-tap.org/basics/)
* Built-in [test coverage](http://www.node-tap.org/coverage/)
* Many [reporter formats](http://www.node-tap.org/reporting/)
* Extensive [API](http://www.node-tap.org/api/) featuring:
* Great [promise support](http://www.node-tap.org/promises/)
* Comprehensive [assert library](http://www.node-tap.org/asserts/)
* Other [advanced stuff](http://www.node-tap.org/advanced/)
* Mocha-like [BDD DSL](http://www.node-tap.org/mochalike/)
* [Parallel Testing](http://www.node-tap.org/parallel/)
* [Command-line interface](http://www.node-tap.org/cli/) for running
tests (whether they use node-tap or not)
See [the changelog](http://www.node-tap.org/changelog/) for recent updates, or just get
started with [the basics](http://www.node-tap.org/basics/).
All this is too much to manage in a single README file, so head over
to [the website](http://www.node-tap.org/) to learn more.
## Why TAP?
Why should you use this thing!? **LET ME TELL YOU!**
Just kidding.
Most frameworks spend a lot of their documentation telling you why
they're the greatest. I'm not going to do that.
### tutti i gusti sono gusti
Software testing is a software and user experience design challenge
that balances on the intersection of many conflicting demands.
Node-tap is based on [my](http://izs.me) opinions about how a test
framework should work, and what it should let you do. I do _not_ have
any opinion about whether or not you share those opinions. If you do
share them, you will probably enjoy this test library.
1. **Test files should be "normal" programs that can be run
directly.**
That means that it can't require a special runner that
puts magic functions into a global space. `node test.js` is a
perfectly ok way to run a test, and it ought to function
exactly the same as when it's run by the fancy runner with
reporting and such. JavaScript tests should be JavaScript
programs; not english-language poems with weird punctuation.
2. **Test output should be connected to the structure of the
test file that is easy to determine.**
That means not unnecessarily deferring test functions
until `nextTick`, because that would shift the order of
`console.log` output. Synchronous tests should be synchronous.
3. **Test files should be run in separate processes.**
That means that it can't use `require()` to load test files. Doing
`node ./test.js` must be the exact same sort of environment for the
test as doing `test-runner ./test.js`. Doing `node test/1.js; node
test/2.js` should be equivalent (from the test's point of view) to
doing `test-runner test/*.js`. This prevents tests from becoming
implicitly dependent on one anothers' globals.
4. **Assertions should not normally throw (but throws MUST be handled
nicely).**
I frequently write programs that have many hundreds of
assertions based on some list of test cases. If the first failure
throws, then I don't know if I've failed 100 tests or 1, without
wrapping everything in a try-catch. Furthermore, I usually want to
see some kind of output or reporting to verify that each one
actually ran.
Basically, it should be your decision whether you want to throw or
not. The test framework shouldn't force that on you, and should
make either case easy.
5. **Test reporting should be separate from the test process, included
in the framework, and enabled by default for humans.**
The [raw test output](http://www.node-tap.org/tap-format/) should
be machine-parseable and human-intelligible, and a separate process
should consume test output and turn it into a [pretty summarized
report](http://www.node-tap.org/reporting/). This means that test
data can be stored and parsed later, dug into for additional
details, and so on. Also: nyan cat.
6. **Writing tests should be easy, maybe even fun.**
The lower the barrier to entry for writing new tests, the more
tests get written. That means that there should be a relatively
small vocabulary of actions that I need to remember as a test
author. There is no benefit to having a distinction between a
"suite" and a "subtest". Fancy DSLs are pretty, but more to
remember.
That being said, if the you returns a Promise, or use a DSL that
throws a decorated error, then the test framework should Just Work
in a way that helps a human being understand the situation.
7. **Tests should output enough data to diagnose a failure, and no
more or less.**
Stack traces pointing at JS internals or the guts of the test
framework itself are not helpful. A test framework is a serious UX
challenge, and should be treated with care.
8. **Test coverage should be included.**
Running tests with coverage changes the way that you think about
your programs, and provides much deeper insight. Node-tap bundles
[nyc](https://istanbul.js.org/) for this.
It's not enabled by default only because it _does_ necessarily
change the nature of the environment a little bit. But I strongly
encourage [enabling coverage](http://www.node-tap.org/coverage/).
9. **Tests should be output in a predictable order.**
Even if they are run in parallel, the test _output_ should be
consistent.
As of version 10, tap supports [parallel
tests](http://www.node-tap.org/parallel/), which
can make your tests run significantly faster if they are I/O bound
or if you have multiple cores on your machine. However, even when
run in parallel, the output is still serialized.
10. **Tests should not require more building than your code.**
Babel and Webpack are lovely and fine. But if your code doesn't
require compilation, then I think your tests shouldn't either.
Tap is extremely
[promise-aware](http://www.node-tap.org/promises/), but works on
any version of Node.js back to v0.10.
Software testing should help you build software. It should be a
security blanket and a quality ratchet, giving you the support to
undertake massive refactoring and fix bugs without worrying. It
shouldn't be a purification rite or a hazing ritual.
There are many opinions left off of this list! Reasonable people can
disagree. But if you find yourself nodding along, [maybe tap is for
you](http://www.node-tap.org/basics/).
node-tap-11.0.0/appveyor.yml 0000664 0000000 0000000 00000000640 13206406237 0015673 0 ustar 00root root 0000000 0000000 environment:
matrix:
- nodejs_version: '8'
- nodejs_version: '6'
- nodejs_version: '4'
install:
- ps: Install-Product node $env:nodejs_version
- set CI=true
- npm -g install npm@latest
- set PATH=%APPDATA%\npm;%PATH%
- npm install
matrix:
fast_finish: true
build: off
version: '{build}'
shallow_clone: true
clone_depth: 1
test_script:
- npm test -- -Rclassic --no-coverage --timeout=3600
node-tap-11.0.0/bin/ 0000775 0000000 0000000 00000000000 13206406237 0014053 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/bin/mochatap.js 0000775 0000000 0000000 00000000534 13206406237 0016212 0 ustar 00root root 0000000 0000000 #!/usr/bin/env node
'use strict'
const tap = require('../lib/tap.js')
const args = process.argv.slice(2)
if (args.length === 1) {
const path = require('path')
const file = path.resolve(args[0])
tap.mochaGlobals()
require(file)
} else {
for (let i = 0; i < args.length; i++) {
tap.spawn(process.execPath, [__filename, args[i]])
}
}
node-tap-11.0.0/bin/run.js 0000775 0000000 0000000 00000047331 13206406237 0015230 0 ustar 00root root 0000000 0000000 #!/usr/bin/env node
'use strict'
const node = process.execPath
const fs = require('fs')
const spawn = require('child_process').spawn
const fg = require('foreground-child')
const opener = require('opener')
const colorSupport = require('color-support')
const nycBin = require.resolve('nyc/bin/nyc.js')
const glob = require('glob')
const isexe = require('isexe')
const osHomedir = require('os-homedir')
const yaml = require('js-yaml')
const path = require('path')
const exists = require('fs-exists-cached').sync
const os = require('os')
const isTTY = process.stdin.isTTY || process.env._TAP_IS_TTY === '1'
const coverageServiceTest = process.env.COVERAGE_SERVICE_TEST === 'true'
// NYC will not wrap a module in node_modules.
// So, we need to tell the child proc when it's been added.
// Of course, this can't reasonably be branch-covered, so ignore it.
/* istanbul ignore next */
if (process.env._TAP_COVERAGE_ === '1')
global.__coverage__ = global.__coverage__ || {}
else if (process.env._TAP_COVERAGE_ === '0') {
global.__coverage__ = null
Object.keys(process.env).filter(k => /NYC/.test(k)).forEach(k =>
process.env[k] = '')
}
/* istanbul ignore next */
if (coverageServiceTest)
console.log('COVERAGE_SERVICE_TEST')
// Add new coverage services here.
// it'll check for the environ named and pipe appropriately.
//
// Currently only Coveralls is supported, but the infrastructure
// is left in place in case some noble soul fixes the codecov
// module in the future. See https://github.com/tapjs/node-tap/issues/270
const coverageServices = [
{
env: 'COVERALLS_REPO_TOKEN',
bin: require.resolve('coveralls/bin/coveralls.js'),
name: 'Coveralls'
}
]
const main = _ => {
const args = process.argv.slice(2)
if (!args.length && isTTY) {
console.error(usage())
process.exit(1)
}
// set default args
const defaults = constructDefaultArgs()
// parse dotfile
const rcFile = process.env.TAP_RCFILE || (osHomedir() + '/.taprc')
const rcOptions = parseRcFile(rcFile)
// supplement defaults with parsed rc options
Object.keys(rcOptions).forEach(k =>
defaults[k] = rcOptions[k])
defaults.rcFile = rcFile
// parse args
const options = parseArgs(args, defaults)
if (!options)
return
process.stdout.on('error', er => {
/* istanbul ignore else */
if (er.code === 'EPIPE')
process.exit()
else
throw er
})
options.files = globFiles(options.files)
// this is only testable by escaping from the covered environment
/* istanbul ignore next */
if ((options.coverageReport || options.checkCoverage) &&
options.files.length === 0)
return runCoverageReport(options)
if (options.files.length === 0) {
console.error('Reading TAP data from stdin (use "-" argument to suppress)')
options.files.push('-')
}
if (options.files.length === 1 && options.files[0] === '-') {
if (options.coverage)
console.error('Coverage disabled because stdin cannot be instrumented')
setupTapEnv(options)
stdinOnly(options)
return
}
// By definition, the next block cannot be covered, because
// they are only relevant when coverage is turned off.
/* istanbul ignore next */
if (options.coverage && !global.__coverage__) {
return respawnWithCoverage(options)
}
setupTapEnv(options)
runTests(options)
}
const constructDefaultArgs = _ => {
/* istanbul ignore next */
const defaultTimeout = global.__coverage__ ? 240 : 30
const defaultArgs = {
nodeArgs: [],
nycArgs: [],
testArgs: [],
timeout: +process.env.TAP_TIMEOUT || defaultTimeout,
color: !!colorSupport.level,
reporter: null,
files: [],
grep: [],
grepInvert: false,
bail: false,
saveFile: null,
pipeToService: false,
coverageReport: null,
browser: true,
coverage: undefined,
checkCoverage: false,
branches: 0,
functions: 0,
lines: 0,
statements: 0,
jobs: 1,
outputFile: null
}
if (process.env.TAP_COLORS !== undefined)
defaultArgs.color = !!(+process.env.TAP_COLORS)
return defaultArgs
}
const parseArgs = (args, options) => {
const singleFlags = {
b: 'bail',
B: 'no-bail',
i: 'invert',
I: 'no-invert',
c: 'color',
C: 'no-color',
T: 'no-timeout',
J: 'jobs-auto',
O: 'only',
h: 'help',
'?': 'help',
v: 'version'
}
const singleOpts = {
j: 'jobs',
g: 'grep',
R: 'reporter',
t: 'timeout',
s: 'save',
o: 'output-file'
}
// If we're running under Travis-CI with a Coveralls.io token,
// then it's a safe bet that we ought to output coverage.
for (let i = 0; i < coverageServices.length && !options.pipeToService; i++) {
/* istanbul ignore next */
if (process.env[coverageServices[i].env])
options.pipeToService = true
}
let defaultCoverage = options.pipeToService
let dumpConfig = false
for (let i = 0; i < args.length; i++) {
const arg = args[i]
if (arg.charAt(0) !== '-' || arg === '-') {
options.files.push(arg)
continue
}
// short-flags
if (arg.charAt(1) !== '-' && arg !== '-gc') {
const expand = []
for (let f = 1; f < arg.length; f++) {
const fc = arg.charAt(f)
const sf = singleFlags[fc]
const so = singleOpts[fc]
if (sf)
expand.push('--' + sf)
else if (so) {
const soslice = arg.slice(f + 1)
const soval = soslice.charAt(0) === '=' ? soslice : '=' + soslice
expand.push('--' + so + soval)
f = arg.length
} else if (arg !== '-' + fc)
expand.push('-' + fc)
}
if (expand.length) {
args.splice.apply(args, [i, 1].concat(expand))
i--
continue
}
}
const argsplit = arg.split('=')
const key = argsplit.shift()
const val = argsplit.length ? argsplit.join('=') : null
switch (key) {
case '--help':
console.log(usage())
return null
case '--dump-config':
dumpConfig = true
continue
case '--nyc-help':
nycHelp()
return null
case '--nyc-version':
nycVersion()
return null
case '--version':
console.log(require('../package.json').version)
return null
case '--jobs':
options.jobs = +(val || args[++i])
continue
case '--jobs-auto':
options.jobs = +os.cpus().length
continue
case '--coverage-report':
options.coverageReport = val || args[++i]
if (options.coverageReport === 'html')
options.coverageReport = 'lcov'
defaultCoverage = true
continue
case '--no-browser':
options.browser = false
continue
case '--no-coverage-report':
options.coverageReport = false
continue
case '--no-cov': case '--no-coverage':
options.coverage = false
continue
case '--cov': case '--coverage':
options.coverage = true
continue
case '--save':
options.saveFile = val || args[++i]
continue
case '--reporter':
options.reporter = val || args[++i]
continue
case '--gc': case '-gc': case '--expose-gc':
options.nodeArgs.push('--expose-gc')
continue
case '--strict':
options.nodeArgs.push('--use_strict')
continue
case '--debug':
options.nodeArgs.push('--debug')
continue
case '--debug-brk':
options.nodeArgs.push('--debug-brk')
continue
case '--harmony':
options.nodeArgs.push('--harmony')
continue
case '--node-arg': {
const v = val || args[++i]
if (v !== undefined)
options.nodeArgs.push(v)
continue
}
case '--check-coverage':
defaultCoverage = true
options.checkCoverage = true
continue
case '--test-arg': {
const v = val || args[++i]
if (v !== undefined)
options.testArgs.push(v)
continue
}
case '--nyc-arg': {
const v = val || args[++i]
if (v !== undefined)
options.nycArgs.push(v)
continue
}
case '--100':
defaultCoverage = true
options.checkCoverage = true
options.branches = 100
options.functions = 100
options.lines = 100
options.statements = 100
continue
case '--branches':
case '--functions':
case '--lines':
case '--statements':
defaultCoverage = true
options.checkCoverage = true
options[key.slice(2)] = +(val || args[++i])
continue
case '--color':
options.color = true
continue
case '--no-color':
options.color = false
continue
case '--output-file': {
const v = val || args[++i]
if (v !== undefined)
options.outputFile = v
continue
}
case '--no-timeout':
options.timeout = 0
continue
case '--timeout':
options.timeout = +(val || args[++i])
continue
case '--invert':
options.grepInvert = true
continue
case '--no-invert':
options.grepInvert = false
continue
case '--grep': {
const v = val || args[++i]
if (v !== undefined)
options.grep.push(strToRegExp(v))
continue
}
case '--bail':
options.bail = true
continue
case '--no-bail':
options.bail = false
continue
case '--only':
options.only = true
continue
case '--':
options.files = options.files.concat(args.slice(i + 1))
i = args.length
continue
default:
throw new Error('Unknown argument: ' + arg)
}
}
if (options.coverage === undefined)
options.coverage = defaultCoverage
if (process.env.TAP === '1')
options.reporter = 'tap'
// default to tap for non-tty envs
if (!options.reporter)
options.reporter = options.color ? 'classic' : 'tap'
if (dumpConfig)
return console.log(JSON.stringify(options, null, 2))
return options
}
// Obviously, this bit isn't going to ever be covered, because
// it only runs when we DON'T have coverage enabled, to enable it.
/* istanbul ignore next */
const respawnWithCoverage = options => {
// Re-spawn with coverage
const args = [nycBin].concat(
'--silent',
'--cache=true',
options.nycArgs,
'--',
process.execArgv,
process.argv.slice(1)
)
process.env._TAP_COVERAGE_ = '1'
const child = fg(node, args)
child.removeAllListeners('close')
child.on('close', (code, signal) =>
runCoverageReport(options, code, signal))
}
/* istanbul ignore next */
const pipeToCoverageServices = (options, child) => {
let piped = false
for (let i = 0; i < coverageServices.length; i++) {
if (process.env[coverageServices[i].env]) {
pipeToCoverageService(coverageServices[i], options, child)
piped = true
}
}
if (!piped)
throw new Error('unknown service, internal error')
}
/* istanbul ignore next */
const pipeToCoverageService = (service, options, child) => {
let bin = service.bin
if (coverageServiceTest) {
// test scaffolding.
// don't actually send stuff to the service
bin = require.resolve('../test-legacy/fixtures/cat.js')
console.log('%s:%s', service.name, process.env[service.env])
}
const ca = spawn(node, [bin], {
stdio: [ 'pipe', 1, 2 ]
})
child.stdout.pipe(ca.stdin)
ca.on('close', (code, signal) =>
signal ? process.kill(process.pid, signal)
: code ? console.log('Error piping coverage to ' + service.name)
: console.log('Successfully piped to ' + service.name))
}
/* istanbul ignore next */
const runCoverageReport = (options, code, signal) => {
if (options.checkCoverage)
runCoverageCheck(options, code, signal)
else
runCoverageReportOnly(options, code, signal)
}
/* istanbul ignore next */
const runCoverageReportOnly = (options, code, signal) => {
const close = (s, c) => {
if (signal || s) {
setTimeout(() => {}, 200)
process.kill(process.pid, signal || s)
} else if (code || c)
process.exit(code || c)
}
if (options.coverageReport === false)
return close(code, signal)
if (!options.coverageReport) {
if (options.pipeToService || coverageServiceTest)
options.coverageReport = 'text-lcov'
else
options.coverageReport = 'text'
}
const args = [nycBin, 'report', '--reporter', options.coverageReport]
let child
// automatically hook into coveralls
if (options.coverageReport === 'text-lcov' && options.pipeToService) {
child = spawn(node, args, { stdio: [ 0, 'pipe', 2 ] })
pipeToCoverageServices(options, child)
} else {
// otherwise just run the reporter
child = fg(node, args)
if (options.coverageReport === 'lcov' && options.browser)
child.on('exit', () =>
opener('coverage/lcov-report/index.html'))
}
if (code || signal) {
child.removeAllListeners('close')
child.on('close', close)
}
}
/* istanbul ignore next */
const coverageCheckArgs = options => {
const args = []
if (options.branches)
args.push('--branches', options.branches)
if (options.functions)
args.push('--functions', options.functions)
if (options.lines)
args.push('--lines', options.lines)
if (options.statements)
args.push('--statements', options.statements)
return args
}
/* istanbul ignore next */
const runCoverageCheck = (options, code, signal) => {
const args = [nycBin, 'check-coverage'].concat(coverageCheckArgs(options))
const child = fg(node, args)
child.removeAllListeners('close')
child.on('close', (c, s) =>
runCoverageReportOnly(options, code || c, signal || s))
}
const usage = _ => fs.readFileSync(__dirname + '/usage.txt', 'utf8')
.split('@@REPORTERS@@')
.join(getReporters())
const nycHelp = _ => fg(node, [nycBin, '--help'])
const nycVersion = _ => console.log(require('nyc/package.json').version)
const getReporters = _ => {
const types = require('tap-mocha-reporter').types.reduce((str, t) => {
const ll = str.split('\n').pop().length + t.length
if (ll < 40)
return str + ' ' + t
else
return str + '\n' + t
}, '').trim()
const ind = ' '
return ind + types.split('\n').join('\n' + ind)
}
const setupTapEnv = options => {
process.env.TAP_TIMEOUT = options.timeout
if (options.color)
process.env.TAP_COLORS = '1'
else
process.env.TAP_COLORS = '0'
if (options.bail)
process.env.TAP_BAIL = '1'
if (options.grepInvert)
process.env.TAP_GREP_INVERT = '1'
if (options.grep.length)
process.env.TAP_GREP = options.grep.map(p => p.toString())
.join('\n')
if (options.only)
process.env.TAP_ONLY = '1'
}
const globFiles = files => files.reduce((acc, f) =>
acc.concat(f === '-' ? f : glob.sync(f, { nonull: true })), [])
const makeReporter = options =>
new (require('tap-mocha-reporter'))(options.reporter)
const stdinOnly = options => {
// if we didn't specify any files, then just passthrough
// to the reporter, so we don't get '/dev/stdin' in the suite list.
// We have to pause() before piping to switch streams2 into old-mode
process.stdin.pause()
const reporter = makeReporter(options)
process.stdin.pipe(reporter)
if (options.outputFile !== null)
process.stdin.pipe(fs.createWriteStream(options.outputFile))
process.stdin.resume()
}
const readSaveFile = options => {
if (options.saveFile)
try {
const s = fs.readFileSync(options.saveFile, 'utf8').trim()
if (s)
return s.split('\n')
} catch (er) {}
return null
}
const saveFails = (options, tap) => {
if (!options.saveFile)
return
let fails = []
const successes = []
tap.on('result', res => {
// we will continue to re-run todo tests, even though they're
// not technically "failures".
if (!res.ok && !res.extra.skip)
fails.push(res.extra.file)
else
successes.push(res.extra.file)
})
const save = () => {
fails = fails.reduce((set, f) => {
f = f.replace(/\\/g, '/')
if (set.indexOf(f) === -1)
set.push(f)
return set
}, [])
if (!fails.length)
try {
fs.unlinkSync(options.saveFile)
} catch (er) {}
else
try {
fs.writeFileSync(options.saveFile, fails.join('\n') + '\n')
} catch (er) {}
}
tap.on('bailout', reason => {
// add any pending test files to the fails list.
fails.push.apply(fails, options.files.filter(file =>
successes.indexOf(file) === -1))
save()
})
tap.on('end', save)
}
const filterFiles = (files, saved, parallelOk) =>
files.filter(file =>
path.basename(file) === 'tap-parallel-ok' ?
((parallelOk[path.resolve(path.dirname(file))] = true), false)
: path.basename(file) === 'tap-parallel-not-ok' ?
parallelOk[path.resolve(path.dirname(file))] = false
: onSavedList(saved, file)
)
// check if the file is on the list, or if it's a parent dir of
// any items that are on the list.
const onSavedList = (saved, file) =>
!saved || !saved.length ? true
: saved.indexOf(file) !== -1 ? true
: saved.some(f => f.indexOf(file + '/') === 0)
const isParallelOk = (parallelOk, file) => {
const dir = path.resolve(path.dirname(file))
return (dir in parallelOk) ? parallelOk[dir]
: exists(dir + '/tap-parallel-ok')
? parallelOk[dir] = true
: exists(dir + '/tap-parallel-not-ok')
? parallelOk[dir] = false
: dir.length >= process.cwd().length
? isParallelOk(parallelOk, dir)
: true
}
const runAllFiles = (options, saved, tap) => {
let doStdin = false
let parallelOk = Object.create(null)
options.files = filterFiles(options.files, saved, parallelOk)
for (let i = 0; i < options.files.length; i++) {
const opt = {}
const file = options.files[i]
// Pick up stdin after all the other files are handled.
if (file === '-') {
doStdin = true
continue
}
let st
try {
st = fs.statSync(file)
} catch (er) {
continue
}
if (options.timeout)
opt.timeout = options.timeout * 1000
opt.file = file
if (st.isDirectory()) {
const dir = filterFiles(fs.readdirSync(file).map(f =>
file + '/' + f), saved, parallelOk)
options.files.push.apply(options.files, dir)
} else {
if (options.jobs > 1)
opt.buffered = isParallelOk(parallelOk, file) !== false
if (file.match(/\.js$/)) {
const args = options.nodeArgs.concat(file).concat(options.testArgs)
tap.spawn(node, args, opt, file)
} else if (isexe.sync(options.files[i]))
tap.spawn(options.files[i], options.testArgs, opt, file)
}
}
if (doStdin)
tap.stdin()
}
const runTests = options => {
const saved = readSaveFile(options)
// At this point, we know we need to use the tap root,
// because there are 1 or more files to spawn.
const tap = require('../lib/tap.js')
tap.runOnly = false
// greps are passed to children, but not the runner itself
tap.grep = []
tap.jobs = options.jobs
tap.patchProcess()
// if not -Rtap, then output what the user wants.
// otherwise just dump to stdout
tap.pipe(options.reporter === 'tap' ? process.stdout: makeReporter(options))
// need to replay the first version line, because the previous
// line will have flushed it out to stdout or the reporter already.
if (options.outputFile !== null)
tap.pipe(fs.createWriteStream(options.outputFile)).write('TAP version 13\n')
saveFails(options, tap)
runAllFiles(options, saved, tap)
tap.end()
}
const parseRcFile = path => {
try {
const contents = fs.readFileSync(path, 'utf8')
return yaml.safeLoad(contents) || {}
} catch (er) {
// if no dotfile exists, or invalid yaml, fail gracefully
return {}
}
}
const strToRegExp = g => {
const p = g.match(/^\/(.*)\/([a-z]*)$/)
g = p ? p[1] : g
const flags = p ? p[2] : ''
return new RegExp(g, flags)
}
main()
node-tap-11.0.0/bin/usage.txt 0000664 0000000 0000000 00000027241 13206406237 0015726 0 ustar 00root root 0000000 0000000 Usage:
tap [options]
Executes all the files and interprets their output as TAP
formatted test result data.
To parse TAP data from stdin, specify "-" as a filename.
Short options are parsed gnu-style, so for example '-bCRspec' would be
equivalent to '--bail --no-color --reporter=spec'
If the --check-coverage or --coverage-report options are provided, but
no test files are specified, then a coverage report or coverage check
will be run on the data from the last test run.
Coverage is never enabled for stdin.
Options:
-j --jobs= Run up to test files in parallel
Note that this causes tests to be run in
"buffered" mode, so line-by-line results
cannot be reported, and older TAP
parsers may get upset.
-J --jobs-auto Run test files in parallel (auto calculated)
Note that this causes tests to be run in
"buffered" mode, so line-by-line results
cannot be reported, and older TAP
parsers may get upset.
-g Only run subtests tests matching the specified
--grep= pattern.
Patterns are matched against top-level
subtests in each file. To filter tests
at subsequent levels, specify this
option multiple times.
To specify regular expression flags,
format pattern like a JavaScript RegExp
literal. For example: '/xyz/i' for
case-insensitive matching.
-i --invert Invert the matches to --grep patterns.
(Like grep -v)
-c --color Use colors (Default for TTY)
-C --no-color Do not use colors (Default for non-TTY)
-b --bail Bail out on first failure
-B --no-bail Do not bail out on first failure (Default)
-O --only Only run tests with {only: true} option
-R --reporter= Use the specified reporter. Defaults to
'classic' when colors are in use, or 'tap'
when colors are disabled.
Available reporters:
@@REPORTERS@@
-o Send the raw TAP output to the specified
--output-file= file. Reporter output will still be
printed to stdout, but the file will
contain the raw TAP for later reply or
analysis.
-s --save= If exists, then it should be a line-
delimited list of test files to run. If
is not present, then all command-line
positional arguments are run.
After the set of test files are run, any
failed test files are written back to the
save file.
This way, repeated runs with -s will
re-run failures until all the failures are
passing, and then once again run all tests.
It's a good idea to .gitignore the file
used for this purpose, as it will churn a
lot.
--coverage --cov Capture coverage information using 'nyc'
If a COVERALLS_REPO_TOKEN environment
variable is set, then coverage is
captured by default and sent to the
coveralls.io service.
--no-coverage --no-cov Do not capture coverage information.
Note that if nyc is already loaded, then
the coverage info will still be captured.
--coverage-report= Output coverage information using the
specified istanbul/nyc reporter type.
Default is 'text' when running on the
command line, or 'text-lcov' when piping
to coveralls.
If 'html' is used, then the report will
be opened in a web browser after running.
This can be run on its own at any time
after a test run that included coverage.
--no-coverage-report Do not output a coverage report.
--no-browser Do not open a web browser after
generating an html coverage report.
-t --timeout= Time out test files after seconds.
Defaults to 30, or the value of the
TAP_TIMEOUT environment variable.
Setting to 0 allows tests to run
forever.
-T --no-timeout Do not time out tests.
Equivalent to --timeout=0
-h --help print this thing you're looking at
-v --version show the version of this program
--node-arg= Pass an argument to Node binary in all
child processes. Run 'node --help' to
see a list of all relevant arguments.
This can be specified multiple times to
pass multiple args to Node.
-gc --expose-gc Expose the gc() function to Node tests
--debug Run JavaScript tests with node --debug
--debug-brk Run JavaScript tests with node --debug-brk
--harmony Enable all Harmony flags in JavaScript tests
--strict Run JS tests in 'use strict' mode
--test-arg= Pass an argument to test files spawned
by the tap command line executable.
This can be specified multiple times to
pass multiple args to test scripts.
--nyc-arg= Pass an argument to nyc when running
child processes with coverage enabled.
This can be specified multiple times to
pass multiple args to nyc.
--check-coverage Check whether coverage is within
thresholds provided. Setting this
explicitly will default --coverage to
true.
This can be run on its own any time
after a test run that included coverage.
--branches what % of branches must be covered?
Setting this will default both
--check-coverage and --coverage to true.
[default: 0]
--functions what % of functions must be covered?
Setting this explicitly will default both
--check-coverage and --coverage to true.
[default: 0]
--lines what % of lines must be covered?
Setting this explicitly will default both
--check-coverage and --coverage to true.
[default: 90]
--statements what % of statements must be covered?
Setting this explicitly will default both
--check-coverage and --coverage to true.
[default: 0]
--100 Full coverage, 100%.
Sets branches, statements, functions,
and lines to 100.
--nyc-help Print nyc usage banner. Useful for
viewing options for --nyc-arg.
--nyc-version Print version of nyc used by tap.
--dump-config Dump the config options in JSON format.
-- Stop parsing flags, and treat any additional
command line arguments as filenames.
Environment Variables:
TAP_SNAPSHOT Set to '1' to generate snapshot files
for `t.matchSnapshot()` assertions.
TAP_RCFILE A yaml formatted file which can set any
of the above options. Defaults to
$HOME/.taprc
TAP_TIMEOUT Default value for --timeout option.
TAP_COLORS Set to '1' to force color output, or '0'
to prevent color output.
TAP_BAIL Bail out on the first test failure.
Used internally when '--bailout' is set.
TAP Set to '1' to force standard TAP output,
and suppress any reporters. Used when
running child tests so that their output
is parseable by the test harness.
TAP_DIAG Set to '1' to show diagnostics by
default for passing tests. Set to '0'
to NOT show diagnostics by default for
failing tests. If not one of these two
values, then diagnostics are printed by
default for failing tests, and not for
passing tests.
TAP_BUFFER Set to '1' to run subtests in buffered
mode by default.
TAP_DEV_LONGSTACK Set to '1' to include node-tap internals
in stack traces. By default, these are
included only when the current working
directory is the tap project itself.
Note that node internals are always
excluded.
TAP_DEV_SHORTSTACK Set to '1' to exclude node-tap internals
in stack traces, even if the current
working directory is the tap project
itself.
_TAP_COVERAGE_ Reserved for internal use.
TAP_DEBUG Set to '1' to turn on debug mode.
NODE_DEBUG Include 'tap' to turn on debug mode.
TAP_GREP A '\n'-delimited list of grep patterns
to apply to root level test objects.
(This is an implementation detail for how
the '--grep' option works.)
TAP_GREP_INVERT Set to '1' to invert the meaning of the
patterns in TAP_GREP. (Implementation
detail for how the '--invert' flag
works.)
Config Files:
You can create a yaml file with any of the options above. By default,
the file at ~/.taprc will be loaded, but the TAP_RCFILE environment
variable can modify this.
Run 'tap --dump-config' for a listing of what can be set in that file.
Each of the keys corresponds to one of the options above.
node-tap-11.0.0/example/ 0000775 0000000 0000000 00000000000 13206406237 0014736 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/example/lib/ 0000775 0000000 0000000 00000000000 13206406237 0015504 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/example/lib/math.js 0000664 0000000 0000000 00000000026 13206406237 0016771 0 ustar 00root root 0000000 0000000 module.exports = Math
node-tap-11.0.0/example/long-slow-many.js 0000664 0000000 0000000 00000001342 13206406237 0020157 0 ustar 00root root 0000000 0000000 var t = require('../lib/tap.js')
t.plan(2)
t.test('gun show', function (t) {
t.plan(100)
var n = 0
var i = setInterval(function () {
if (n % 123 === 5) {
t.fail('FIRE!')
t.fail('THE BUILDING IS ON FIRE')
} else {
t.pass('this is ok')
t.pass('i am ok with how things are proceeding')
}
if (++n === 50) {
return clearInterval(i)
}
}, 100)
})
t.test('wondermark', function (t) {
t.plan(500)
var n = 0
var j = setInterval(function () {
if (n % 123 === 35) {
t.fail('I AM EATING BREAKFAST')
t.fail('FUCKING SEALIONS')
} else {
t.pass('excuse me')
t.pass('pardon me')
}
if (++n === 250) {
return clearInterval(j)
}
}, 10)
})
node-tap-11.0.0/example/mocha-example.js 0000664 0000000 0000000 00000003360 13206406237 0020016 0 ustar 00root root 0000000 0000000 /* standard ignore next */
describe('parent', function () {
before('name', function () {
console.error('before')
});
after(function () {
console.error('after')
});
beforeEach(function () {
console.error('beforeEach')
});
afterEach('after each name', function () {
console.error('afterEach')
});
it('first', function () {
console.error('first it')
})
it('second', function () {
console.error('second it')
})
describe('child 1', function () {
console.error('in child 1')
before(function () {
console.error('before 2')
});
after(function () {
console.error('after 2')
});
beforeEach(function () {
console.error('beforeEach 2')
});
afterEach(function () {
console.error('afterEach 2')
});
it('first x', function () {
console.error('first it')
})
it('second', function (done) {
console.error('second it')
setTimeout(done)
})
describe('gc 1', function () {
it('first y', function () {
console.error('first it')
})
it('second', function (done) {
console.error('second it')
setTimeout(done)
})
it('third', function (done) {
console.error('third it')
done()
})
})
it('third after gc 1', function () {
console.error('second it')
})
})
describe('child 2', function () {
console.error('in child 2')
it('first z', function () {
console.error('first it')
})
it('second', function (done) {
console.error('second it')
setTimeout(done)
})
it('third', function (done) {
console.error('third it')
done()
})
})
it('third', function () {
console.error('second it')
})
})
node-tap-11.0.0/lib/ 0000775 0000000 0000000 00000000000 13206406237 0014051 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/lib/base.js 0000664 0000000 0000000 00000013603 13206406237 0015324 0 ustar 00root root 0000000 0000000 'use strict'
const MiniPass = require('minipass')
const extraFromError = require('./extra-from-error.js')
const assert = require('assert')
const cleanYamlObject = require('./clean-yaml-object.js')
const domain = require('domain')
const util = require('util')
const Parser = require('tap-parser')
const ownOr = require('own-or')
const ownOrEnv = require('own-or-env')
class Base extends MiniPass {
constructor (options) {
options = options || {}
super(options)
this.start = 0
this.hrtime = null
this.time = null
this.timer = null
this.readyToProcess = false
this.options = options
this.grep = ownOr(options, 'grep', [])
this.grepInvert = ownOr(options, 'grepInvert', false)
this.parent = ownOr(options, 'parent', null)
this.bail = ownOrEnv(options, 'bail', 'TAP_BAIL', true)
this.name = ownOr(options, 'name', '')
if (!this.name)
this.name = ''
else
this.name = this.name.replace(/[\n\r\s\t]/g, ' ')
this.indent = ownOr(options, 'indent', '')
this.silent = !!options.silent
this.buffered = !!options.buffered || !!options.silent
this.finished = false
this.strict = ownOrEnv(options, 'strict', 'TAP_STRICT', true)
this.omitVersion = !!options.omitVersion
this.preserveWhitespace = ownOr(options, 'preserveWhitespace', true)
this.jobs = +ownOrEnv(options, 'jobs', 'TAP_JOBS') || 0
this.runOnly = ownOr(options, 'runOnly', false)
this.setupParser(options)
this.finished = false
this.output = ''
this.results = null
this.bailedOut = false
const skip = ownOr(options, 'skip', false)
const todo = ownOr(options, 'todo', false)
if (skip || todo)
this.main = Base.prototype.main
domain.create().add(this)
this.domain.on('error', er => this.threw(er))
const doDebug = typeof options.debug === 'boolean' ? options.debug
: /\btap\b/i.test(process.env.NODE_DEBUG || '')
if (doDebug)
this.debug = debug
}
passing () {
return this.parser.ok
}
setTimeout (n) {
if (!this.hrtime)
this.hrtime = process.hrtime()
if (!this.start)
this.start = Date.now()
if (!n) {
clearTimeout(this.timer)
this.timer = null
} else {
if (this.timer)
clearTimeout(this.timer)
this.timer = setTimeout(() => this.timeout(), n)
/* istanbul ignore else */
if (this.timer.unref)
this.timer.unref()
}
}
threw (er, extra, proxy) {
if (this.name && !proxy)
er.test = this.name
const message = er.message
if (!extra)
extra = extraFromError(er, extra, this.options)
if (this.results) {
this.results.ok = false
if (this.parent)
this.parent.threw(er, extra, true)
else if (!er.stack)
console.error(er)
else {
if (message)
er.message = message
delete extra.stack
delete extra.at
console.error('%s: %s', er.name || 'Error', message)
console.error(er.stack.split(/\n/).slice(1).join('\n'))
console.error(extra)
}
} else
this.parser.ok = false
return extra
}
timeout (options) {
this.setTimeout(false)
const er = new Error('timeout!')
options = options || {}
options.expired = options.expired || this.name
this.emit('timeout', this.threw(new Error('timeout!'), options))
}
main (cb) {
cb()
}
online (line) {
this.debug('LINE %j', line)
return this.write(this.indent + line)
}
write (c, e) {
assert.equal(typeof c, 'string')
assert.equal(c.substr(-1), '\n')
if (this.buffered) {
this.output += c
return true
}
return super.write(c, e)
}
onbail (reason) {
this.bailedOut = reason || true
this.emit('bailout', reason)
}
oncomplete (results) {
if (this.hrtime) {
this.hrtime = process.hrtime(this.hrtime)
this.time = Math.round(this.hrtime[0] * 1e6 + this.hrtime[1] / 1e3) / 1e3
}
this.debug('ONCOMPLETE %j %j', this.name, results)
if (this.results)
Object.keys(this.results)
.forEach(k => results[k] = this.results[k])
this.results = results
this.emit('complete', results)
const failures = results.failures
.filter(f => f.tapError)
.map(f => {
delete f.diag
delete f.ok
return f
})
if (failures.length)
this.options.failures = failures
this.onbeforeend()
this.emit('end')
this.ondone()
}
onbeforeend () {}
ondone () {}
setupParser (options) {
this.parser = new Parser({
bail: this.bail,
strict: this.strict,
omitVersion: this.omitVersion,
preserveWhitespace: this.preserveWhitespace
})
this.parser.on('line', l => this.online(l))
this.parser.once('bailout', reason => this.onbail(reason))
this.parser.on('complete', result => this.oncomplete(result))
}
inspect () {
return this.constructor.name + ' ' + util.inspect({
name: this.name,
jobs: this.jobs,
buffered: this.buffered,
occupied: this.occupied,
pool: this.pool,
queue: this.queue,
subtests: this.subtests,
output: this.output,
skip: ownOr(this.options, 'skip', false),
todo: ownOr(this.options, 'todo', false),
only: ownOr(this.options, 'only', false),
results: this.results,
options: [
'autoend',
'command',
'args',
'stdio',
'env',
'cwd',
'exitCode',
'signal',
'expired',
'timeout',
'at',
'skip',
'todo',
'only',
'runOnly'
].filter(k => this.options[k] !== undefined)
.reduce((s, k) => (s[k] = this.options[k], s), {})
})
}
debug () {}
}
function debug () {
const prefix = 'TAP ' + process.pid + ' ' + this.name + ': '
const msg = util.format.apply(util, arguments).trim()
console.error(prefix + msg.split('\n').join('\n' + prefix))
}
module.exports = Base
node-tap-11.0.0/lib/clean-yaml-object.js 0000664 0000000 0000000 00000004062 13206406237 0017677 0 ustar 00root root 0000000 0000000 'use strict'
const cleanYamlObject = require('clean-yaml-object')
const path = require('path')
const Module = require('module')
const fs = require('fs')
const binpath = path.resolve(__dirname, '../bin')
const stack = require('./stack.js')
const Domain = require('domain').Domain
const hasOwn = (obj, key) =>
Object.prototype.hasOwnProperty.call(obj, key)
const cleanTapYamlObject = object => {
if (hasOwn(object, 'stack') && !hasOwn(object, 'at'))
object.at = stack.parseLine(object.stack.split('\n')[0])
const file = object.at && object.at.file && path.resolve(object.at.file)
if (file && (file.indexOf(__dirname) === 0 || file.indexOf(binpath) === 0))
delete object.at
if (file && object.at && object.at.file && object.at.line && !object.source) {
const content = (() => {
try {
return Module.wrap(fs.readFileSync(file))
} catch (er) {}
})()
if (content) {
const csplit = (content.split('\n')[object.at.line - 1] || '').trim()
if (csplit)
object.source = csplit + '\n'
}
}
return cleanYamlObject(object, yamlFilter)
}
const yamlFilter = (propertyName, isRoot, source, target) =>
source instanceof Domain ? false
: !isRoot ? true
: propertyName === 'stack' ? (
(source.stack ? target.stack = source.stack : false), false)
: !(propertyName === 'todo' ||
propertyName === 'time' ||
/^_?tapChild/.test(propertyName) ||
/^tapStream/.test(propertyName) ||
/^tapMochaTest/.test(propertyName) ||
propertyName === 'cb' ||
propertyName === 'name' ||
propertyName === 'indent' ||
propertyName === 'skip' ||
propertyName === 'bail' ||
propertyName === 'grep' ||
propertyName === 'grepInvert' ||
propertyName === 'only' ||
propertyName === 'diagnostic' ||
propertyName === 'buffered' ||
propertyName === 'parent' ||
propertyName === 'domainEmitter' ||
propertyName === 'domainThrew' ||
propertyName === 'domain' ||
(propertyName === 'at' && !source.at))
module.exports = cleanTapYamlObject
node-tap-11.0.0/lib/diags.js 0000664 0000000 0000000 00000000202 13206406237 0015470 0 ustar 00root root 0000000 0000000 'use strict'
const objToYaml = require('./obj-to-yaml.js')
module.exports = extra => (y => y ? '\n' + y : '')(objToYaml(extra))
node-tap-11.0.0/lib/extra-from-error.js 0000664 0000000 0000000 00000002067 13206406237 0017627 0 ustar 00root root 0000000 0000000 'use strict'
const stack = require('./stack.js')
module.exports = function (er, extra, options) {
extra = Object.keys(options || {}).reduce(function (set, k) {
if (!(k in set) && !/^tapChild/.test(k))
set[k] = options[k]
return set
}, extra || {})
if (!er || typeof er !== 'object') {
extra.error = er
return extra
}
const message = er.message ? er.message
: er.stack ? er.stack.split('\n')[0]
: ''
const addName = er.message || !er.stack
if (er.message)
er.message = ''
const st = er.stack
if (st) {
const splitst = st.split('\n')
// parse out the 'at' bit from the first line.
extra.at = stack.parseLine(splitst[1])
extra.stack = stack.clean(splitst)
}
if (message)
er.message = message
if (er.name && er.name !== 'Error')
extra.type = er.name
Object.keys(er).forEach(function (k) {
if (k === 'message' ||
k === 'domainEmitter' ||
k === 'domainThrown' ||
k === 'domain' ||
k === 'domainBound')
return
extra[k] = er[k]
})
return extra
}
node-tap-11.0.0/lib/mocha.js 0000664 0000000 0000000 00000007315 13206406237 0015504 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('./tap.js')
t.jobs = 1
const tapStack = [ t ]
let level = 0
const suiteStack = []
const describe = (name, fn, opt) =>
new Suite(name, fn, opt)
class Suite {
constructor (name, fn, opt) {
this.parent = suiteStack[ suiteStack.length - 1 ]
if (typeof name === 'function')
fn = name, name = null
if (fn && fn.name && !name)
name = fn.name
this.options = opt || {}
this.options.todo = this.options.todo || !fn
this.fn = fn
this.name = name
this.after = []
this.test = null
this.run()
}
run () {
const t = tapStack[ tapStack.length - 1 ]
t.test(this.name, this.options, tt => {
this.test = tt
tapStack.push(tt)
suiteStack.push(this)
const ret = this.fn()
this.runAfter()
suiteStack.pop()
return ret
})
}
runAfter () {
this.after.forEach(a =>
before(a[0], a[1], a[2]))
let t
do {
t = tapStack.pop()
} while (t && t !== this.test)
if (this.test && !this.test.results)
t.end()
}
}
const before = (name, fn, options) => {
if (typeof name === 'function')
fn = name, name = null
if (fn && fn.name && !name)
name = fn.name
options = options || {}
const todo = !fn
options.todo = options.todo || todo
options.silent = true
const suite = suiteStack[ suiteStack.length - 1 ]
if (!suite)
throw new Error('cannot call "before" outside of describe()')
const t = tapStack[ tapStack.length - 1 ]
if (!name)
name = ''
const done = tt => er => er ? tt.threw(er) : tt.end()
t.test(name, options, tt => {
const ret = fn.call(suite, done(tt))
if (!ret && fn.length === 0)
tt.end()
else
return ret
})
}
const it = (name, fn, options) => {
if (typeof name === 'function')
fn = name, name = null
if (fn && fn.name && !name)
name = fn.name
options = options || {}
const todo = !fn
const suite = suiteStack[ suiteStack.length - 1 ]
const t = tapStack[ tapStack.length - 1 ]
if (!name)
name = ''
const done = tt => er => er ? tt.threw(er) : tt.end()
options.todo = options.todo || todo
options.tapMochaTest = true
t.test(name, options, tt => {
const ret = fn.call(tt, done(tt))
if (ret && ret.then)
return ret
else if (fn.length === 0)
tt.end()
})
}
it.skip = (name, fn) => it(name, fn, { skip: true })
it.todo = (name, fn) => it(name, fn, { todo: true })
function after (name, fn, options) {
const suite = suiteStack[ suiteStack.length - 1 ]
if (!suite)
throw new Error('cannot call "after" outside of describe()')
suite.after.push([name, fn, options])
}
function moment (when, fn) {
const t = tapStack[ tapStack.length - 1 ]
// need function because 'this' tells us which tap object
// has the tapMochaTest thing in its options object
t[when](function (cb) {
if (!this.options.tapMochaTest)
return cb()
const suite = suiteStack[ suiteStack.length - 1 ]
const ret = fn.call(this, cb)
if (ret && ret.then)
return ret
else if (fn.length === 0)
return cb()
})
}
const beforeEach = fn =>
moment('beforeEach', fn)
const afterEach = fn =>
moment('afterEach', fn)
exports.it = exports.specify = it
exports.context = exports.describe = describe
exports.before = before
exports.after = after
exports.beforeEach = beforeEach
exports.afterEach = afterEach
let saved
exports.global = _ => {
if (!saved)
saved = new Map()
Object.keys(exports).filter(g => g !== 'global').forEach(g => {
if (!saved.has(g))
saved.set(g, global[g])
global[g] = exports[g]
})
}
exports.deglobal = _ =>
Object.keys(exports).filter(g => g !== 'global').forEach(g => {
if (saved && saved.has(g))
global[g] = saved.get(g)
})
node-tap-11.0.0/lib/obj-to-yaml.js 0000664 0000000 0000000 00000000561 13206406237 0016543 0 ustar 00root root 0000000 0000000 'use strict'
const cleanYamlObject = require('./clean-yaml-object.js')
const yaml = require('js-yaml')
module.exports = obj => (clean =>
(clean && typeof clean === 'object' && Object.keys(clean).length) ?
' ---\n' + (yaml.safeDump(clean).split('\n').map(
l => l.trim() ? ' ' + l : l.trim()
).join('\n')) + ' ...\n'
: ''
)(cleanYamlObject(obj))
node-tap-11.0.0/lib/parse-test-args.js 0000664 0000000 0000000 00000002643 13206406237 0017435 0 ustar 00root root 0000000 0000000 'use strict'
const typeOf = arg =>
typeof arg === 'object' ? (arg ? 'object' : 'null')
: typeof arg
module.exports = (name_, extra_, cb_, defaultName) => {
let name
let extra
let cb
const args = [name_, extra_, cb_]
// this only works if it's literally the 4th argument.
// used internally.
defaultName = defaultName || ''
for (let i = 0; i < 3 && i < args.length; i++) {
const arg = args[i]
const type = typeOf(arg)
if (name === undefined && (type === 'string' || type === 'number'))
name = '' + arg
else if (type === 'object') {
extra = arg
if (name === undefined)
name = null
} else if (type === 'function') {
if (extra === undefined)
extra = {}
if (name === undefined)
name = null
cb = arg
} else if (arg === false) {
// it's handy while developing to put a ! in front of a
// function to temporarily make a test todo
continue
} else if (type !== 'undefined')
throw new TypeError('unknown argument passed to parseTestArgs: ' + type)
}
if (!extra)
extra = {}
if (!cb && defaultName !== '/dev/stdin')
extra.todo = true
if (!name && extra.name)
name = extra.name
if (!name && cb && cb.name)
name = cb.name
name = name || defaultName
extra.name = name
extra.cb = cb || todoCb
return extra
}
const todoCb = () => {
throw new Error('callback called for TODO test')
}
node-tap-11.0.0/lib/point.js 0000664 0000000 0000000 00000002507 13206406237 0015544 0 ustar 00root root 0000000 0000000 'use strict'
const path = require('path')
const binpath = path.resolve(__dirname, '../bin')
const util = require('util')
const diags = require('./diags.js')
class TestPoint {
constructor (ok, message, extra) {
if (typeof ok !== 'boolean')
throw new TypeError('ok must be boolean')
if (typeof message !== 'string')
throw new TypeError('message must be a string')
extra = extra || {}
this.ok = ok ? 'ok ' : 'not ok '
this.message = tpMessage(message.trim(), extra)
}
}
const tpMessage = (message, extra) => {
if (message)
message = ' - ' + message
// replace \r\n with one space, \t with 2, separately
message = message.replace(/[\n\r]/g, ' ').replace(/\t/g, ' ')
if (extra.skip) {
message += ' # SKIP'
if (typeof extra.skip === 'string')
message += ' ' + extra.skip
} else if (extra.todo) {
message += ' # TODO'
if (typeof extra.todo === 'string')
message += ' ' + extra.todo
} else if (extra.time)
message += ' # time=' + extra.time + 'ms'
const diagYaml = extra.diagnostic ? diags(extra) : ''
message += diagYaml
if (extra.tapChildBuffer || extra.tapChildBuffer === '') {
if (!diagYaml)
message += ' '
message += '{\n' + extra.tapChildBuffer.trimRight() + '\n}\n'
}
message += '\n'
return message
}
module.exports = TestPoint
node-tap-11.0.0/lib/snapshot.js 0000664 0000000 0000000 00000004507 13206406237 0016254 0 ustar 00root root 0000000 0000000 'use strict'
const writeFile = require('write-file-atomic')
const fs = require('fs')
const mkdirp = require('mkdirp')
const path = require('path')
const rimraf = require('rimraf')
class Snapshot {
constructor (test) {
this.indexes = new Map()
this.test = test
// name them .test.js so that nyc ignores them
this.file = path.resolve(
process.cwd(),
'tap-snapshots',
this.test.fullname.replace(/[^a-zA-Z0-9\._\-]+/g, '-')
) + '.test.js'
this.snapshot = null
}
// should only ever call _one_ of read/save
read (message) {
const index = this.indexes.get(message) || 1
this.indexes.set(message, index + 1)
try {
this.snapshot = this.snapshot || require(this.file)
} catch (er) {
throw new Error(
'Snapshot file not found: ' + this.file + '\n' +
'Run with TAP_SNAPSHOT=1 in the environment\n' +
'to create snapshot files'
)
}
const entry = message + ' ' + index
const s = this.snapshot[entry]
if (s === undefined)
throw new Error(
'Snapshot entry not found: "' + entry + + '"\n' +
'Run with TAP_SNAPSHOT=1 in the environment\n' +
'to create snapshots'
)
return s.replace(/^\n|\n$/g, '')
}
snap (data, message) {
const index = this.indexes.get(message) || 1
this.indexes.set(message, index + 1)
this.snapshot = this.snapshot || {}
this.snapshot[message + ' ' + index] = data
}
save () {
if (!this.snapshot)
rimraf.sync(this.file)
else {
const escape = s => s
.replace(/\\/g, '\\\\')
.replace(/\`/g, '\\\`')
.replace(/\$\{/g, '\\${')
const data =
'/* IMPORTANT\n' +
' * This snapshot file is auto-generated, but designed for humans.\n' +
' * It should be checked into source control and tracked carefully.\n' +
' * Re-generate by setting TAP_SNAPSHOT=1 and running tests.\n' +
' * Make sure to inspect the output below. Do not ignore changes!\n' +
' */\n\'use strict\'\n' + (
Object.keys(this.snapshot).map(s =>
`exports[\`${
escape(s)
}\`] = \`\n${
escape(this.snapshot[s])
}\n\`\n`).join('\n'))
mkdirp.sync(path.dirname(this.file))
writeFile.sync(this.file, data, 'utf8')
}
}
}
module.exports = Snapshot
node-tap-11.0.0/lib/spawn.js 0000664 0000000 0000000 00000006743 13206406237 0015551 0 ustar 00root root 0000000 0000000 'use strict'
const Base = require('./base.js')
const assert = require('assert')
const util = require('util')
const ownOr = require('own-or')
const path = require('path')
const cleanYamlObject = require('./clean-yaml-object.js')
const cp = require('child_process')
class Spawn extends Base {
constructor (options) {
options = options || {}
super(options)
this.command = options.command
if (!this.command)
throw new TypeError('no command provided')
this.args = options.args
// stdout must be a pipe
if (options.stdio) {
if (typeof options.stdio === 'string')
this.stdio = [ options.stdio, 'pipe', options.stdio ]
else
this.stdio = options.stdio.slice(0)
} else
this.stdio = [ 0, 'pipe', 2 ]
this.stdio[1] = 'pipe'
options.stdio = this.stdio
const env = options.env || process.env
this.env = Object.assign({}, env)
this.env.TAP = '1'
if (this.bail)
this.env.TAP_BAIL = '1'
this.cwd = ownOr(options, 'cwd', process.cwd())
options.cwd = this.cwd
if (!this.name) {
if (this.command === process.execPath) {
this.name = path.basename(process.execPath) + ' ' +
this.args.map(a =>
a.indexOf(this.cwd) === 0 ?
'./' + a.substr(this.cwd.length + 1).replace(/\\/g, '/')
: a).join(' ')
} else {
this.name = this.command + ' ' + this.args.join(' ')
}
}
this.proc = null
}
endAll () {
if (this.proc)
this.proc.kill('SIGKILL')
this.parser.abort('test unfinished')
this.callCb()
}
main (cb) {
this.cb = cb
this.setTimeout(this.options.timeout)
const options = Object.assign({
cwd: this.cwd,
env: this.env,
stdio: this.stdio
}, this.options)
try {
const proc = this.proc = cp.spawn(this.command, this.args, options)
proc.stdout.pipe(this.parser)
proc.on('close', (code, signal) => this.onprocclose(code, signal))
proc.on('error', er => this.threw(er))
this.emit('process', proc)
if (this.parent)
this.parent.emit('spawn', this)
} catch (er) {
this.threw(er)
}
}
callCb () {
if (this.cb)
this.cb()
this.cb = null
}
threw (er, extra, proxy) {
extra = Base.prototype.threw.call(this, er, extra, proxy)
extra = cleanYamlObject(extra)
// unhook entirely
this.parser.abort(er.message, extra)
if (this.proc) {
this.proc.stdout.removeAllListeners('data')
this.proc.stdout.removeAllListeners('end')
this.proc.removeAllListeners('close')
this.proc.kill('SIGKILL')
}
this.callCb()
}
onprocclose (code, signal) {
this.debug('SPAWN close %j %s', code, signal)
this.options.exitCode = code
if (signal)
this.options.signal = signal
// spawn closing with no tests is treated as a skip.
if (this.results.plan && this.results.plan.skipAll && !code && !signal)
this.options.skip = this.results.plan.skipReason || true
if (code || signal) {
this.results.ok = false
this.parser.ok = false
}
return this.callCb()
}
timeout (extra) {
if (this.proc) {
this.proc.kill('SIGTERM')
const t = setTimeout(() => {
if (!this.options.signal && this.options.exitCode === undefined) {
Base.prototype.timeout.call(this, extra)
this.proc.kill('SIGKILL')
}
}, 1000)
/* istanbul ignore else */
if (t.unref)
t.unref()
}
}
}
module.exports = Spawn
node-tap-11.0.0/lib/stack.js 0000664 0000000 0000000 00000002012 13206406237 0015507 0 ustar 00root root 0000000 0000000 'use strict'
const sourceMapSupport = require('source-map-support')
const StackUtils = require('stack-utils')
const path = require('path')
const tapDir = path.resolve(__dirname, '..')
const osHomedir = require('os-homedir')
const resc = str =>
str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&')
// Ignore tap if it's a dependency, or anything
// in this lib folder.
// don't skip when developing on tap itself
const skip = (process.cwd() !== tapDir ||
+process.env.TAP_DEV_SHORTSTACK === 1) &&
+process.env.TAP_DEV_LONGSTACK !== 1
? [
/node_modules[\/\\]tap[\/\\]/,
new RegExp(resc(path.resolve(osHomedir(), '.node-spawn-wrap-')) + '.*'),
new RegExp(resc(tapDir) + '\\b', 'i'),
new RegExp(resc(require.resolve('function-loop'))),
new RegExp(resc(path.dirname(require.resolve('bluebird/package.json'))))
]
: []
sourceMapSupport.install({environment:'node'})
module.exports = new StackUtils({
internals: StackUtils.nodeInternals().concat(skip),
wrapCallSite: sourceMapSupport.wrapCallSite
})
node-tap-11.0.0/lib/stdin.js 0000664 0000000 0000000 00000001420 13206406237 0015525 0 ustar 00root root 0000000 0000000 'use strict'
const Base = require('./base.js')
const ownOr = require('own-or')
const domain = require('domain')
class Stdin extends Base {
constructor (options) {
options = options || {}
options.name = ownOr(options, 'name', '/dev/stdin')
super(options)
// This has to be here for node 0.10's wonky streams
this.stream = ownOr(options, 'tapStream', process.stdin)
this.stream.pause()
}
main (cb) {
this.domain.add(this.stream)
this.setTimeout(this.options.timeout)
this.stream.pipe(this.parser)
this.stream.resume()
this.once('end', cb)
}
threw (er, extra, proxy) {
extra = super.threw(er, extra, proxy)
this.options = extra
this.parser.abort(er.message, extra)
this.parser.end()
}
}
module.exports = Stdin
node-tap-11.0.0/lib/synonyms.js 0000664 0000000 0000000 00000004206 13206406237 0016310 0 ustar 00root root 0000000 0000000 'use strict'
// A list of all the synonyms of assert methods.
// In addition to these, multi-word camelCase are also synonymized to
// all lowercase and snake_case
const multiword = obj =>
Object.keys(obj).reduce((s, i) =>
(s[i] = [ multiword_(i) ]
.concat(obj[i].map(multiword_))
.reduce((s, i) => (s.push.apply(s, i), s), []), s), obj)
const multiword_ = str =>
str.match(/[A-Z]/) ? [
str,
str.toLowerCase(),
str.replace(/[A-Z]/g, $0 => '_' + $0.toLowerCase())
] : [str]
module.exports = multiword({
ok: ['true', 'assert'],
notOk: ['false', 'assertNot'],
error: ['ifError', 'ifErr'],
throws: ['throw'],
doesNotThrow: ['notThrow'],
// exactly the same. ===
equal: [
'equals', 'isEqual', 'is', 'strictEqual', 'strictEquals', 'strictIs',
'isStrict', 'isStrictly'
],
// not equal. !==
not: [
'inequal', 'notEqual', 'notEquals', 'notStrictEqual', 'notStrictEquals',
'isNotEqual', 'isNot', 'doesNotEqual', 'isInequal'
],
// deep equivalence. == for scalars
same: [
'equivalent', 'looseEqual', 'looseEquals', 'deepEqual',
'deepEquals', 'isLoose', 'looseIs', 'isEquivalent'
],
// deep inequivalence. != for scalars
notSame: [
'inequivalent', 'looseInequal', 'notDeep', 'deepInequal',
'notLoose', 'looseNot', 'notEquivalent', 'isNotDeepEqual',
'isNotDeeply', 'notDeepEqual', 'isInequivalent',
'isNotEquivalent'
],
// deep equivalence, === for scalars
strictSame: [
'strictEquivalent', 'strictDeepEqual', 'sameStrict', 'deepIs',
'isDeeply', 'isDeep', 'strictDeepEquals'
],
// deep inequivalence, !== for scalars
strictNotSame: [
'strictInequivalent', 'strictDeepInequal', 'notSameStrict', 'deepNot',
'notDeeply', 'strictDeepInequals', 'notStrictSame'
],
// found has the fields in wanted, string matches regexp
match: [
'has', 'hasFields', 'matches', 'similar', 'like', 'isLike',
'includes', 'include', 'isSimilar', 'contains'
],
notMatch: [
'dissimilar', 'unsimilar', 'notSimilar', 'unlike', 'isUnlike',
'notLike', 'isNotLike', 'doesNotHave', 'isNotSimilar', 'isDissimilar'
],
type: [
'isa', 'isA'
]
})
node-tap-11.0.0/lib/tap.js 0000664 0000000 0000000 00000012311 13206406237 0015171 0 ustar 00root root 0000000 0000000 'use strict'
const Test = require('./test.js')
const Stdin = require('./stdin.js')
const Spawn = require('./spawn.js')
const util = require('util')
const objToYaml = require('./obj-to-yaml.js')
const yaml = require('js-yaml')
const _didPipe = Symbol('_didPipe')
const monkeypatchEpipe = () => {
const emit = process.stdout.emit
process.stdout.emit = (ev, er) => {
if (ev !== 'error' || er.code !== 'EPIPE')
return emit.apply(process, arguments)
}
}
const monkeypatchExit = () => {
const exit = process.exit
const reallyExit = process.reallyExit
// ensure that we always get run, even if a user does
// process.on('exit', process.exit)
process.reallyExit = code =>
reallyExit.call(process, onExitEvent(code))
process.exit = code =>
exit.call(process, onExitEvent(code))
process.on('exit', onExitEvent)
}
class TAP extends Test {
constructor (options) {
super(options)
this.runOnly = process.env.TAP_ONLY === '1'
this.start = Date.now()
this[_didPipe] = false
}
pipe () {
this[_didPipe] = true
this.setTimeout(this.options.timeout)
this.pipe = Test.prototype.pipe
this.write = Test.prototype.write
const ret = this.pipe.apply(this, arguments)
this.process()
return ret
}
write (c, e) {
// this resets write and pipe to standard values
this.pipe(process.stdout)
this.patchProcess()
return super.write(c, e)
}
patchProcess () {
monkeypatchEpipe()
monkeypatchExit()
process.on('uncaughtException', this.threw)
process.on('unhandledRejection', er => this.threw(er))
}
onbail () {
Test.prototype.onbail.apply(this, arguments)
this.endAll()
process.exit(1)
}
onbeforeend () {
if (this[_didPipe] && this.time && !this.bailedOut)
this.emit('data', '# time=' + this.time + 'ms\n')
}
ondone () {
try {
this.emit('teardown')
} catch (er) {
this.threw(er)
}
}
// Root test runner doesn't have the 'teardown' event, because it
// isn't hooked into any parent Test as a harness.
teardown (fn) {
this.autoend()
return Test.prototype.teardown.apply(this, arguments)
}
tearDown (fn) {
return this.teardown(fn)
}
}
let didOnExitEvent = false
const onExitEvent = code => {
if (didOnExitEvent)
return process.exitCode || code
didOnExitEvent = true
if (!tap.results)
tap.endAll()
if (tap.results && !tap.results.ok && code === 0) {
process.exitCode = 1
if (process.version.match(/^v0\.(10|[0-9])\./))
process.exit(code)
}
return process.exitCode || code || 0
}
const opt = { name: 'TAP' }
if (process.env.TAP_DEBUG === '1' ||
/\btap\b/.test(process.env.NODE_DEBUG || ''))
opt.debug = true
if (process.env.TAP_GREP) {
opt.grep = process.env.TAP_GREP.split('\n').map(g => {
const p = g.match(/^\/(.*)\/([a-z]*)$/)
g = p ? p[1] : g
const flags = p ? p[2] : ''
return new RegExp(g, flags)
})
}
if (process.env.TAP_GREP_INVERT === '1')
opt.grepInvert = true
if (process.env.TAP_ONLY === '1')
opt.only = true
const tap = new TAP(opt)
module.exports = tap
tap.mocha = require('./mocha.js')
tap.mochaGlobals = tap.mocha.global
tap.Test = Test
tap.Spawn = Spawn
tap.Stdin = Stdin
tap.synonyms = require('./synonyms.js')
// SIGTERM means being forcibly killed, almost always by timeout
const onExit = require('signal-exit')
let didTimeoutKill = false
onExit((code, signal) => {
if (signal !== 'SIGTERM' || !tap[_didPipe] || didTimeoutKill)
return
const handles = process._getActiveHandles().filter(h =>
h !== process.stdout &&
h !== process.stdin &&
h !== process.stderr
)
const requests = process._getActiveRequests()
// Ignore this because it's really hard to test cover in a way
// that isn't inconsistent and unpredictable.
/* istanbul ignore next */
const extra = {
at: null,
signal: signal
}
if (requests.length) {
extra.requests = requests.map(r => {
const ret = {}
ret.type = r.constructor.name
// most everything in node has a context these days
/* istanbul ignore else */
if (r.context)
ret.context = r.context
return ret
})
}
if (handles.length) {
extra.handles = handles.map(h => {
const ret = {}
ret.type = h.constructor.name
// all of this is very internal-ish
/* istanbul ignore next */
if (h.msecs)
ret.msecs = h.msecs
/* istanbul ignore next */
if (h._events)
ret.events = Object.keys(h._events)
/* istanbul ignore next */
if (h._sockname)
ret.sockname = h._sockname
/* istanbul ignore next */
if (h._connectionKey)
ret.connectionKey = h._connectionKey
return ret
})
}
// this is impossible to cover, because it happens after nyc has
// already done its stuff.
/* istanbul ignore else */
if (!tap.results && tap.timeout)
tap.timeout(extra)
else {
console.error('possible timeout: SIGTERM received after tap end')
if (extra.handles || extra.requests) {
delete extra.signal
if (!extra.at) {
delete extra.at
}
const yaml = require('js-yaml')
console.error(objToYaml(extra))
}
didTimeoutKill = true
process.kill(process.pid, 'SIGTERM')
}
})
node-tap-11.0.0/lib/test.js 0000664 0000000 0000000 00000106110 13206406237 0015365 0 ustar 00root root 0000000 0000000 'use strict'
// We need TWO queues (work and subtest) and one jobs pool
//
// The pool stores buffered subtests being run in parallel.
//
// When new subtests are created, they get put in the work queue and also
// in the subtests queue if they are buffered and jobs>0. When we put a
// test in the subtest queue, we also process it.
//
// Processing the subtest queue means moving tests into the jobs pool until
// the jobs pool length is at this.jobs
//
// Any output functions get put in the work queue if its length > 0 (ie,
// no cutting the line)
//
// Processing the work queue means walking until we run out of things, or
// encounter an unfinished test. When we encounter ANY kind of test, we
// block until its output is completed, dumping it all into the parser.
const Base = require('./base.js')
const Spawn = require('./spawn.js')
const Stdin = require('./stdin.js')
const Deferred = require('trivial-deferred')
const Pool = require('yapool')
const TestPoint = require('./point.js')
const parseTestArgs = require('./parse-test-args.js')
const loop = require('function-loop')
const path = require('path')
const extraFromError = require('./extra-from-error.js')
const tsame = require('tsame') // same thing, strict or not
const tmatch = require('tmatch') // ok with partial estimates
const stack = require('./stack.js')
const synonyms = require('./synonyms.js')
const assert = require('assert')
const util = require('util')
const ownOr = require('own-or')
const ownOrEnv = require('own-or-env')
const Promise = require('bluebird')
const bindObj = require('bind-obj-methods')
const cwd = process.cwd()
// A sigil object for implicit end() calls that should not
// trigger an error if the user then calls t.end()
const IMPLICIT = Symbol('implicit t.end()')
// Sigil to put in the queue to signal the end of all things
const EOF = Symbol('EOF')
const _currentAssert = Symbol('_currentAssert')
const _end = Symbol('_end')
const _snapshot = Symbol('_snapshot')
const Snapshot = require('./snapshot.js')
const hasOwn = (obj, key) =>
Object.prototype.hasOwnProperty.call(obj, key)
const isRegExp = re =>
Object.prototype.toString.call(re) === '[object RegExp]'
class Test extends Base {
constructor (options) {
options = options || {}
super(options)
this.pushedEnd = false
this.jobs = ownOr(options, 'jobs', 1)
this.subtests = []
this.pool = new Pool()
this.queue = ['TAP version 13\n']
// snapshots are keyed off of the main file that loads the
// root test object. Typically, this is the TAP object.
// To do this, we climb the ladder and only save in the teardown
// of that root (parentless) test object. This allows handling
// cases where the same test name can be used multiple times
// in a single test file, which would otherwise clobber snapshots.
this.writeSnapshot = ownOrEnv(
options, 'snapshot', 'TAP_SNAPSHOT', true)
if (this.parent && this.parent[_snapshot])
this[_snapshot] = this.parent[_snapshot]
else
this[_snapshot] = new Snapshot(this)
this.noparallel = false
if (options.cb)
this.cb = this.domain.bind(options.cb)
this.occupied = false
this[_currentAssert] = null
this.count = 0
this.n = 0
this.ended = false
this.explicitEnded = false
this.multiEndThrew = false
this.assertAt = null
this.assertStack = null
this.planEnd = -1
this.onBeforeEach = []
this.onAfterEach = []
this.ranAfterEach = false
// bind all methods to this object, so we can pass t.end as a callback
// and do `const test = require('tap').test` like people do.
const bound = Object.create(null)
bindObj(this, this, bound)
bindObj(this, Object.getPrototypeOf(this), bound)
bindObj(this, Test.prototype, bound)
}
spawn (cmd, args, options, name) {
if (typeof args === 'string')
args = [ args ]
args = args || []
if (typeof options === 'string') {
name = options
options = {}
}
options = options || {}
options.name = ownOr(options, 'name', name)
options.command = cmd
options.args = args
return this.sub(Spawn, options, Test.prototype.spawn)
}
sub (Class, extra, caller) {
if (this.results || this.ended) {
const er = new Error('cannot create subtest after parent test end')
this.threw(er)
return Promise.resolve(this)
}
if (!extra.skip && this.grep.length) {
const m = this.grep[0].test(extra.name)
const match = this.grepInvert ? !m : m
if (!match) {
const p = 'filter' + (this.grepInvert ? ' out' : '') + ': '
extra.skip = p + this.grep[0]
}
}
if (extra.only && !this.runOnly)
this.comment('%j has `only` set but all tests run', extra.name)
if (this.runOnly && !extra.only)
extra.skip = 'filter: only'
if (extra.todo || extra.skip) {
this.pass(extra.name, extra)
return Promise.resolve(this)
}
if (!extra.grep) {
extra.grep = this.grep.slice(1)
extra.grepInvert = this.grepInvert
}
extra.indent = ' '
if (this.jobs > 1 && process.env.TAP_BUFFER === undefined)
extra.buffered = ownOr(extra, 'buffered', true)
else
extra.buffered = ownOrEnv(extra, 'buffered', 'TAP_BUFFER', true)
extra.bail = ownOr(extra, 'bail', this.bail)
extra.parent = this
extra.stack = stack.captureString(80, caller)
const t = new Class(extra)
this.queue.push(t)
this.subtests.push(t)
const d = new Deferred()
t.deferred = d
this.process()
return d.promise
}
todo (name, extra, cb) {
extra = parseTestArgs(name, extra, cb)
extra.todo = true
return this.sub(Test, extra, Test.prototype.todo)
}
skip (name, extra, cb) {
extra = parseTestArgs(name, extra, cb)
extra.skip = true
return this.sub(Test, extra, Test.prototype.skip)
}
only (name, extra, cb) {
extra = parseTestArgs(name, extra, cb)
extra.only = true
return this.sub(Test, extra, Test.prototype.only)
}
test (name, extra, cb) {
extra = parseTestArgs(name, extra, cb)
return this.sub(Test, extra, Test.prototype.test)
}
stdin (name, extra) {
/* istanbul ignore next */
extra = parseTestArgs(name, extra, false, '/dev/stdin')
return this.sub(Stdin, extra, Test.prototype.stdin)
}
bailout (message) {
if (this.parent && (this.results || this.ended))
this.parent.bailout(message)
else {
this.process()
message = message ? ' ' + ('' + message).trim() : ''
message = message.replace(/[\r\n]/g, ' ')
this.parser.write('Bail out!' + message + '\n')
}
this.end(IMPLICIT)
this.process()
}
comment () {
const body = util.format.apply(util, arguments)
const message = '# ' + body.split(/\r?\n/).join('\n# ') + '\n'
if (this.results)
this.write(message)
else
this.queue.push(message)
this.process()
}
timeout (options) {
options = options || {}
options.expired = options.expired || this.name
if (this.occupied)
this.occupied.timeout(options)
else
Base.prototype.timeout.call(this, options)
this.end(IMPLICIT)
}
main (cb) {
this.setTimeout(this.options.timeout)
this.debug('MAIN pre', this)
const end = () => {
this.debug(' > implicit end for promise')
this.end(IMPLICIT)
done()
}
const done = (er) => {
if (er)
this.threw(er)
if (this.results || this.bailedOut)
cb()
else
this.ondone = cb
}
// This bit of overly clever line-noise wraps the call to user-code
// in a try-catch. We can't rely on the domain for this yet, because
// the 'end' event can trigger a throw after the domain is unhooked,
// but before this is no longer the official "active test"
const ret = (() => {
try {
return this.cb(this)
} catch (er) {
this.threw(er)
}
})()
if (ret && ret.then) {
this.promise = ret
ret.tapAbortPromise = done
ret.then(end, done)
} else
done()
this.debug('MAIN post', this)
}
process () {
if (this.processing)
return this.debug(' < already processing')
this.debug('\nPROCESSING(%s)', this.name, this.queue.length)
this.processing = true
while (!this.occupied) {
const p = this.queue.shift()
if (!p)
break
if (p instanceof Base) {
this.processSubtest(p)
} else if (p === EOF) {
this.debug(' > EOF', this.name)
// I AM BECOME EOF, DESTROYER OF STREAMS
if (this.writeSnapshot)
this[_snapshot].save()
this.parser.end()
} else if (p instanceof TestPoint) {
this.debug(' > TESTPOINT')
this.parser.write(p.ok + (++this.n) + p.message)
} else if (typeof p === 'string') {
this.debug(' > STRING')
this.parser.write(p)
} else {
/* istanbul ignore else */
if (Array.isArray(p)) {
this.debug(' > METHOD')
const m = p.shift()
this[m].apply(this, p)
} else {
throw new Error('weird thing got in the queue')
}
}
}
while (!this.noparallel && this.pool.length < this.jobs) {
const p = this.subtests.shift()
if (!p)
break
if (!p.buffered) {
this.noparallel = true
break
}
this.debug('start subtest', p)
this.pool.add(p)
if (this.bailedOut)
this.onbufferedend(p)
else
this.runBeforeEach(p, () =>
p.main(() => this.onbufferedend(p)))
}
this.debug('done processing', this.queue, this.occupied)
this.processing = false
// just in case any tests ended, and we have sync stuff still
// waiting around in the queue to be processed
if (!this.occupied && this.queue.length)
this.process()
this.maybeAutoend()
}
processSubtest (p) {
this.debug(' > subtest')
this.occupied = p
if (!p.buffered) {
if (this.bailedOut)
return this.onindentedend(p)
this.debug(' > subtest indented')
p.pipe(this.parser, { end: false })
this.runBeforeEach(p, () =>
this.writeSubComment(p, () =>
p.main(() => this.onindentedend(p))))
} else if (p.readyToProcess) {
this.debug(' > subtest buffered, finished')
// finished! do the thing!
this.occupied = null
if (!p.passing() || !p.silent) {
this.queue.unshift(['emitSubTeardown', p])
this.printResult(p.passing(), p.name, p.options, true)
}
} else {
this.occupied = p
this.debug(' > subtest buffered, unfinished', p)
// unfinished buffered test.
// nothing to do yet, just leave it there.
this.queue.unshift(p)
}
}
emitSubTeardown (p) {
try {
p.emit('teardown')
} catch (er) {
delete p.options.time
p.threw(er)
}
}
writeSubComment (p, cb) {
const comment = '# Subtest' +
(p.name ? ': ' + p.name : '') +
'\n'
this.parser.write(comment)
cb()
}
onbufferedend (p) {
delete p.ondone
p.results = p.results || {}
p.readyToProcess = true
const to = p.options.timeout
const dur = (to && p.passing()) ? Date.now() - p.start : null
if (dur && dur > to)
p.timeout()
else
p.setTimeout(false)
this.debug('%s.onbufferedend', this.name, p.name, p.results.bailout)
this.pool.remove(p)
p.options.tapChildBuffer = p.output || ''
p.options.stack = ''
if (p.time)
p.options.time = p.time
if (this.occupied === p)
this.occupied = null
p.deferred.resolve(this)
this.process()
}
onindentedend (p) {
delete p.ondone
this.debug('onindentedend', p)
this.noparallel = false
const sti = this.subtests.indexOf(p)
if (sti !== -1)
this.subtests.splice(sti, 1)
p.readyToProcess = true
p.results = p.results || {}
if (p.time)
p.options.time = p.time
const to = p.options.timeout
const dur = (to && p.passing()) ? Date.now() - p.start : null
if (dur && dur > to)
p.timeout()
else
p.setTimeout(false)
this.debug('onindentedend %s(%s)', this.name, p.name)
if (!p.bailedOut)
assert.equal(this.occupied, p)
this.occupied = null
this.debug('OIE(%s) b>shift into queue', this.name, this.queue)
p.options.stack = ''
this.queue.unshift(['emitSubTeardown', p])
this.printResult(p.passing(), p.name, p.options, true)
this.debug('OIE(%s) shifted into queue', this.name, this.queue)
p.deferred.resolve(this)
this.process()
}
addAssert (name, length, fn) {
if (!name)
throw new TypeError('name is required for addAssert')
if (!(typeof length === 'number' && length >= 0))
throw new TypeError('number of args required')
if (typeof fn !== 'function')
throw new TypeError('function required for addAssert')
if (Test.prototype[name] || this[name])
throw new TypeError('attempt to re-define `' + name + '` assert')
function ASSERT () {
this.currentAssert = ASSERT
const args = new Array(length + 2)
for (let i = 0; i < length; i++) {
args[i] = arguments[i]
}
if (typeof arguments[length] === 'object') {
args[length] = ''
args[length + 1] = arguments[length]
} else {
args[length] = arguments[length] || ''
args[length + 1] = arguments[length + 1] || {}
}
return fn.apply(this, args)
}
this[name] = ASSERT
}
printResult (ok, message, extra, front) {
const n = this.count + 1
this.currentAssert = Test.prototype.printResult
const fn = this[_currentAssert]
this[_currentAssert] = null
if (this.planEnd !== -1 && n > this.planEnd) {
if (!this.passing())
return
const failMessage = this.explicitEnded
? 'test after end() was called'
: 'test count exceeds plan'
const er = new Error(failMessage)
Error.captureStackTrace(er, fn)
er.test = this.name
er.plan = this.planEnd
this.threw(er)
return
}
extra = extra || {}
if (extra.expectFail)
ok = !ok
if (this.assertAt) {
extra.at = this.assertAt
this.assertAt = null
}
if (this.assertStack) {
extra.stack = this.assertStack
this.assertStack = null
}
if (hasOwn(extra, 'stack') && !hasOwn(extra, 'at'))
extra.at = stack.parseLine(extra.stack.split('\n')[0])
if (!ok && !extra.skip && !hasOwn(extra, 'at')) {
assert.equal(typeof fn, 'function')
extra.at = stack.at(fn)
if (!extra.todo)
extra.stack = stack.captureString(80, fn)
}
const diagnostic =
typeof extra.diagnostic === 'boolean' ? extra.diagnostic
: process.env.TAP_DIAG === '0' ? false
: process.env.TAP_DIAG === '1' ? true
: extra.skip ? false
: !ok
if (diagnostic)
extra.diagnostic = true
this.count = n
message = message + ''
const res = { ok: ok, message: message, extra: extra }
const output = new TestPoint(ok, message, extra)
// when we jump the queue, skip an extra line
if (front)
output.message = output.message.trimRight() + '\n\n'
if (front) {
this.emit('result', res)
this.parser.write(output.ok + (++this.n) + output.message)
} else
this.queue.push(['emit', 'result', res], output)
if (this.planEnd === this.count)
this.end(IMPLICIT)
this.process()
}
pragma (set) {
const p = Object.keys(set).reduce((acc, i) =>
acc + 'pragma ' + (set[i] ? '+' : '-') + i + '\n', '')
this.queue.push(p)
this.process()
}
plan (n, comment) {
if (this.bailedOut)
return
if (this.planEnd !== -1) {
throw new Error('Cannot set plan more than once')
}
if (typeof n !== 'number' || n < 0) {
throw new TypeError('plan must be a number')
}
// Cannot get any tests after a trailing plan, or a plan of 0
const ending = this.count !== 0 || n === 0
if (n === 0 && comment && !this.options.skip)
this.options.skip = comment
this.planEnd = n
comment = comment ? ' # ' + comment.trim() : ''
this.queue.push('1..' + n + comment + '\n')
if (ending)
this.end(IMPLICIT)
else
this.process()
}
end (implicit) {
this.debug('END implicit=%j', implicit === IMPLICIT)
if (this.ended && implicit === IMPLICIT)
return
// beyond here we have to be actually done with things, or else
// the semantic checks on counts and such will be off.
if (!queueEmpty(this) || this.occupied) {
if (!this.pushedEnd)
this.queue.push(['end', implicit])
this.pushedEnd = true
return this.process()
}
if (!this.ranAfterEach && this.parent) {
this.ranAfterEach = true
this.parent.runAfterEach(this, () => this[_end](implicit))
return
} else
this[_end](implicit)
}
[_end] (implicit) {
this.ended = true
if (implicit !== IMPLICIT && !this.multiEndThrew) {
if (this.explicitEnded) {
this.multiEndThrew = true
const er = new Error('test end() method called more than once')
Error.captureStackTrace(er, this[_currentAssert] ||
Test.prototype[_end])
er.test = this.name
this.threw(er)
return
}
this.explicitEnded = true
}
if (this.planEnd === -1) {
this.debug('END(%s) implicit plan', this.name, this.count)
this.plan(this.count)
}
this.queue.push(EOF)
this.process()
}
threw (er, extra, proxy) {
this.debug('THREW', er.message, extra, proxy)
// event emitters 'error' events need to re-throw so that they
// can jump out of the flow like a normal throw. They'll just
// end up back here once that happens, though, unless there's a
// try/catch somewhere in the call stack.
if (er.domainEmitter) {
delete er.domainEmitter
throw er
}
if (this.name && !proxy)
er.test = this.name
if (!proxy)
extra = extraFromError(er, extra, this.options)
Base.prototype.threw.call(this, er, extra, proxy)
if (!this.results) {
this.fail(extra.message || er.message, extra)
if (!proxy)
this.end(IMPLICIT)
}
this.process()
}
runBeforeEach (who, cb) {
if (this.parent)
this.parent.runBeforeEach(who, () => {
loop(who, this.onBeforeEach, cb, who.threw)
})
else
loop(who, this.onBeforeEach, cb, who.threw)
}
runAfterEach (who, cb) {
loop(who, this.onAfterEach, () => {
if (this.parent)
this.parent.runAfterEach(who, cb)
else
cb()
}, who.threw)
}
beforeEach (fn) {
this.onBeforeEach.push(fn)
}
afterEach (fn) {
this.onAfterEach.push(fn)
}
teardown (fn) {
this.on('teardown', fn)
}
shouldAutoend () {
const should = (
this.options.autoend &&
!this.ended &&
!this.occupied &&
queueEmpty(this) &&
!this.pool.length &&
!this.subtests.length &&
this.planEnd === -1
)
return should
}
autoend () {
this.options.autoend = true
this.maybeAutoend()
}
maybeAutoend () {
if (this.shouldAutoend()) {
clearTimeout(this.autoendTimer)
this.autoendTimer = setTimeout(() => {
if (this.shouldAutoend()) {
clearTimeout(this.autoendTimer)
this.autoendTimer = setTimeout(() => {
if (this.shouldAutoend())
this.end(IMPLICIT)
})
}
})
}
}
endAll (sub) {
// in the case of the root TAP test object, we might sometimes
// call endAll on a bailing-out test, as the process is ending
// In that case, we WILL have a this.occupied and a full queue
// These cases are very rare to encounter in other Test objs tho
this.processing = true
if (this.occupied) {
const p = this.occupied
if (p.endAll)
p.endAll(true)
else {
p.parser.abort('test unfinished')
}
} else if (sub) {
this.process()
if (queueEmpty(this)) {
const options = Object.assign({}, this.options)
this.options.at = null
this.options.stack = ''
options.test = this.name
this.fail('test unfinished', options)
}
}
if (this.promise && this.promise.tapAbortPromise)
this.promise.tapAbortPromise()
if (this.occupied) {
this.queue.unshift(this.occupied)
this.occupied = null
}
endAllQueue(this.queue)
this.processing = false
this.process()
this.parser.end()
}
get currentAssert () {
return this[_currentAssert]
}
set currentAssert (fn) {
if (!this[_currentAssert])
this[_currentAssert] = fn
}
pass (message, extra) {
this.currentAssert = Test.prototype.pass
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
this.printResult(true, message || '(unnamed test)', extra)
return true
}
fail (message, extra) {
this.currentAssert = Test.prototype.fail
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
this.printResult(false, message || '(unnamed test)', extra)
return !!(extra.todo || extra.skip)
}
ok (obj, message, extra) {
this.currentAssert = Test.prototype.ok
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'expect truthy value'
return obj ? this.pass(message, extra) : this.fail(message, extra)
}
notOk (obj, message, extra) {
this.currentAssert = Test.prototype.notOk
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'expect falsey value'
return this.ok(!obj, message, extra)
}
error (er, message, extra) {
this.currentAssert = Test.prototype.error
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
if (!er) {
return this.pass(message || 'should not error', extra)
}
if (!(er instanceof Error)) {
extra.found = er
return this.fail(message || 'non-Error error encountered', extra)
}
message = message || er.message
extra.found = er
return this.fail(message, extra)
}
equal (found, wanted, message, extra) {
this.currentAssert = Test.prototype.equal
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should be equal'
if (found === wanted) {
return this.pass(message, extra)
}
extra.found = found
extra.wanted = wanted
extra.compare = '==='
if (typeof found === 'object' &&
typeof wanted === 'object' &&
found &&
wanted &&
tsame(found, wanted)) {
extra.note = 'Objects never === one another'
}
return this.fail(message, extra)
}
not (found, wanted, message, extra) {
this.currentAssert = Test.prototype.not
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should not be equal'
if (found !== wanted) {
return this.pass(message, extra)
}
extra.found = found
extra.doNotWant = wanted
extra.compare = '!=='
return this.fail(message, extra)
}
same (found, wanted, message, extra) {
this.currentAssert = Test.prototype.same
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should be equivalent'
extra.found = found
extra.wanted = wanted
return this.ok(tsame(found, wanted), message, extra)
}
notSame (found, wanted, message, extra) {
this.currentAssert = Test.prototype.notSame
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should not be equivalent'
extra.found = found
extra.doNotWant = wanted
return this.notOk(tsame(found, wanted), message, extra)
}
strictSame (found, wanted, message, extra) {
this.currentAssert = Test.prototype.strictSame
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should be equivalent strictly'
extra.found = found
extra.wanted = wanted
return this.ok(tsame.strict(found, wanted), message, extra)
}
strictNotSame (found, wanted, message, extra) {
this.currentAssert = Test.prototype.strictNotSame
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should not be equivalent strictly'
extra.found = found
extra.doNotWant = wanted
return this.notOk(tsame.strict(found, wanted), message, extra)
}
get fullname () {
const main = process.argv[1] || ''
return (this.parent ? this.parent.fullname
: main.indexOf(cwd) === 0 ? main.substr(cwd.length + 1)
: path.basename(main)) +
' ' + (this.name || '').trim()
}
matchSnapshot (found, message, extra) {
this.currentAssert = Test.prototype.matchSnapshot
if (message && typeof message === 'object')
extra = message, message = 'must match snapshot'
if (!extra)
extra = {}
// use notOk because snap doesn't return a truthy value
const m = this.fullname + ' > ' + message
if (typeof found !== 'string')
found = util.inspect(found, {
showHidden: false,
depth: Infinity
})
return this.writeSnapshot
? this.notOk(this[_snapshot].snap(found, m),
message, extra)
: this.equal(found, this[_snapshot].read(m),
message, extra)
}
match (found, wanted, message, extra) {
this.currentAssert = Test.prototype.match
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should match pattern provided'
extra.found = found
extra.pattern = wanted
return this.ok(tmatch(found, wanted), message, extra)
}
notMatch (found, wanted, message, extra) {
this.currentAssert = Test.prototype.notMatch
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
message = message || 'should not match pattern provided'
extra.found = found
extra.pattern = wanted
return this.ok(!tmatch(found, wanted), message, extra)
}
type (obj, klass, message, extra) {
this.currentAssert = Test.prototype.type
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
const name = typeof klass === 'function' ?
klass.name || '(anonymous constructor)'
: klass
message = message || 'type is ' + name
// simplest case, it literally is the same thing
if (obj === klass) {
return this.pass(message, extra)
}
const tof = typeof obj
const type = (!obj && tof === 'object') ? 'null'
// treat as object, but not Object
// t.type(() => {}, Function)
: (tof === 'function' &&
typeof klass === 'function' &&
klass !== Object) ? 'object'
: tof
if (type === 'object' && klass !== 'object') {
if (typeof klass === 'function') {
extra.found = Object.getPrototypeOf(obj).constructor.name
extra.wanted = name
return this.ok(obj instanceof klass, message, extra)
}
// check prototype chain for name
// at this point, we already know klass is not a function
// if the klass specified is an obj in the proto chain, pass
// if the name specified is the name of a ctor in the chain, pass
for (let p = obj; p; p = Object.getPrototypeOf(p)) {
const ctor = p.constructor && p.constructor.name
if (p === klass || ctor === name) {
return this.pass(message, extra)
}
}
}
return this.equal(type, name, message, extra)
}
throws (_fn, _wanted, _message, _extra) {
this.currentAssert = Test.prototype.throws
let fn, wanted, message, extra
for (let i = 0; i < arguments.length; i++) {
const arg = arguments[i]
if (typeof arg === 'function') {
if (arg === Error || arg.prototype instanceof Error) {
wanted = arg
} else if (!fn) {
fn = arg
}
} else if (typeof arg === 'string' && arg) {
message = arg
} else if (typeof arg === 'object') {
if (!wanted) {
wanted = arg
} else {
extra = arg
}
}
}
if (!extra)
extra = {}
if (!message)
message = fn && fn.name || 'expected to throw'
if (wanted) {
if (wanted instanceof Error) {
const w = {
message: wanted.message
}
if (wanted.name) {
w.name = wanted.name
}
// intentionally copying non-local properties, since this
// is an Error object, and those are funky.
for (let i in wanted) {
w[i] = wanted[i]
}
wanted = w
message += ': ' + (wanted.name || 'Error') + ' ' + wanted.message
extra.wanted = wanted
}
}
if (typeof fn !== 'function') {
extra.todo = true
return this.pass(message, extra)
}
try {
fn()
return this.fail(message, extra)
} catch (er) {
// 'name' is a getter.
if (er.name) {
Object.defineProperty(er, 'name', {
value: er.name + '',
enumerable: true,
configurable: true,
writable: true
})
}
const actual = isRegExp(wanted) ? er.message : er
return wanted ? this.match(actual, wanted, message, extra)
: this.pass(message, extra)
}
}
doesNotThrow (fn, message, extra) {
this.currentAssert = Test.prototype.doesNotThrow
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
if (typeof fn === 'string') {
const x = fn
fn = message
message = x
}
if (!message) {
message = fn && fn.name || 'expected to not throw'
}
if (typeof fn !== 'function') {
extra.todo = true
return this.pass(message, extra)
}
try {
fn()
return this.pass(message, extra)
} catch (er) {
const e = extraFromError(er, extra)
e.message = er.message
return this.fail(message, e)
}
}
// like throws, but rejects a returned promise instead
// also, can pass in a promise instead of a function
rejects (_fn, _wanted, _message, _extra) {
this.currentAssert = Test.prototype.rejects
let fn, wanted, extra, promise, message
for (let i = 0; i < arguments.length; i++) {
const arg = arguments[i]
if (typeof arg === 'function') {
if (arg === Error || arg.prototype instanceof Error) {
wanted = arg
} else if (!fn) {
fn = arg
}
} else if (typeof arg === 'string' && arg) {
message = arg
} else if (arg && typeof arg.then === 'function' && !promise) {
promise = arg
} else if (typeof arg === 'object') {
if (!wanted) {
wanted = arg
} else {
extra = arg
}
}
}
if (!extra)
extra = {}
if (!message)
message = fn && fn.name || 'expect rejected Promise'
if (wanted) {
if (wanted instanceof Error) {
const w = {
message: wanted.message
}
if (wanted.name)
w.name = wanted.name
// intentionally copying non-local properties, since this
// is an Error object, and those are funky.
for (let i in wanted) {
w[i] = wanted[i]
}
wanted = w
message += ': ' + (wanted.name || 'Error') + ' ' + wanted.message
extra.wanted = wanted
}
}
if (!promise && typeof fn !== 'function') {
extra.todo = true
this.pass(message, extra)
return Promise.resolve(this)
}
if (!promise)
promise = fn()
const textra = {
buffered: true,
todo: extra.todo,
skip: extra.skip
}
if (!promise || typeof promise.then !== 'function')
return this.test(message, textra, t => {
t.fail(message, extra)
t.end()
})
// have to do as a subtest, because promises are async
extra.at = stack.at(this.currentAssert)
return this.test(message, textra, t => promise.then(value => {
extra.found = value
t.fail(message, extra)
}, er => {
// 'name' is a getter.
if (er.name) {
Object.defineProperty(er, 'name', {
value: er.name + '',
enumerable: true,
configurable: true,
writable: true
})
}
const actual = isRegExp(wanted) ? er.message : er
return wanted ? t.match(actual, wanted, message, extra)
: t.pass(message, extra)
}))
}
resolves (promise, message, extra) {
this.currentAssert = Test.prototype.resolves
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
if (!message)
message = 'expect resolving Promise'
if (typeof promise === 'function')
promise = promise()
// have to do as a subtest, because promises are async
extra.at = stack.at(this.currentAssert)
const textra = {
buffered: true,
todo: extra.todo,
skip: extra.skip
}
if (!promise || typeof promise.then !== 'function')
return this.test(message, textra, t => {
t.fail(message, extra)
t.end()
})
return this.test(message, textra, t =>
promise.then(value => {
extra.found = value
t.pass(message, extra)
}))
}
resolveMatch (promise, wanted, message, extra) {
this.currentAssert = Test.prototype.resolveMatch
if (message && typeof message === 'object')
extra = message, message = ''
if (!extra)
extra = {}
if (!message)
message = 'expect resolving Promise'
// have to do as a subtest, because promises are async
extra.at = stack.at(this.currentAssert)
const textra = {
buffered: true,
todo: extra.todo,
skip: extra.skip
}
if (!promise || typeof promise.then !== 'function')
return this.test(message, textra, t => {
t.fail(message, extra)
t.end()
})
return this.test(message, textra, t =>
promise.then(value => {
extra.found = value
t.match(value, wanted, extra)
}))
}
}
const endAllQueue = queue => {
queue.forEach((p, i) => {
if ((p instanceof Base) && !p.readyToProcess)
queue[i] = new TestPoint(false,
'child test left in queue:' +
' t.' + p.constructor.name.toLowerCase() + ' ' + p.name,
p.options)
})
queue.push(['end', IMPLICIT])
}
const queueEmpty = t =>
t.queue.length === 0 ||
t.queue.length === 1 && t.queue[0] === 'TAP version 13\n'
Test.prototype.done = Test.prototype.end
Test.prototype.tearDown = Test.prototype.teardown
Object.keys(synonyms)
.filter(c => Test.prototype[c])
.forEach(c => synonyms[c].forEach(s =>
Object.defineProperty(Test.prototype, s, {
value: Test.prototype[c],
enumerable: false,
configurable: true,
writable: true
})))
module.exports = Test
node-tap-11.0.0/package-lock.json 0000664 0000000 0000000 00000361231 13206406237 0016525 0 ustar 00root root 0000000 0000000 {
"name": "tap",
"version": "11.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"acorn": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-3.3.0.tgz",
"integrity": "sha1-ReN/s56No/JbruP/U2niu18iAXo=",
"dev": true
},
"acorn-jsx": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-3.0.1.tgz",
"integrity": "sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s=",
"dev": true,
"requires": {
"acorn": "3.3.0"
}
},
"ajv": {
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
"dev": true,
"requires": {
"co": "4.6.0",
"json-stable-stringify": "1.0.1"
}
},
"ajv-keywords": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-1.5.1.tgz",
"integrity": "sha1-MU3QpLM2j609/NxU7eYXG4htrzw=",
"dev": true
},
"ansi-escapes": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz",
"integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=",
"dev": true
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"argparse": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz",
"integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=",
"requires": {
"sprintf-js": "1.0.3"
}
},
"array-union": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
"integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
"dev": true,
"requires": {
"array-uniq": "1.0.3"
}
},
"array-uniq": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
"dev": true
},
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
"dev": true
},
"asn1": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz",
"integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y="
},
"assert-plus": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
"integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"aws-sign2": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
"integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
},
"aws4": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz",
"integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"bcrypt-pbkdf": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz",
"integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=",
"optional": true,
"requires": {
"tweetnacl": "0.14.5"
}
},
"bind-obj-methods": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-1.0.0.tgz",
"integrity": "sha1-T1l5ysFXk633DkiBYeRj4gnKUJw="
},
"bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
},
"boom": {
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
"requires": {
"hoek": "2.16.3"
}
},
"brace-expansion": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
"integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"caller-path": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz",
"integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=",
"dev": true,
"requires": {
"callsites": "0.2.0"
}
},
"callsites": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz",
"integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=",
"dev": true
},
"caseless": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.11.0.tgz",
"integrity": "sha1-cVuW6phBWTzDMGeSP17GDr2k99c="
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "2.2.1",
"escape-string-regexp": "1.0.5",
"has-ansi": "2.0.0",
"strip-ansi": "3.0.1",
"supports-color": "2.0.0"
}
},
"circular-json": {
"version": "0.3.3",
"resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz",
"integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==",
"dev": true
},
"clean-yaml-object": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz",
"integrity": "sha1-Y/sRDcLOGoTcIfbZM0h20BCui2g="
},
"cli-cursor": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz",
"integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=",
"dev": true,
"requires": {
"restore-cursor": "1.0.1"
}
},
"cli-width": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.1.0.tgz",
"integrity": "sha1-sjTKIJsp72b8UY2bmNWEewDt8Ao=",
"dev": true
},
"clone": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz",
"integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=",
"dev": true
},
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
"dev": true
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
},
"color-support": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg=="
},
"combined-stream": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz",
"integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=",
"requires": {
"delayed-stream": "1.0.0"
}
},
"commander": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz",
"integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ=="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"concat-stream": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz",
"integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=",
"dev": true,
"requires": {
"inherits": "2.0.3",
"readable-stream": "2.3.3",
"typedarray": "0.0.6"
}
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
},
"coveralls": {
"version": "2.13.3",
"resolved": "https://registry.npmjs.org/coveralls/-/coveralls-2.13.3.tgz",
"integrity": "sha512-iiAmn+l1XqRwNLXhW8Rs5qHZRFMYp9ZIPjEOVRpC/c4so6Y/f4/lFi0FfR5B9cCqgyhkJ5cZmbvcVRfP8MHchw==",
"requires": {
"js-yaml": "3.6.1",
"lcov-parse": "0.0.10",
"log-driver": "1.2.5",
"minimist": "1.2.0",
"request": "2.79.0"
},
"dependencies": {
"js-yaml": {
"version": "3.6.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.6.1.tgz",
"integrity": "sha1-bl/mfYsgXOTSL60Ft3geja3MSzA=",
"requires": {
"argparse": "1.0.9",
"esprima": "2.7.3"
}
}
}
},
"cross-spawn": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
"integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
"requires": {
"lru-cache": "4.1.1",
"which": "1.3.0"
}
},
"cryptiles": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
"requires": {
"boom": "2.10.1"
}
},
"d": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
"integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
"dev": true,
"requires": {
"es5-ext": "0.10.24"
}
},
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
"debug": {
"version": "2.6.8",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz",
"integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=",
"requires": {
"ms": "2.0.0"
}
},
"debug-log": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz",
"integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8=",
"dev": true
},
"deep-is": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
"dev": true
},
"defaults": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
"integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
"dev": true,
"requires": {
"clone": "1.0.2"
}
},
"deglob": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/deglob/-/deglob-1.1.2.tgz",
"integrity": "sha1-dtV3wl/j9zKUEqK1nq3qV6xQDj8=",
"dev": true,
"requires": {
"find-root": "1.1.0",
"glob": "7.1.2",
"ignore": "3.3.3",
"pkg-config": "1.1.1",
"run-parallel": "1.1.6",
"uniq": "1.0.1",
"xtend": "4.0.1"
}
},
"del": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz",
"integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=",
"dev": true,
"requires": {
"globby": "5.0.0",
"is-path-cwd": "1.0.0",
"is-path-in-cwd": "1.0.0",
"object-assign": "4.1.1",
"pify": "2.3.0",
"pinkie-promise": "2.0.1",
"rimraf": "2.6.2"
}
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"diff": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/diff/-/diff-1.4.0.tgz",
"integrity": "sha1-fyjS657nsVqX79ic5j3P2qPMur8="
},
"doctrine": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
"integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
"dev": true,
"requires": {
"esutils": "2.0.2",
"isarray": "1.0.0"
}
},
"ecc-jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz",
"integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=",
"optional": true,
"requires": {
"jsbn": "0.1.1"
}
},
"es5-ext": {
"version": "0.10.24",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.24.tgz",
"integrity": "sha1-pVh3yZJLwMjZvTwsvhdJWsFwmxQ=",
"dev": true,
"requires": {
"es6-iterator": "2.0.1",
"es6-symbol": "3.1.1"
}
},
"es6-iterator": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.1.tgz",
"integrity": "sha1-jjGcnwRTv1ddN0lAplWSDlnKVRI=",
"dev": true,
"requires": {
"d": "1.0.0",
"es5-ext": "0.10.24",
"es6-symbol": "3.1.1"
}
},
"es6-map": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz",
"integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=",
"dev": true,
"requires": {
"d": "1.0.0",
"es5-ext": "0.10.24",
"es6-iterator": "2.0.1",
"es6-set": "0.1.5",
"es6-symbol": "3.1.1",
"event-emitter": "0.3.5"
}
},
"es6-set": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz",
"integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=",
"dev": true,
"requires": {
"d": "1.0.0",
"es5-ext": "0.10.24",
"es6-iterator": "2.0.1",
"es6-symbol": "3.1.1",
"event-emitter": "0.3.5"
}
},
"es6-symbol": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz",
"integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=",
"dev": true,
"requires": {
"d": "1.0.0",
"es5-ext": "0.10.24"
}
},
"es6-weak-map": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz",
"integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=",
"dev": true,
"requires": {
"d": "1.0.0",
"es5-ext": "0.10.24",
"es6-iterator": "2.0.1",
"es6-symbol": "3.1.1"
}
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"escope": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz",
"integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=",
"dev": true,
"requires": {
"es6-map": "0.1.5",
"es6-weak-map": "2.0.2",
"esrecurse": "4.2.0",
"estraverse": "4.2.0"
}
},
"eslint": {
"version": "2.10.2",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-2.10.2.tgz",
"integrity": "sha1-sjCUgv7wQ9MgM2WjIShebM4Bw9c=",
"dev": true,
"requires": {
"chalk": "1.1.3",
"concat-stream": "1.6.0",
"debug": "2.6.8",
"doctrine": "1.5.0",
"es6-map": "0.1.5",
"escope": "3.6.0",
"espree": "3.1.4",
"estraverse": "4.2.0",
"esutils": "2.0.2",
"file-entry-cache": "1.3.1",
"glob": "7.1.2",
"globals": "9.18.0",
"ignore": "3.3.3",
"imurmurhash": "0.1.4",
"inquirer": "0.12.0",
"is-my-json-valid": "2.16.0",
"is-resolvable": "1.0.0",
"js-yaml": "3.10.0",
"json-stable-stringify": "1.0.1",
"lodash": "4.17.4",
"mkdirp": "0.5.1",
"optionator": "0.8.2",
"path-is-absolute": "1.0.1",
"path-is-inside": "1.0.2",
"pluralize": "1.2.1",
"progress": "1.1.8",
"require-uncached": "1.0.3",
"shelljs": "0.6.1",
"strip-json-comments": "1.0.4",
"table": "3.8.3",
"text-table": "0.2.0",
"user-home": "2.0.0"
}
},
"eslint-config-standard": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-5.3.1.tgz",
"integrity": "sha1-WRyWkVF0QTL1YdO5FagS6kE/5JA=",
"dev": true
},
"eslint-config-standard-jsx": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-1.2.1.tgz",
"integrity": "sha1-DRmxcF8K1INj7yqLv6cd8BLZibM=",
"dev": true
},
"eslint-plugin-promise": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-1.3.2.tgz",
"integrity": "sha1-/OMy1vX/UjIApTdwSGPsPCQiunw=",
"dev": true
},
"eslint-plugin-react": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-5.2.2.tgz",
"integrity": "sha1-fbBo4fVIf2hx5N7vNqOBwwPqwWE=",
"dev": true,
"requires": {
"doctrine": "1.5.0",
"jsx-ast-utils": "1.4.1"
}
},
"eslint-plugin-standard": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-1.3.3.tgz",
"integrity": "sha1-owhUUVI0MedvQJxwy4+U4yvw7H8=",
"dev": true
},
"espree": {
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/espree/-/espree-3.1.4.tgz",
"integrity": "sha1-BybXrIOvl6fISY2ps2OjYJ0qaKE=",
"dev": true,
"requires": {
"acorn": "3.3.0",
"acorn-jsx": "3.0.1"
}
},
"esprima": {
"version": "2.7.3",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
"integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE="
},
"esrecurse": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz",
"integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=",
"dev": true,
"requires": {
"estraverse": "4.2.0",
"object-assign": "4.1.1"
}
},
"estraverse": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
"dev": true
},
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
"dev": true
},
"event-emitter": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz",
"integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=",
"dev": true,
"requires": {
"d": "1.0.0",
"es5-ext": "0.10.24"
}
},
"events-to-array": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz",
"integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y="
},
"exit-hook": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz",
"integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=",
"dev": true
},
"extend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz",
"integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ="
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-levenshtein": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
"dev": true
},
"figures": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz",
"integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=",
"dev": true,
"requires": {
"escape-string-regexp": "1.0.5",
"object-assign": "4.1.1"
}
},
"file-entry-cache": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-1.3.1.tgz",
"integrity": "sha1-RMYepgeuS+nBQC9B9EJwy/4zT/g=",
"dev": true,
"requires": {
"flat-cache": "1.2.2",
"object-assign": "4.1.1"
}
},
"find-root": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
"integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==",
"dev": true
},
"flat-cache": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz",
"integrity": "sha1-+oZxTnLCHbiGAXYezy9VXRq8a5Y=",
"dev": true,
"requires": {
"circular-json": "0.3.3",
"del": "2.2.2",
"graceful-fs": "4.1.11",
"write": "0.2.1"
}
},
"foreground-child": {
"version": "1.5.6",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz",
"integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=",
"requires": {
"cross-spawn": "4.0.2",
"signal-exit": "3.0.2"
}
},
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
},
"form-data": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.5",
"mime-types": "2.1.17"
}
},
"fs-exists-cached": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz",
"integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84="
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"function-loop": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz",
"integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw="
},
"generate-function": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz",
"integrity": "sha1-aFj+fAlpt9TpCTM3ZHrHn2DfvnQ="
},
"generate-object-property": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/generate-object-property/-/generate-object-property-1.2.0.tgz",
"integrity": "sha1-nA4cQDCM6AT0eDYYuTf6iPmdUNA=",
"requires": {
"is-property": "1.0.2"
}
},
"get-stdin": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz",
"integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=",
"dev": true
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
"requires": {
"assert-plus": "1.0.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
"glob": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"globals": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
"dev": true
},
"globby": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz",
"integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=",
"dev": true,
"requires": {
"array-union": "1.0.2",
"arrify": "1.0.1",
"glob": "7.1.2",
"object-assign": "4.1.1",
"pify": "2.3.0",
"pinkie-promise": "2.0.1"
}
},
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"har-validator": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz",
"integrity": "sha1-zcvAgYgmWtEZtqWnyKtw7s+10n0=",
"requires": {
"chalk": "1.1.3",
"commander": "2.11.0",
"is-my-json-valid": "2.16.0",
"pinkie-promise": "2.0.1"
}
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": {
"ansi-regex": "2.1.1"
}
},
"hawk": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
"requires": {
"boom": "2.10.1",
"cryptiles": "2.0.5",
"hoek": "2.16.3",
"sntp": "1.0.9"
}
},
"hoek": {
"version": "2.16.3",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
"integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
},
"http-signature": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
"requires": {
"assert-plus": "0.2.0",
"jsprim": "1.4.1",
"sshpk": "1.13.1"
}
},
"ignore": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.3.tgz",
"integrity": "sha1-QyNS5XrM2HqzEQ6C0/6g5HgSFW0=",
"dev": true
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"inquirer": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz",
"integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=",
"dev": true,
"requires": {
"ansi-escapes": "1.4.0",
"ansi-regex": "2.1.1",
"chalk": "1.1.3",
"cli-cursor": "1.0.2",
"cli-width": "2.1.0",
"figures": "1.7.0",
"lodash": "4.17.4",
"readline2": "1.0.1",
"run-async": "0.1.0",
"rx-lite": "3.1.2",
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"through": "2.3.8"
}
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"dev": true,
"requires": {
"number-is-nan": "1.0.1"
}
},
"is-my-json-valid": {
"version": "2.16.0",
"resolved": "https://registry.npmjs.org/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz",
"integrity": "sha1-8Hndm/2uZe4gOKrorLyGqxCeNpM=",
"requires": {
"generate-function": "2.0.0",
"generate-object-property": "1.2.0",
"jsonpointer": "4.0.1",
"xtend": "4.0.1"
}
},
"is-path-cwd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz",
"integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=",
"dev": true
},
"is-path-in-cwd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz",
"integrity": "sha1-ZHdYK4IU1gI0YJRWcAO+ip6sBNw=",
"dev": true,
"requires": {
"is-path-inside": "1.0.0"
}
},
"is-path-inside": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.0.tgz",
"integrity": "sha1-/AbloWg/vaE95mev9xe7wQpI838=",
"dev": true,
"requires": {
"path-is-inside": "1.0.2"
}
},
"is-property": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
"integrity": "sha1-V/4cTkhHTt1lsJkR8msc1Ald2oQ="
},
"is-resolvable": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.0.0.tgz",
"integrity": "sha1-jfV8YeouPFAUCNEA+wE8+NbgzGI=",
"dev": true,
"requires": {
"tryit": "1.0.3"
}
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
},
"js-yaml": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.10.0.tgz",
"integrity": "sha512-O2v52ffjLa9VeM43J4XocZE//WT9N0IiwDa3KSHH7Tu8CtH+1qM8SIZvnsTh6v+4yFy5KUY3BHUVwjpfAWsjIA==",
"requires": {
"argparse": "1.0.9",
"esprima": "4.0.0"
},
"dependencies": {
"esprima": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz",
"integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw=="
}
}
},
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"optional": true
},
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
},
"json-stable-stringify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
"dev": true,
"requires": {
"jsonify": "0.0.0"
}
},
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
},
"jsonify": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
"integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
"dev": true
},
"jsonpointer": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz",
"integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk="
},
"jsprim": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
"json-schema": "0.2.3",
"verror": "1.10.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
"jsx-ast-utils": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz",
"integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=",
"dev": true
},
"lcov-parse": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-0.0.10.tgz",
"integrity": "sha1-GwuP+ayceIklBYK3C3ExXZ2m2aM="
},
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
"dev": true,
"requires": {
"prelude-ls": "1.1.2",
"type-check": "0.3.2"
}
},
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
"dev": true
},
"log-driver": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.5.tgz",
"integrity": "sha1-euTsJXMC/XkNVXyxDJcQDYV7AFY="
},
"lru-cache": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
"integrity": "sha512-q4spe4KTfsAS1SUHLO0wz8Qiyf1+vMIAgpRYioFYDMNqKfHQbg+AVDH3i4fvpl71/P1L0dBl+fQi+P37UYf0ew==",
"requires": {
"pseudomap": "1.0.2",
"yallist": "2.1.2"
}
},
"mime-db": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz",
"integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE="
},
"mime-types": {
"version": "2.1.17",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz",
"integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=",
"requires": {
"mime-db": "1.30.0"
}
},
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"requires": {
"brace-expansion": "1.1.8"
}
},
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"minipass": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.1.tgz",
"integrity": "sha512-u1aUllxPJUI07cOqzR7reGmQxmCqlH88uIIsf6XZFEWgw7gXKpJdR+5R9Y3KEDmWYkdIz9wXZs3C0jOPxejk/Q==",
"requires": {
"yallist": "3.0.2"
},
"dependencies": {
"yallist": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz",
"integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k="
}
}
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"multiline": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/multiline/-/multiline-1.0.2.tgz",
"integrity": "sha1-abHyX/B00oKJBPJE3dBrfZbvbJM=",
"dev": true,
"requires": {
"strip-indent": "1.0.1"
}
},
"mute-stream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.5.tgz",
"integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=",
"dev": true
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
"dev": true
},
"nyc": {
"version": "11.3.0",
"resolved": "https://registry.npmjs.org/nyc/-/nyc-11.3.0.tgz",
"integrity": "sha512-oUu0WHt1k/JMIODvAYXX6C50Mupw2GO34P/Jdg2ty9xrLufBthHiKR2gf08aF+9S0abW1fl24R7iKRBXzibZmg==",
"requires": {
"archy": "1.0.0",
"arrify": "1.0.1",
"caching-transform": "1.0.1",
"convert-source-map": "1.5.0",
"debug-log": "1.0.1",
"default-require-extensions": "1.0.0",
"find-cache-dir": "0.1.1",
"find-up": "2.1.0",
"foreground-child": "1.5.6",
"glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"istanbul-lib-coverage": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz",
"istanbul-lib-hook": "1.1.0",
"istanbul-lib-instrument": "1.9.1",
"istanbul-lib-report": "1.1.2",
"istanbul-lib-source-maps": "1.2.2",
"istanbul-reports": "1.1.3",
"md5-hex": "1.3.0",
"merge-source-map": "1.0.4",
"micromatch": "2.3.11",
"mkdirp": "0.5.1",
"resolve-from": "2.0.0",
"rimraf": "2.6.2",
"signal-exit": "3.0.2",
"spawn-wrap": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.3.8.tgz",
"test-exclude": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz",
"yargs": "10.0.3",
"yargs-parser": "8.0.0"
},
"dependencies": {
"align-text": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
"requires": {
"kind-of": "3.2.2",
"longest": "1.0.1",
"repeat-string": "1.6.1"
}
},
"amdefine": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU="
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"append-transform": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/append-transform/-/append-transform-0.4.0.tgz",
"integrity": "sha1-126/jKlNJ24keja61EpLdKthGZE=",
"requires": {
"default-require-extensions": "1.0.0"
}
},
"archy": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA="
},
"arr-diff": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz",
"integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=",
"requires": {
"arr-flatten": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz"
}
},
"arr-flatten": {
"version": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
"integrity": "sha1-NgSLv/TntH4TZkQxbJlmnqWukfE="
},
"array-unique": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz",
"integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM="
},
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
},
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"babel-code-frame": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
"requires": {
"chalk": "1.1.3",
"esutils": "2.0.2",
"js-tokens": "3.0.2"
}
},
"babel-generator": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz",
"integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=",
"requires": {
"babel-messages": "6.23.0",
"babel-runtime": "6.26.0",
"babel-types": "6.26.0",
"detect-indent": "4.0.0",
"jsesc": "1.3.0",
"lodash": "4.17.4",
"source-map": "0.5.7",
"trim-right": "1.0.1"
}
},
"babel-messages": {
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
"requires": {
"babel-runtime": "6.26.0"
}
},
"babel-runtime": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
"requires": {
"core-js": "2.5.1",
"regenerator-runtime": "0.11.0"
}
},
"babel-template": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
"requires": {
"babel-runtime": "6.26.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lodash": "4.17.4"
}
},
"babel-traverse": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
"requires": {
"babel-code-frame": "6.26.0",
"babel-messages": "6.23.0",
"babel-runtime": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"debug": "2.6.9",
"globals": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"invariant": "2.2.2",
"lodash": "4.17.4"
}
},
"babel-types": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
"requires": {
"babel-runtime": "6.26.0",
"esutils": "2.0.2",
"lodash": "4.17.4",
"to-fast-properties": "1.0.3"
}
},
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
"integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"brace-expansion": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz",
"integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=",
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
"braces": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz",
"integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=",
"requires": {
"expand-range": "1.8.2",
"preserve": "0.2.0",
"repeat-element": "1.1.2"
}
},
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8="
},
"caching-transform": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-1.0.1.tgz",
"integrity": "sha1-bb2y8g+Nj7znnz6U6dF0Lc31wKE=",
"requires": {
"md5-hex": "1.3.0",
"mkdirp": "0.5.1",
"write-file-atomic": "1.3.4"
}
},
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
"integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
"optional": true
},
"center-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
"integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
"optional": true,
"requires": {
"align-text": "0.1.4",
"lazy-cache": "1.0.4"
}
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "2.2.1",
"escape-string-regexp": "1.0.5",
"has-ansi": "2.0.0",
"strip-ansi": "3.0.1",
"supports-color": "2.0.0"
}
},
"cliui": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
"optional": true,
"requires": {
"center-align": "0.1.3",
"right-align": "0.1.3",
"wordwrap": "0.0.2"
},
"dependencies": {
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
"integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
"optional": true
}
}
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"commondir": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
"integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"convert-source-map": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz",
"integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU="
},
"core-js": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz",
"integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs="
},
"cross-spawn": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz",
"integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=",
"requires": {
"lru-cache": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
"which": "1.3.0"
}
},
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
"requires": {
"ms": "2.0.0"
}
},
"debug-log": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz",
"integrity": "sha1-IwdjLUwEOCuN+KMvcLiVBG1SdF8="
},
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
"default-require-extensions": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-1.0.0.tgz",
"integrity": "sha1-836hXT4T/9m0N9M+GnW1+5eHTLg=",
"requires": {
"strip-bom": "2.0.0"
}
},
"detect-indent": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
"requires": {
"repeating": "2.0.1"
}
},
"error-ex": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz",
"integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=",
"requires": {
"is-arrayish": "0.2.1"
}
},
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs="
},
"execa": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz",
"integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=",
"requires": {
"cross-spawn": "5.1.0",
"get-stream": "3.0.0",
"is-stream": "1.1.0",
"npm-run-path": "2.0.2",
"p-finally": "1.0.0",
"signal-exit": "3.0.2",
"strip-eof": "1.0.0"
},
"dependencies": {
"cross-spawn": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz",
"integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=",
"requires": {
"lru-cache": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
"shebang-command": "1.2.0",
"which": "1.3.0"
}
}
}
},
"expand-brackets": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz",
"integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=",
"requires": {
"is-posix-bracket": "0.1.1"
}
},
"expand-range": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"requires": {
"fill-range": "2.2.3"
}
},
"extglob": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz",
"integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=",
"requires": {
"is-extglob": "1.0.0"
}
},
"filename-regex": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz",
"integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY="
},
"fill-range": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz",
"integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=",
"requires": {
"is-number": "2.1.0",
"isobject": "2.1.0",
"randomatic": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
"repeat-element": "1.1.2",
"repeat-string": "1.6.1"
}
},
"find-cache-dir": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-0.1.1.tgz",
"integrity": "sha1-yN765XyKUqinhPnjHFfHQumToLk=",
"requires": {
"commondir": "1.0.1",
"mkdirp": "0.5.1",
"pkg-dir": "1.0.0"
}
},
"find-up": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"requires": {
"locate-path": "2.0.0"
}
},
"for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
},
"for-own": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz",
"integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=",
"requires": {
"for-in": "1.0.2"
}
},
"foreground-child": {
"version": "1.5.6",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz",
"integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=",
"requires": {
"cross-spawn": "4.0.2",
"signal-exit": "3.0.2"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"get-caller-file": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.2.tgz",
"integrity": "sha1-9wLmMSfn4jHBYKgMFVSstw1QR+U="
},
"get-stream": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ="
},
"glob": {
"version": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
"integrity": "sha1-wZyd+aAocC1nhhI4SmVSQExjbRU=",
"requires": {
"fs.realpath": "1.0.0",
"inflight": "1.0.6",
"inherits": "2.0.3",
"minimatch": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
},
"glob-base": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz",
"integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=",
"requires": {
"glob-parent": "2.0.0",
"is-glob": "2.0.1"
}
},
"glob-parent": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"requires": {
"is-glob": "2.0.1"
}
},
"globals": {
"version": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
"integrity": "sha1-qjiWs+abSH8X4x7SFD1pqOMMLYo="
},
"graceful-fs": {
"version": "4.1.11",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
"integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
},
"handlebars": {
"version": "4.0.11",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz",
"integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=",
"requires": {
"async": "1.5.2",
"optimist": "0.6.1",
"source-map": "0.4.4",
"uglify-js": "2.8.29"
},
"dependencies": {
"source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"requires": {
"amdefine": "1.0.1"
}
}
}
},
"has-ansi": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"requires": {
"ansi-regex": "2.1.1"
}
},
"has-flag": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
"integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo="
},
"hosted-git-info": {
"version": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
"integrity": "sha1-bWDjSzq7yDEwYsO3mO+NkBoHrzw="
},
"imurmurhash": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o="
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
}
},
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"invariant": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
"integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
"requires": {
"loose-envify": "1.3.1"
}
},
"invert-kv": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY="
},
"is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
},
"is-buffer": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz",
"integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw="
},
"is-builtin-module": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
"integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=",
"requires": {
"builtin-modules": "1.1.1"
}
},
"is-dotfile": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz",
"integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE="
},
"is-equal-shallow": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz",
"integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=",
"requires": {
"is-primitive": "2.0.0"
}
},
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
},
"is-extglob": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz",
"integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA="
},
"is-finite": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz",
"integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=",
"requires": {
"number-is-nan": "1.0.1"
}
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "1.0.1"
}
},
"is-glob": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz",
"integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=",
"requires": {
"is-extglob": "1.0.0"
}
},
"is-number": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz",
"integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=",
"requires": {
"kind-of": "3.2.2"
}
},
"is-posix-bracket": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz",
"integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q="
},
"is-primitive": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz",
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
},
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
},
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
},
"isobject": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
"requires": {
"isarray": "1.0.0"
}
},
"istanbul-lib-coverage": {
"version": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz",
"integrity": "sha1-c7+5mIhSmUFck9OKPprfeEp3qdo="
},
"istanbul-lib-hook": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz",
"integrity": "sha512-U3qEgwVDUerZ0bt8cfl3dSP3S6opBoOtk3ROO5f2EfBr/SRiD9FQqzwaZBqFORu8W7O0EXpai+k7kxHK13beRg==",
"requires": {
"append-transform": "0.4.0"
}
},
"istanbul-lib-instrument": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz",
"integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==",
"requires": {
"babel-generator": "6.26.0",
"babel-template": "6.26.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"istanbul-lib-coverage": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz",
"semver": "5.4.1"
}
},
"istanbul-lib-report": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz",
"integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==",
"requires": {
"istanbul-lib-coverage": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz",
"mkdirp": "0.5.1",
"path-parse": "1.0.5",
"supports-color": "3.2.3"
},
"dependencies": {
"supports-color": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
"integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
"requires": {
"has-flag": "1.0.0"
}
}
}
},
"istanbul-lib-source-maps": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz",
"integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==",
"requires": {
"debug": "3.1.0",
"istanbul-lib-coverage": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz",
"mkdirp": "0.5.1",
"rimraf": "2.6.2",
"source-map": "0.5.7"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
}
}
},
"istanbul-reports": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.3.tgz",
"integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==",
"requires": {
"handlebars": "4.0.11"
}
},
"js-tokens": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls="
},
"jsesc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
"integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
},
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "1.1.5"
}
},
"lazy-cache": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
"integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
"optional": true
},
"lcid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
"requires": {
"invert-kv": "1.0.0"
}
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
"requires": {
"graceful-fs": "4.1.11",
"parse-json": "2.2.0",
"pify": "2.3.0",
"pinkie-promise": "2.0.1",
"strip-bom": "2.0.0"
}
},
"locate-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
"requires": {
"p-locate": "2.0.0",
"path-exists": "3.0.0"
},
"dependencies": {
"path-exists": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
}
}
},
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
},
"longest": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
},
"loose-envify": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
"integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
"requires": {
"js-tokens": "3.0.2"
}
},
"lru-cache": {
"version": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.1.tgz",
"integrity": "sha1-Yi4y6CSItJJ5EUpPns9F581rulU=",
"requires": {
"pseudomap": "1.0.2",
"yallist": "2.1.2"
}
},
"md5-hex": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-1.3.0.tgz",
"integrity": "sha1-0sSv6YPENwZiF5uMrRRSGRNQRsQ=",
"requires": {
"md5-o-matic": "0.1.1"
}
},
"md5-o-matic": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/md5-o-matic/-/md5-o-matic-0.1.1.tgz",
"integrity": "sha1-givM1l4RfFFPqxdrJZRdVBAKA8M="
},
"mem": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
"integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=",
"requires": {
"mimic-fn": "1.1.0"
}
},
"merge-source-map": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.0.4.tgz",
"integrity": "sha1-pd5GU42uhNQRTMXqArR3KmNGcB8=",
"requires": {
"source-map": "0.5.7"
}
},
"micromatch": {
"version": "2.3.11",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz",
"integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=",
"requires": {
"arr-diff": "2.0.0",
"array-unique": "0.2.1",
"braces": "1.8.5",
"expand-brackets": "0.1.5",
"extglob": "0.3.2",
"filename-regex": "2.0.1",
"is-extglob": "1.0.0",
"is-glob": "2.0.1",
"kind-of": "3.2.2",
"normalize-path": "2.1.1",
"object.omit": "2.0.1",
"parse-glob": "3.0.4",
"regex-cache": "0.4.4"
}
},
"mimic-fn": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz",
"integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg="
},
"minimatch": {
"version": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"requires": {
"brace-expansion": "1.1.8"
}
},
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
}
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
"normalize-package-data": {
"version": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
"integrity": "sha1-EvlaMH1YNSB1oEkHuErIvpisAS8=",
"requires": {
"hosted-git-info": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz",
"is-builtin-module": "1.0.0",
"semver": "5.4.1",
"validate-npm-package-license": "3.0.1"
}
},
"normalize-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
"requires": {
"remove-trailing-separator": "1.1.0"
}
},
"npm-run-path": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
"requires": {
"path-key": "2.0.1"
}
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object.omit": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz",
"integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=",
"requires": {
"for-own": "0.1.5",
"is-extendable": "0.1.1"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1.0.2"
}
},
"optimist": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
"requires": {
"minimist": "0.0.8",
"wordwrap": "0.0.3"
}
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-locale": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz",
"integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==",
"requires": {
"execa": "0.7.0",
"lcid": "1.0.0",
"mem": "1.1.0"
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4="
},
"p-limit": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.1.0.tgz",
"integrity": "sha1-sH/y2aXYi+yAYDWJWiurZqJ5iLw="
},
"p-locate": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
"requires": {
"p-limit": "1.1.0"
}
},
"parse-glob": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz",
"integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=",
"requires": {
"glob-base": "0.3.0",
"is-dotfile": "1.0.3",
"is-extglob": "1.0.0",
"is-glob": "2.0.1"
}
},
"parse-json": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
"requires": {
"error-ex": "1.3.1"
}
},
"path-exists": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
"requires": {
"pinkie-promise": "2.0.1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
},
"path-parse": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz",
"integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME="
},
"path-type": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
"requires": {
"graceful-fs": "4.1.11",
"pify": "2.3.0",
"pinkie-promise": "2.0.1"
}
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
},
"pinkie": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
},
"pinkie-promise": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"requires": {
"pinkie": "2.0.4"
}
},
"pkg-dir": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz",
"integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=",
"requires": {
"find-up": "1.1.2"
},
"dependencies": {
"find-up": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"requires": {
"path-exists": "2.1.0",
"pinkie-promise": "2.0.1"
}
}
}
},
"preserve": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz",
"integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks="
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"randomatic": {
"version": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz",
"integrity": "sha1-x6vpzIuHwLqodrGf3oP9RkeX44w=",
"requires": {
"is-number": "3.0.0",
"kind-of": "4.0.0"
},
"dependencies": {
"is-number": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
"requires": {
"kind-of": "3.2.2"
},
"dependencies": {
"kind-of": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
"requires": {
"is-buffer": "1.1.5"
}
}
}
},
"kind-of": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
"integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
"requires": {
"is-buffer": "1.1.5"
}
}
}
},
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
"requires": {
"load-json-file": "1.1.0",
"normalize-package-data": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz",
"path-type": "1.1.0"
}
},
"read-pkg-up": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
"requires": {
"find-up": "1.1.2",
"read-pkg": "1.1.0"
},
"dependencies": {
"find-up": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
"requires": {
"path-exists": "2.1.0",
"pinkie-promise": "2.0.1"
}
}
}
},
"regenerator-runtime": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz",
"integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A=="
},
"regex-cache": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.4.tgz",
"integrity": "sha512-nVIZwtCjkC9YgvWkpM55B5rBhBYRZhAaJbgcFYXXsHnbZ9UZI9nnVWYZpBlCqv9ho2eZryPnWrZGsOdPwVWXWQ==",
"requires": {
"is-equal-shallow": "0.1.3"
}
},
"remove-trailing-separator": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
},
"repeat-element": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz",
"integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo="
},
"repeat-string": {
"version": "1.6.1",
"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc="
},
"repeating": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
"integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
"requires": {
"is-finite": "1.0.2"
}
},
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
},
"require-main-filename": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
},
"resolve-from": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz",
"integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c="
},
"right-align": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
"integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
"optional": true,
"requires": {
"align-text": "0.1.4"
}
},
"rimraf": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
"requires": {
"glob": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz"
}
},
"semver": {
"version": "5.4.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz",
"integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg=="
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"requires": {
"shebang-regex": "1.0.0"
}
},
"shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM="
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"slide": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz",
"integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc="
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
},
"spawn-wrap": {
"version": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.3.8.tgz",
"integrity": "sha1-+ip5uZDLsLsAGNymdI2INnsZ7DE=",
"requires": {
"foreground-child": "1.5.6",
"mkdirp": "0.5.1",
"os-homedir": "1.0.2",
"rimraf": "2.6.2",
"signal-exit": "3.0.2",
"which": "1.3.0"
}
},
"spdx-correct": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz",
"integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=",
"requires": {
"spdx-license-ids": "1.2.2"
}
},
"spdx-expression-parse": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz",
"integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw="
},
"spdx-license-ids": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz",
"integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc="
},
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"requires": {
"is-fullwidth-code-point": "2.0.0",
"strip-ansi": "4.0.0"
},
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"requires": {
"ansi-regex": "3.0.0"
}
}
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "2.1.1"
}
},
"strip-bom": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
"requires": {
"is-utf8": "0.2.1"
}
},
"strip-eof": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"test-exclude": {
"version": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.1.1.tgz",
"integrity": "sha1-TYSWSwlmsAh+zDNKLOAC09k0HiY=",
"requires": {
"arrify": "1.0.1",
"micromatch": "2.3.11",
"object-assign": "4.1.1",
"read-pkg-up": "1.0.1",
"require-main-filename": "1.0.1"
}
},
"to-fast-properties": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
"integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
},
"trim-right": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
"integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
},
"uglify-js": {
"version": "2.8.29",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
"optional": true,
"requires": {
"source-map": "0.5.7",
"uglify-to-browserify": "1.0.2",
"yargs": "3.10.0"
},
"dependencies": {
"yargs": {
"version": "3.10.0",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
"optional": true,
"requires": {
"camelcase": "1.2.1",
"cliui": "2.1.0",
"decamelize": "1.2.0",
"window-size": "0.1.0"
}
}
}
},
"uglify-to-browserify": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
"integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
"optional": true
},
"validate-npm-package-license": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz",
"integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=",
"requires": {
"spdx-correct": "1.0.2",
"spdx-expression-parse": "1.0.4"
}
},
"which": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
"integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
"requires": {
"isexe": "2.0.0"
}
},
"which-module": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
},
"window-size": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
"integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
"optional": true
},
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
"integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
},
"wrap-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"requires": {
"string-width": "1.0.2",
"strip-ansi": "3.0.1"
},
"dependencies": {
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
}
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write-file-atomic": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-1.3.4.tgz",
"integrity": "sha1-+Aek8LHZ6ROuekgRLmzDrxmRtF8=",
"requires": {
"graceful-fs": "4.1.11",
"imurmurhash": "0.1.4",
"slide": "1.1.6"
}
},
"y18n": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"yargs": {
"version": "10.0.3",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-10.0.3.tgz",
"integrity": "sha512-DqBpQ8NAUX4GyPP/ijDGHsJya4tYqLQrjPr95HNsr1YwL3+daCfvBwg7+gIC6IdJhR2kATh3hb61vjzMWEtjdw==",
"requires": {
"cliui": "3.2.0",
"decamelize": "1.2.0",
"find-up": "2.1.0",
"get-caller-file": "1.0.2",
"os-locale": "2.1.0",
"require-directory": "2.1.1",
"require-main-filename": "1.0.1",
"set-blocking": "2.0.0",
"string-width": "2.1.1",
"which-module": "2.0.0",
"y18n": "3.2.1",
"yargs-parser": "8.0.0"
},
"dependencies": {
"cliui": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
"requires": {
"string-width": "1.0.2",
"strip-ansi": "3.0.1",
"wrap-ansi": "2.1.0"
},
"dependencies": {
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
}
}
}
}
},
"yargs-parser": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.0.0.tgz",
"integrity": "sha1-IdR2Mw5agieaS4gTRb8GYQLiGcY=",
"requires": {
"camelcase": "4.1.0"
},
"dependencies": {
"camelcase": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
}
}
}
}
},
"oauth-sign": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
"integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
"dev": true
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1.0.2"
}
},
"onetime": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz",
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
"dev": true
},
"opener": {
"version": "1.4.3",
"resolved": "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz",
"integrity": "sha1-XG2ixdflgx6P+jlklQ+NZnSskLg="
},
"optionator": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
"integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
"dev": true,
"requires": {
"deep-is": "0.1.3",
"fast-levenshtein": "2.0.6",
"levn": "0.3.0",
"prelude-ls": "1.1.2",
"type-check": "0.3.2",
"wordwrap": "1.0.0"
}
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"own-or": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz",
"integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw="
},
"own-or-env": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.0.tgz",
"integrity": "sha1-nvkg/IHi5jz1nUEQElg2jPT8pPs="
},
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-is-inside": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
"integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
"dev": true
},
"pify": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true
},
"pinkie": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA="
},
"pinkie-promise": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
"requires": {
"pinkie": "2.0.4"
}
},
"pkg-config": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz",
"integrity": "sha1-VX7yLXPaPIg3EHdmxS6tq94pj+Q=",
"dev": true,
"requires": {
"debug-log": "1.0.1",
"find-root": "1.1.0",
"xtend": "4.0.1"
}
},
"pluralize": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/pluralize/-/pluralize-1.2.1.tgz",
"integrity": "sha1-0aIUg/0iu0HlihL6NCGCMUCJfEU=",
"dev": true
},
"prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
"dev": true
},
"process-nextick-args": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
},
"progress": {
"version": "1.1.8",
"resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz",
"integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=",
"dev": true
},
"pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
"integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM="
},
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
},
"qs": {
"version": "6.3.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.3.2.tgz",
"integrity": "sha1-51vV9uJoEioqDgvaYwslUMFmUCw="
},
"readable-stream": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz",
"integrity": "sha512-m+qzzcn7KUxEmd1gMbchF+Y2eIUbieUaxkWtptyHywrX0rE8QEYqPC07Vuy4Wm32/xE16NcdBctb8S0Xe/5IeQ==",
"requires": {
"core-util-is": "1.0.2",
"inherits": "2.0.3",
"isarray": "1.0.0",
"process-nextick-args": "1.0.7",
"safe-buffer": "5.1.1",
"string_decoder": "1.0.3",
"util-deprecate": "1.0.2"
}
},
"readline2": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/readline2/-/readline2-1.0.1.tgz",
"integrity": "sha1-QQWWCP/BVHV7cV2ZidGZ/783LjU=",
"dev": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"mute-stream": "0.0.5"
}
},
"request": {
"version": "2.79.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.79.0.tgz",
"integrity": "sha1-Tf5b9r6LjNw3/Pk+BLZVd3InEN4=",
"requires": {
"aws-sign2": "0.6.0",
"aws4": "1.6.0",
"caseless": "0.11.0",
"combined-stream": "1.0.5",
"extend": "3.0.1",
"forever-agent": "0.6.1",
"form-data": "2.1.4",
"har-validator": "2.0.6",
"hawk": "3.1.3",
"http-signature": "1.1.1",
"is-typedarray": "1.0.0",
"isstream": "0.1.2",
"json-stringify-safe": "5.0.1",
"mime-types": "2.1.17",
"oauth-sign": "0.8.2",
"qs": "6.3.2",
"stringstream": "0.0.5",
"tough-cookie": "2.3.3",
"tunnel-agent": "0.4.3",
"uuid": "3.1.0"
}
},
"require-uncached": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz",
"integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=",
"dev": true,
"requires": {
"caller-path": "0.1.0",
"resolve-from": "1.0.1"
}
},
"resolve-from": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz",
"integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=",
"dev": true
},
"restore-cursor": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz",
"integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=",
"dev": true,
"requires": {
"exit-hook": "1.1.1",
"onetime": "1.1.0"
}
},
"rimraf": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
"requires": {
"glob": "7.1.2"
}
},
"run-async": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz",
"integrity": "sha1-yK1KXhEGYeQCp9IbUw4AnyX444k=",
"dev": true,
"requires": {
"once": "1.4.0"
}
},
"run-parallel": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.6.tgz",
"integrity": "sha1-KQA8miFj4B4tLfyQV18sbB1hoDk=",
"dev": true
},
"rx-lite": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz",
"integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=",
"dev": true
},
"safe-buffer": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
},
"shelljs": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.6.1.tgz",
"integrity": "sha1-7GIRvtGSBEIIj+D3Cyg3Iy7SyKg=",
"dev": true
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
},
"slice-ansi": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
"integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=",
"dev": true
},
"sntp": {
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
"requires": {
"hoek": "2.16.3"
}
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
},
"source-map-support": {
"version": "0.4.18",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
"requires": {
"source-map": "0.5.7"
}
},
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"sshpk": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz",
"integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=",
"requires": {
"asn1": "0.2.3",
"assert-plus": "1.0.0",
"bcrypt-pbkdf": "1.0.1",
"dashdash": "1.14.1",
"ecc-jsbn": "0.1.1",
"getpass": "0.1.7",
"jsbn": "0.1.1",
"tweetnacl": "0.14.5"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
"stack-utils": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz",
"integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA="
},
"standard": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/standard/-/standard-7.1.2.tgz",
"integrity": "sha1-QBZu7sJAUGXRpPDj8VurxuJ0YH4=",
"dev": true,
"requires": {
"eslint": "2.10.2",
"eslint-config-standard": "5.3.1",
"eslint-config-standard-jsx": "1.2.1",
"eslint-plugin-promise": "1.3.2",
"eslint-plugin-react": "5.2.2",
"eslint-plugin-standard": "1.3.3",
"standard-engine": "4.1.3"
}
},
"standard-engine": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-4.1.3.tgz",
"integrity": "sha1-ejGq1U8D2fOTVfQzic4GlPQJQVU=",
"dev": true,
"requires": {
"defaults": "1.0.3",
"deglob": "1.1.2",
"find-root": "1.1.0",
"get-stdin": "5.0.1",
"minimist": "1.2.0",
"multiline": "1.0.2",
"pkg-config": "1.1.1",
"xtend": "4.0.1"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true,
"requires": {
"code-point-at": "1.1.0",
"is-fullwidth-code-point": "1.0.0",
"strip-ansi": "3.0.1"
}
},
"string_decoder": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
"requires": {
"safe-buffer": "5.1.1"
}
},
"stringstream": {
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz",
"integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg="
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "2.1.1"
}
},
"strip-indent": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
"integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
"dev": true,
"requires": {
"get-stdin": "4.0.1"
},
"dependencies": {
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
"integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=",
"dev": true
}
}
},
"strip-json-comments": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz",
"integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=",
"dev": true
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
},
"table": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/table/-/table-3.8.3.tgz",
"integrity": "sha1-K7xULw/amGGnVdOUf+/Ys/UThV8=",
"dev": true,
"requires": {
"ajv": "4.11.8",
"ajv-keywords": "1.5.1",
"chalk": "1.1.3",
"lodash": "4.17.4",
"slice-ansi": "0.0.4",
"string-width": "2.1.1"
},
"dependencies": {
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
"is-fullwidth-code-point": "2.0.0",
"strip-ansi": "4.0.0"
}
},
"strip-ansi": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
"ansi-regex": "3.0.0"
}
}
}
},
"tap-mocha-reporter": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.6.tgz",
"integrity": "sha512-UImgw3etckDQCoqZIAIKcQDt0w1JLVs3v0yxLlmwvGLZl6MGFxF7JME5PElXjAoDklVDU42P3vVu5jgr37P4Yg==",
"requires": {
"color-support": "1.1.3",
"debug": "2.6.8",
"diff": "1.4.0",
"escape-string-regexp": "1.0.5",
"glob": "7.1.2",
"js-yaml": "3.10.0",
"readable-stream": "2.3.3",
"tap-parser": "5.4.0",
"unicode-length": "1.0.3"
},
"dependencies": {
"tap-parser": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-5.4.0.tgz",
"integrity": "sha512-BIsIaGqv7uTQgTW1KLTMNPSEQf4zDDPgYOBRdgOfuB+JFOLRBfEu6cLa/KvMvmqggu1FKXDfitjLwsq4827RvA==",
"requires": {
"events-to-array": "1.1.2",
"js-yaml": "3.10.0",
"readable-stream": "2.3.3"
}
}
}
},
"tap-parser": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-7.0.0.tgz",
"integrity": "sha512-05G8/LrzqOOFvZhhAk32wsGiPZ1lfUrl+iV7+OkKgfofZxiceZWMHkKmow71YsyVQ8IvGBP2EjcIjE5gL4l5lA==",
"requires": {
"events-to-array": "1.1.2",
"js-yaml": "3.10.0",
"minipass": "2.2.1"
}
},
"text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
"dev": true
},
"through": {
"version": "2.3.8",
"resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true
},
"tmatch": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/tmatch/-/tmatch-3.1.0.tgz",
"integrity": "sha512-W3MSATOCN4pVu2qFxmJLIArSifeSOFqnfx9hiUaVgOmeRoI2NbU7RNga+6G+L8ojlFeQge+ZPCclWyUpQ8UeNQ=="
},
"tough-cookie": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz",
"integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=",
"requires": {
"punycode": "1.4.1"
}
},
"trivial-deferred": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz",
"integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM="
},
"tryit": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/tryit/-/tryit-1.0.3.tgz",
"integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=",
"dev": true
},
"tsame": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/tsame/-/tsame-1.1.2.tgz",
"integrity": "sha512-ovCs24PGjmByVPr9tSIOs/yjUX9sJl0grEmOsj9dZA/UknQkgPOKcUqM84aSCvt9awHuhc/boMzTg3BHFalxWw=="
},
"tunnel-agent": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz",
"integrity": "sha1-Y3PbdpCf5XDgjXNYM2Xtgop07us="
},
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
"optional": true
},
"type-check": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
"dev": true,
"requires": {
"prelude-ls": "1.1.2"
}
},
"typedarray": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
},
"unicode-length": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-1.0.3.tgz",
"integrity": "sha1-Wtp6f+1RhBpBijKM8UlHisg1irs=",
"requires": {
"punycode": "1.4.1",
"strip-ansi": "3.0.1"
}
},
"uniq": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz",
"integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=",
"dev": true
},
"user-home": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz",
"integrity": "sha1-nHC/2Babwdy/SGBODwS4tJzenp8=",
"dev": true,
"requires": {
"os-homedir": "1.0.2"
}
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
},
"uuid": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz",
"integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g=="
},
"verror": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
"requires": {
"assert-plus": "1.0.0",
"core-util-is": "1.0.2",
"extsprintf": "1.3.0"
},
"dependencies": {
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
}
}
},
"which": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.0.tgz",
"integrity": "sha512-xcJpopdamTuY5duC/KnTTNBraPK54YwpenP4lzxU8H91GudWpFv38u0CKjclE1Wi2EH2EDz5LRcHcKbCIzqGyg==",
"requires": {
"isexe": "2.0.0"
}
},
"wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
"dev": true
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"write": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz",
"integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=",
"dev": true,
"requires": {
"mkdirp": "0.5.1"
}
},
"write-file-atomic": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
"integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==",
"requires": {
"graceful-fs": "4.1.11",
"imurmurhash": "0.1.4",
"signal-exit": "3.0.2"
}
},
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68="
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
"integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI="
},
"yapool": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/yapool/-/yapool-1.0.0.tgz",
"integrity": "sha1-9pPymjFbUNmp2iZGp6ZkXJaYW2o="
}
}
}
node-tap-11.0.0/package.json 0000664 0000000 0000000 00000004233 13206406237 0015573 0 ustar 00root root 0000000 0000000 {
"name": "tap",
"version": "11.0.0",
"author": "Isaac Z. Schlueter (http://blog.izs.me)",
"description": "A Test-Anything-Protocol library",
"homepage": "http://node-tap.org/",
"bin": {
"tap": "bin/run.js"
},
"main": "lib/tap.js",
"engines": {
"node": ">=4"
},
"dependencies": {
"bind-obj-methods": "^1.0.0",
"bluebird": "^3.5.1",
"clean-yaml-object": "^0.1.0",
"color-support": "^1.1.0",
"coveralls": "^2.13.3",
"foreground-child": "^1.3.3",
"fs-exists-cached": "^1.0.0",
"function-loop": "^1.0.1",
"glob": "^7.0.0",
"isexe": "^2.0.0",
"js-yaml": "^3.10.0",
"minipass": "^2.2.1",
"mkdirp": "^0.5.1",
"nyc": "^11.3.0",
"opener": "^1.4.1",
"os-homedir": "^1.0.2",
"own-or": "^1.0.0",
"own-or-env": "^1.0.0",
"rimraf": "^2.6.2",
"signal-exit": "^3.0.0",
"source-map-support": "^0.4.18",
"stack-utils": "^1.0.0",
"tap-mocha-reporter": "^3.0.6",
"tap-parser": "^7.0.0",
"tmatch": "^3.1.0",
"trivial-deferred": "^1.0.1",
"tsame": "^1.1.2",
"write-file-atomic": "^2.3.0",
"yapool": "^1.0.0"
},
"keywords": [
"assert",
"tap",
"test",
"testing"
],
"license": "ISC",
"repository": "https://github.com/tapjs/node-tap.git",
"scripts": {
"regen-fixtures": "node scripts/generate-test-test.js test-legacy/test/*.js",
"snap": "TAP_SNAPSHOT=1 node bin/run.js test/*.js",
"test": "node bin/run.js test/*.js --100 -J --nyc-arg=--include={lib,bin} -c",
"test-all": "node bin/run.js test/*.js test-legacy/*.js --100 -J --nyc-arg=--include={lib,bin}",
"unit": "bash scripts/unit.sh",
"test-legacy": "node bin/run.js test-legacy/*.* --coverage -t3600 --nyc-arg=--include={lib,bin}",
"smoke": "node bin/run.js --node-arg=test-legacy/test.js test-legacy/test/*.js -j2",
"posttest": "standard lib test",
"t": "node bin/run.js test/*.* -sfails.txt",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
},
"devDependencies": {
"standard": "^7.1.2",
"which": "^1.1.1"
},
"files": [
"bin/*",
"lib/*"
]
}
node-tap-11.0.0/scripts/ 0000775 0000000 0000000 00000000000 13206406237 0014772 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/scripts/generate-test-test.js 0000664 0000000 0000000 00000010410 13206406237 0021050 0 ustar 00root root 0000000 0000000 #!/usr/bin/env node
'use strict'
const spawn = require('child_process').spawn
const path = require('path')
const node = process.execPath
const fs = require('fs')
const yaml = require('js-yaml')
const queue = []
let running = false
for (let i = 2; i < process.argv.length; i++) {
generate(process.argv[i], false, false)
generate(process.argv[i], true, false)
generate(process.argv[i], false, true)
generate(process.argv[i], true, true)
}
function generate (file, bail, buffer) {
if (running) {
queue.push([file, bail, buffer])
return
}
running = true
file = path.resolve(file)
const cwd = process.cwd()
let f = file
if (f.indexOf(cwd) === 0) {
f = './' + file.substr(cwd.length + 1)
}
const outfile = file.replace(/\.js$/,
(bail ? '--bail' : '') +
(buffer ? '--buffer' : '') +
'.tap')
console.error(outfile)
let output = ''
const c = spawn(node, [file], {
env: {
TAP_BAIL: bail ? 1 : 0,
TAP_BUFFER: buffer ? 1 : 0
}
})
c.stdout.on('data', function (d) {
output += d
})
c.on('close', function (code, signal) {
if (bail && code === 0 && signal === null) {
// no point testing bailouts if no bailout happens
try { fs.unlinkSync(outfile) } catch (er) {}
} else {
const timep = '# time=[0-9.]+(ms)?'
const timere = new RegExp(timep, 'g')
output = output.replace(timere, '___/' + timep + '/~~~')
// raw stack traces vary in depth between node versions, and always
// cause problems. Replace them with an obvious failure.
output = output.replace(
/^ at .*?:[0-9]+:[0-9]+\)?$/mg,
'ERROR: stacks will cause problems, please fix this in the test')
output = output.split(file).join('___/.*/~~~' + path.basename(file))
output = output.split(f).join('___/.*/~~~' + path.basename(f))
const dir = path.dirname(file)
output = output.split(dir + '/').join('___/.*/~~~')
output = output.split(dir).join('___/.*/~~~' + path.basename(dir))
output = output.split(cwd + '/').join('___/.*/~~~')
output = output.split(cwd).join('___/.*/~~~')
output = output.split(node + ' ___/').join('\0N1\0')
output = output.split(path.basename(node) + ' ___/').join('\0N1\0')
output = output.split(node).join('\0N2\0')
output = output.split(path.basename(node)).join('\0N2\0')
output = output.split('\0N1\0').join('___/.*(node(js)?|iojs)(\.exe)?')
output = output.split('\0N2\0').join('___/.*(node(js)?|iojs)(\.exe)?/~~~')
output = yamlishToJson(output)
fs.writeFileSync(outfile, output)
}
running = false
if (queue.length) {
const q = queue.shift()
generate(q[0], q[1], q[2])
}
})
}
function deStackify (data) {
return Object.keys(data).sort().reduce(function (res, k) {
// a few keys vary across node versions, or based on the machine
// or specific run. Just throw those out.
if (k === 'stack' && typeof data[k] === 'string') {
return res
} else if (k === 'time' && typeof data[k] === 'number') {
return res
} else if (k === 'msecs' && typeof data[k] === 'number') {
return res
} else if (k === 'function' && typeof data[k] === 'string') {
return res
} else if (typeof data[k] === 'object' && data[k]) {
if (k === 'at') {
delete data[k].type
}
res[k] = deStackify(data[k])
} else {
res[k] = data[k]
}
return res
}, Array.isArray(data) ? [] : {})
}
function yamlishToJson (output) {
const lines = output.split(/\n/)
let ret = ''
let inyaml = false
let y = ''
let startlen = 0
for (let i = 0; i < lines.length; i++) {
const line = lines[i]
if (inyaml) {
if (line.match(/^\s+\.\.\.$/) && line.length === startlen) {
const yload = yaml.safeLoad(y)
delete yload.stdio
const data = JSON.stringify(deStackify(yload))
ret += new Array(startlen - 2).join(' ') +
data + '\n' + line + '\n'
inyaml = false
y = ''
} else {
y += line + '\n'
}
} else if (line.match(/^\s*---$/)) {
startlen = line.length
inyaml = true
y = ''
ret += line + '\n'
} else {
ret += line + '\n'
}
}
if (inyaml) {
throw new Error('neverending yaml\n' + y)
}
return ret
}
node-tap-11.0.0/scripts/unit.sh 0000664 0000000 0000000 00000000130 13206406237 0016277 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -x
node bin/run.js --100 test/$1.js --nyc-arg=--include={bin,lib}/$1.js
node-tap-11.0.0/tap-snapshots/ 0000775 0000000 0000000 00000000000 13206406237 0016107 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/tap-snapshots/test-run.js-TAP.test.js 0000664 0000000 0000000 00000014605 13206406237 0022247 0 ustar 00root root 0000000 0000000 /* IMPORTANT
* This snapshot file is auto-generated, but designed for humans.
* It should be checked into source control and tracked carefully.
* Re-generate by setting TAP_SNAPSHOT=1 and running tests.
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/run.js TAP basic > ok.js output 1`] = `
TAP version 13
# Subtest: test/cli-tests/ok.js
ok 1 - this is fine
1..1
# {time}
ok 1 - test/cli-tests/ok.js # {time}
1..1
# {time}
`
exports[`test/run.js TAP stdin with file > undefined 1`] = `
TAP version 13
ok 1 - test/cli-tests/foo.test.js # {time} {
ok 1 - child # {time} {
ok 1 - this is fine
1..1
}
1..1
# {time}
}
ok 2 - /dev/stdin # {time} {
1..1
ok
}
1..2
# {time}
`
exports[`test/run.js TAP coverage --100 pass > 100 pass 1`] = `
TAP version 13
# Subtest: 1.test.js
ok 1 - should be equal
1..1
# {time}
ok 1 - 1.test.js # {time}
# Subtest: 2.test.js
ok 1 - should be equal
1..1
# {time}
ok 2 - 2.test.js # {time}
# Subtest: 3.test.js
ok 1 - should be equal
1..1
# {time}
ok 3 - 3.test.js # {time}
1..3
# {time}
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files | 100 | 100 | 100 | 100 | |
ok.js | 100 | 100 | 100 | 100 | |
----------|----------|----------|----------|----------|----------------|
`
exports[`test/run.js TAP coverage --100 fail > 100 fail 1`] = `
TAP version 13
# Subtest: 1.test.js
ok 1 - should be equal
1..1
# {time}
ok 1 - 1.test.js # {time}
# Subtest: 2.test.js
ok 1 - should be equal
1..1
# {time}
ok 2 - 2.test.js # {time}
1..2
# {time}
----------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files | 75 | 75 | 100 | 75 | |
ok.js | 75 | 75 | 100 | 75 | 6 |
----------|----------|----------|----------|----------|----------------|
`
exports[`test/run.js TAP coverage report only > lcov output 1`] = `
TN:
SF:{CWD}/ok.js
FN:2,(anonymous_0)
FNF:1
FNH:1
FNDA:2,(anonymous_0)
DA:2,2
DA:3,2
DA:4,2
DA:6,0
LF:4
LH:3
BRDA:3,0,0,2
BRDA:3,0,1,0
BRDA:4,1,0,2
BRDA:4,1,1,1
BRF:4
BRH:3
end_of_record
`
exports[`test/run.js TAP coverage report with checks > lcov output and 100 check 1`] = `
TN:
SF:{CWD}/ok.js
FN:2,(anonymous_0)
FNF:1
FNH:1
FNDA:2,(anonymous_0)
DA:2,2
DA:3,2
DA:4,2
DA:6,0
LF:4
LH:3
BRDA:3,0,0,2
BRDA:3,0,1,0
BRDA:4,1,0,2
BRDA:4,1,1,1
BRF:4
BRH:3
end_of_record
`
exports[`test/run.js TAP coverage pipe to service > piped to coverage service cat 1`] = `
COVERAGE_SERVICE_TEST
TN:
SF:{CWD}/ok.js
FN:2,(anonymous_0)
FNF:1
FNH:1
FNDA:2,(anonymous_0)
DA:2,2
DA:3,2
DA:4,2
DA:6,0
LF:4
LH:3
BRDA:3,0,0,2
BRDA:3,0,1,0
BRDA:4,1,0,2
BRDA:4,1,1,1
BRF:4
BRH:3
end_of_record
`
exports[`test/run.js TAP save file with bailout, should save all untested > stdout 1`] = `
TAP version 13
# Subtest: z.js
not ok 1 - c/d
---
at:
line: #
column: #
file: z.js
source: |
require("{CWD}/").fail('c/d')
...
Bail out! # c/d
Bail out! # c/d
`
exports[`test/run.js TAP save file with bailout, should save all untested > savefile 1`] = `
a
x
z.js
a/b
x/y
a/b/2.js
a/b/f1.js
x/y/1.js
`
exports[`test/run.js TAP save file without bailout, run untested, save failures > stdout 1`] = `
TAP version 13
# Subtest: z.js
not ok 1 - c/d
---
at:
line: #
column: #
file: z.js
source: |
require("{CWD}/").fail('c/d')
...
1..1
# failed 1 test
# {time}
not ok 1 - z.js # {time}
---
args:
- z.js
command: {NODE}
cwd: {CWD}/test/cli-tests
exitCode: 1
file: z.js
stdio:
- 0
- pipe
- 2
timeout: {default}
...
# Subtest: a/b/2.js
ok 1 - 2
1..1
# {time}
ok 2 - a/b/2.js # {time}
# Subtest: a/b/f1.js
not ok 1 - a/b
---
at:
line: #
column: #
file: a/b/f1.js
source: |
require("{CWD}/").fail('a/b')
...
1..1
# failed 1 test
# {time}
not ok 3 - a/b/f1.js # {time}
---
args:
- a/b/f1.js
command: {NODE}
cwd: {CWD}/test/cli-tests
exitCode: 1
file: a/b/f1.js
stdio:
- 0
- pipe
- 2
timeout: {default}
...
# Subtest: x/y/1.js
ok 1 - one
1..1
# {time}
ok 4 - x/y/1.js # {time}
1..4
# failed 2 of 4 tests
# {time}
`
exports[`test/run.js TAP save file without bailout, run untested, save failures > savefile 1`] = `
z.js
a/b/f1.js
`
exports[`test/run.js TAP save file pass, empty save file > stdout 1`] = `
TAP version 13
# Subtest: z.js
ok 1 - fine now too
1..1
# {time}
ok 1 - z.js # {time}
# Subtest: a/b/f1.js
ok 1 - fine now
1..1
# {time}
ok 2 - a/b/f1.js # {time}
1..2
# {time}
`
exports[`test/run.js TAP save file empty save file, run all tests > stdout 1`] = `
TAP version 13
# Subtest: z.js
ok 1 - fine now too
1..1
# {time}
ok 1 - z.js # {time}
# Subtest: a/b/2.js
ok 1 - 2
1..1
# {time}
ok 2 - a/b/2.js # {time}
# Subtest: a/b/f1.js
ok 1 - fine now
1..1
# {time}
ok 3 - a/b/f1.js # {time}
# Subtest: x/y/1.js
ok 1 - one
1..1
# {time}
ok 4 - x/y/1.js # {time}
1..4
# {time}
`
exports[`test/run.js TAP parallel > output 1`] = `
TAP version 13
ok 1 - p/y/1.js # {time} {
ok 1 - one
1..1
# {time}
}
ok 2 - p/y/2.js # {time} {
ok 1 - 2
1..1
# {time}
}
# Subtest: r/y/1.js
ok 1 - one
1..1
# {time}
ok 3 - r/y/1.js # {time}
# Subtest: r/y/2.js
ok 1 - 2
1..1
# {time}
ok 4 - r/y/2.js # {time}
# Subtest: q/b/f1.js
ok 1 - a/b
1..1
# {time}
ok 5 - q/b/f1.js # {time}
# Subtest: q/b/f2.js
ok 1 - c/d
1..1
# {time}
ok 6 - q/b/f2.js # {time}
ok 7 - z/y/1.js # {time} {
ok 1 - one
1..1
# {time}
}
ok 8 - z/y/2.js # {time} {
ok 1 - 2
1..1
# {time}
}
1..8
# {time}
`
exports[`test/run.js TAP executables > undefined 1`] = `
TAP version 13
# Subtest: exe/ok.sh
1..1
ok 1 File with executable bit should be executed
ok 1 - exe/ok.sh # {time}
1..1
# {time}
`
node-tap-11.0.0/tap-snapshots/test-spawn.js-TAP.test.js 0000664 0000000 0000000 00000002372 13206406237 0022571 0 ustar 00root root 0000000 0000000 /* IMPORTANT
* This snapshot file is auto-generated, but designed for humans.
* It should be checked into source control and tracked carefully.
* Re-generate by setting TAP_SNAPSHOT=1 and running tests.
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/spawn.js TAP timeout KILL > undefined 1`] = `
SIGTERM
not ok 1 - timeout!
---
expired: killa
...
1..1
# failed 1 test
`
exports[`test/spawn.js TAP skip stuff > undefined 1`] = `
TAP version 13
ok 1 - skipper # SKIP {
1..0
# {time}
}
# Subtest: node ./test/spawn.js skip-reason
1..0 # for no raisins
# {time}
ok 2 - node ./test/spawn.js skip-reason # SKIP for no raisins
`
exports[`test/spawn.js TAP using proc event > undefined 1`] = `
TAP version 13
ok
1..1
`
exports[`test/spawn.js TAP failure to spawn > undefined 1`] = `
not ok 1 - spawn something that does not exist ENOENT
---
args: []
at:
line: #
column: #
file: util.js
code: ENOENT
command: something that does not exist
cwd: {CWD}
errno: ENOENT
path: something that does not exist
spawnargs: []
stdio:
- 0
- pipe
- 2
syscall: spawn something that does not exist
test: 'something that does not exist '
...
1..1
# failed 1 test
`
node-tap-11.0.0/tap-snapshots/test-tap.js-TAP.test.js 0000664 0000000 0000000 00000020727 13206406237 0022231 0 ustar 00root root 0000000 0000000 /* IMPORTANT
* This snapshot file is auto-generated, but designed for humans.
* It should be checked into source control and tracked carefully.
* Re-generate by setting TAP_SNAPSHOT=1 and running tests.
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/tap.js TAP ok > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP ok > stdout 1`] = `
TAP version 13
ok 1 - fine
1..1
# {time}
`
exports[`test/tap.js TAP ok > stderr 1`] = `
`
exports[`test/tap.js TAP notOk > exit status 1`] = `
{ code: 1, signal: null }
`
exports[`test/tap.js TAP notOk > stdout 1`] = `
TAP version 13
not ok 1 - expected
---
at:
line: #
column: #
file: test/tap.js
source: |
notOk: t => t.fail('expected'),
stack: |
{STACK}
...
1..1
# failed 1 test
# {time}
`
exports[`test/tap.js TAP notOk > stderr 1`] = `
`
exports[`test/tap.js TAP bail > exit status 1`] = `
{ code: 1, signal: null }
`
exports[`test/tap.js TAP bail > stdout 1`] = `
TAP version 13
Bail out! cannot proceed
`
exports[`test/tap.js TAP bail > stderr 1`] = `
`
exports[`test/tap.js TAP plan 0 > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP plan 0 > stdout 1`] = `
TAP version 13
1..0 # skip it all
# {time}
`
exports[`test/tap.js TAP plan 0 > stderr 1`] = `
`
exports[`test/tap.js TAP plan unsatisied > exit status 1`] = `
{ code: 1, signal: null }
`
exports[`test/tap.js TAP plan unsatisied > stdout 1`] = `
TAP version 13
1..99
# test count(0) != plan(99)
# failed 1 test
# {time}
`
exports[`test/tap.js TAP plan unsatisied > stderr 1`] = `
`
exports[`test/tap.js TAP too much > exit status 1`] = `
{ code: 1, signal: null }
`
exports[`test/tap.js TAP too much > stdout 1`] = `
TAP version 13
1..1
ok 1 - a little
# {time}
`
exports[`test/tap.js TAP too much > stderr 1`] = `
Error: test count exceeds plan
{STACK}
{ name: 'TAP', test: 'TAP', plan: 1 }
`
exports[`test/tap.js TAP stdout epipe > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP stdout epipe > stdout 1`] = `
TAP version 13
ok 1 - this is fine
1..1
# {time}
`
exports[`test/tap.js TAP stdout epipe > stderr 1`] = `
`
exports[`test/tap.js TAP close even if exiting hard > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP close even if exiting hard > stdout 1`] = `
TAP version 13
ok 1 - make sure, really
1..1
# {time}
`
exports[`test/tap.js TAP close even if exiting hard > stderr 1`] = `
`
exports[`test/tap.js TAP unhandled promise > exit status 1`] = `
{ code: 1, signal: null }
`
exports[`test/tap.js TAP unhandled promise > stdout 1`] = `
TAP version 13
ok 1 - fine, i promise
not ok 2 - broken
---
at:
line: #
column: #
file: test/tap.js
source: |
Promise.reject(new Error('broken'))
stack: |
{STACK}
test: TAP
...
1..2
# failed 1 of 2 tests
# {time}
`
exports[`test/tap.js TAP unhandled promise > stderr 1`] = `
`
exports[`test/tap.js TAP teardown event loop > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP teardown event loop > stdout 1`] = `
TAP version 13
ok 1 - fine
1..1
# {time}
`
exports[`test/tap.js TAP teardown event loop > stderr 1`] = `
`
exports[`test/tap.js TAP teardown throw > exit status 1`] = `
{ code: 1, signal: null }
`
exports[`test/tap.js TAP teardown throw > stdout 1`] = `
TAP version 13
ok 1 - x
1..1
# {time}
`
exports[`test/tap.js TAP teardown throw > stderr 1`] = `
Error: poop
{STACK}
{ name: 'TAP', test: 'TAP' }
`
exports[`test/tap.js TAP process.exitCode polyfill > exit status 1`] = `
{ code: 1, signal: null }
`
exports[`test/tap.js TAP process.exitCode polyfill > stdout 1`] = `
TAP version 13
not ok 1 - v0.10.420
---
at:
line: #
column: #
file: test/tap.js
source: |
t.fail(process.version)
stack: |
{STACK}
...
1..1
# failed 1 test
# {time}
`
exports[`test/tap.js TAP process.exitCode polyfill > stderr 1`] = `
`
exports[`test/tap.js TAP TAP_DEBUG=1 > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP TAP_DEBUG=1 > stdout 1`] = `
TAP version 13
# this is fine
1..0
# {time}
`
exports[`test/tap.js TAP TAP_DEBUG=1 > stderr 1`] = `
TAP {pid} TAP: PROCESSING(TAP) 2
TAP {pid} TAP: > STRING
TAP {pid} TAP: LINE "TAP version 13\\n"
TAP {pid} TAP: < already processing
TAP {pid} TAP: > STRING
TAP {pid} TAP: LINE "# this is fine\\n"
TAP {pid} TAP: done processing [] false
TAP {pid} TAP: PROCESSING(TAP) 1
TAP {pid} TAP: > METHOD
TAP {pid} TAP: END implicit=true
TAP {pid} TAP: END(TAP) implicit plan 0
TAP {pid} TAP: END implicit=true
TAP {pid} TAP: < already processing
TAP {pid} TAP: > STRING
TAP {pid} TAP: LINE "1..0\\n"
TAP {pid} TAP: > EOF TAP
TAP {pid} TAP: ONCOMPLETE "TAP" {"ok":true,"count":0,"pass":0,"fail":0,"bailout":false,"todo":0,"skip":0,"plan":{"start":1,"end":0,"skipAll":true,"skipReason":"","comment":""},"failures":[]}
TAP {pid} TAP: done processing [] false
`
exports[`test/tap.js TAP NODE_DEBUG=tap > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP NODE_DEBUG=tap > stdout 1`] = `
TAP version 13
1..0
# {time}
`
exports[`test/tap.js TAP NODE_DEBUG=tap > stderr 1`] = `
TAP {pid} TAP: END implicit=true
TAP {pid} TAP: PROCESSING(TAP) 3
TAP {pid} TAP: > STRING
TAP {pid} TAP: LINE "TAP version 13\\n"
TAP {pid} TAP: < already processing
TAP {pid} TAP: > STRING
TAP {pid} TAP: LINE "1..0\\n"
TAP {pid} TAP: > METHOD
TAP {pid} TAP: END implicit=true
TAP {pid} TAP: < already processing
TAP {pid} TAP: > EOF TAP
TAP {pid} TAP: ONCOMPLETE "TAP" {"ok":true,"count":0,"pass":0,"fail":0,"bailout":false,"todo":0,"skip":0,"plan":{"start":1,"end":0,"skipAll":true,"skipReason":"","comment":""},"failures":[]}
TAP {pid} TAP: done processing [] false
`
exports[`test/tap.js TAP TAP_GREP > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP TAP_GREP > stdout 1`] = `
TAP version 13
# Subtest: axo
ok 1 - yellow # SKIP filter: /^y$/i
# Subtest: Y
1..0
ok 2 - Y # {time}
# Subtest: y
# Subtest: this too
1..0
ok 1 - this too # {time}
1..1
ok 3 - y # {time}
1..3
# skip: 1
ok 1 - axo # {time}
ok 2 - nope # SKIP filter: /x/
1..2
# skip: 1
# {time}
`
exports[`test/tap.js TAP TAP_GREP > stderr 1`] = `
`
exports[`test/tap.js TAP TAP_GREP_INVERT > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP TAP_GREP_INVERT > stdout 1`] = `
TAP version 13
# Subtest: yes this one
ok 1 - Y # SKIP filter out: /^y$/i
# Subtest: yellow
1..0
ok 2 - yellow # {time}
# Subtest: apple
# Subtest: this too
1..0
ok 1 - this too # {time}
1..1
ok 3 - apple # {time}
1..3
# skip: 1
ok 1 - yes this one # {time}
ok 2 - axo # SKIP filter out: /x/
1..2
# skip: 1
# {time}
`
exports[`test/tap.js TAP TAP_GREP_INVERT > stderr 1`] = `
`
exports[`test/tap.js TAP TAP_ONLY > exit status 1`] = `
{ code: 0, signal: null }
`
exports[`test/tap.js TAP TAP_ONLY > stdout 1`] = `
TAP version 13
# Subtest: only this one
1..0
ok 1 - only this one # {time}
ok 2 - not this one # SKIP filter: only
1..2
# skip: 1
# {time}
`
exports[`test/tap.js TAP TAP_ONLY > stderr 1`] = `
`
exports[`test/tap.js TAP timeout sigterm > exit status 1`] = `
{ code: null, signal: 'SIGTERM' }
`
exports[`test/tap.js TAP timeout sigterm > stdout 1`] = `
TAP version 13
ok 1 - fine
not ok 2 - timeout!
---
expired: TAP
handles:
- type: Timer
signal: SIGTERM
stack: |
{STACK}
test: TAP
...
1..2
# failed 1 of 2 tests
# {time}
`
exports[`test/tap.js TAP timeout sigterm > stderr 1`] = `
`
exports[`test/tap.js TAP timeout sigterm with handle > exit status 1`] = `
{ code: null, signal: 'SIGTERM' }
`
exports[`test/tap.js TAP timeout sigterm with handle > stdout 1`] = `
TAP version 13
ok 1 - fine
not ok 2 - timeout!
---
expired: TAP
handles:
- type: Timer
signal: SIGTERM
stack: |
{STACK}
test: TAP
...
1..2
# failed 1 of 2 tests
# {time}
`
exports[`test/tap.js TAP timeout sigterm with handle > stderr 1`] = `
`
exports[`test/tap.js TAP timeout sigterm many times > exit status 1`] = `
{ code: null, signal: 'SIGTERM' }
`
exports[`test/tap.js TAP timeout sigterm many times > stdout 1`] = `
TAP version 13
ok 1 - fine
not ok 2 - timeout!
---
expired: TAP
requests:
- type: FSReqWrap
signal: SIGTERM
stack: |
{STACK}
test: TAP
...
1..2
# failed 1 of 2 tests
# {time}
`
exports[`test/tap.js TAP timeout sigterm many times > stderr 1`] = `
`
node-tap-11.0.0/tap-snapshots/test-test.js-TAP.test.js 0000664 0000000 0000000 00000131334 13206406237 0022421 0 ustar 00root root 0000000 0000000 /* IMPORTANT
* This snapshot file is auto-generated, but designed for humans.
* It should be checked into source control and tracked carefully.
* Re-generate by setting TAP_SNAPSHOT=1 and running tests.
* Make sure to inspect the output below. Do not ignore changes!
*/
'use strict'
exports[`test/test.js TAP short output checks no plan no options > no plan 1`] = `
TAP version 13
ok 1 - this is fine
1..1
`
exports[`test/test.js TAP short output checks no plan buffered > no plan 1`] = `
TAP version 13
ok 1 - this is fine
1..1
`
exports[`test/test.js TAP short output checks no plan bailout > no plan 1`] = `
TAP version 13
ok 1 - this is fine
1..1
`
exports[`test/test.js TAP short output checks no plan runOnly > no plan 1`] = `
TAP version 13
ok 1 - this is fine
1..1
`
exports[`test/test.js TAP short output checks plan no options > plan 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks plan buffered > plan 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks plan bailout > plan 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks plan runOnly > plan 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks comment no options > comment 1`] = `
TAP version 13
# this is fine
1..0
`
exports[`test/test.js TAP short output checks comment buffered > comment 1`] = `
TAP version 13
# this is fine
1..0
`
exports[`test/test.js TAP short output checks comment bailout > comment 1`] = `
TAP version 13
# this is fine
1..0
`
exports[`test/test.js TAP short output checks comment runOnly > comment 1`] = `
TAP version 13
# this is fine
1..0
`
exports[`test/test.js TAP short output checks pragma no options > pragma 1`] = `
TAP version 13
pragma +strict
pragma -strict
1..0
`
exports[`test/test.js TAP short output checks pragma buffered > pragma 1`] = `
TAP version 13
pragma +strict
pragma -strict
1..0
`
exports[`test/test.js TAP short output checks pragma bailout > pragma 1`] = `
TAP version 13
pragma +strict
pragma -strict
1..0
`
exports[`test/test.js TAP short output checks pragma runOnly > pragma 1`] = `
TAP version 13
pragma +strict
pragma -strict
1..0
`
exports[`test/test.js TAP short output checks todo no options > todo 1`] = `
TAP version 13
not ok 1 - i will do this later # TODO
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, 'i will do this later', { todo: true })
...
not ok 2 - expect falsey value # TODO later
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, { todo: 'later' })
...
ok 3 - expect falsey value
ok 4 - i will do this later # TODO
not ok 5 - expect truthy value # SKIP
ok 6 - i did not do this later # SKIP
1..6
# todo: 3
# skip: 2
`
exports[`test/test.js TAP short output checks todo buffered > todo 1`] = `
TAP version 13
not ok 1 - i will do this later # TODO
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, 'i will do this later', { todo: true })
...
not ok 2 - expect falsey value # TODO later
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, { todo: 'later' })
...
ok 3 - expect falsey value
ok 4 - i will do this later # TODO
not ok 5 - expect truthy value # SKIP
ok 6 - i did not do this later # SKIP
1..6
# todo: 3
# skip: 2
`
exports[`test/test.js TAP short output checks todo bailout > todo 1`] = `
TAP version 13
not ok 1 - i will do this later # TODO
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, 'i will do this later', { todo: true })
...
not ok 2 - expect falsey value # TODO later
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, { todo: 'later' })
...
ok 3 - expect falsey value
ok 4 - i will do this later # TODO
not ok 5 - expect truthy value # SKIP
ok 6 - i did not do this later # SKIP
1..6
# todo: 3
# skip: 2
`
exports[`test/test.js TAP short output checks todo runOnly > todo 1`] = `
TAP version 13
not ok 1 - i will do this later # TODO
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, 'i will do this later', { todo: true })
...
not ok 2 - expect falsey value # TODO later
---
at:
line: #
column: #
file: test/test.js
source: |
tt.notOk(true, { todo: 'later' })
...
ok 3 - expect falsey value
ok 4 - i will do this later # SKIP filter: only
not ok 5 - expect truthy value # SKIP
ok 6 - i did not do this later # SKIP filter: only
1..6
# todo: 2
# skip: 3
`
exports[`test/test.js TAP short output checks only no options > only 1`] = `
TAP version 13
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 1 - run this with a comment # {time}
# Subtest: this is a child test
1..0
ok 2 - this is a child test # {time}
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 3 - run this with a comment # {time}
1..3
`
exports[`test/test.js TAP short output checks only buffered > only 1`] = `
TAP version 13
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 1 - run this with a comment # {time}
# Subtest: this is a child test
1..0
ok 2 - this is a child test # {time}
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 3 - run this with a comment # {time}
1..3
`
exports[`test/test.js TAP short output checks only bailout > only 1`] = `
TAP version 13
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 1 - run this with a comment # {time}
# Subtest: this is a child test
1..0
ok 2 - this is a child test # {time}
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 3 - run this with a comment # {time}
1..3
`
exports[`test/test.js TAP short output checks only runOnly > only 1`] = `
TAP version 13
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 1 - run this with a comment # {time}
# Subtest: this is a child test
1..0
ok 2 - this is a child test # {time}
# "run this with a comment" has \`only\` set but all tests run
# Subtest: run this with a comment
1..0
ok 3 - run this with a comment # {time}
1..3
`
exports[`test/test.js TAP short output checks no plan fail no options > no plan fail 1`] = `
TAP version 13
not ok 1 - this is fine
not ok 2 - (unnamed test) # TODO
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail({ todo: true })
...
not ok 3 - this is fine
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail('this is fine')
stack: |
{STACK}
...
1..3
# failed 3 of 3 tests
# todo: 1
`
exports[`test/test.js TAP short output checks no plan fail buffered > no plan fail 1`] = `
TAP version 13
not ok 1 - this is fine
not ok 2 - (unnamed test) # TODO
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail({ todo: true })
...
not ok 3 - this is fine
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail('this is fine')
stack: |
{STACK}
...
1..3
# failed 3 of 3 tests
# todo: 1
`
exports[`test/test.js TAP short output checks no plan fail bailout > no plan fail 1`] = `
TAP version 13
not ok 1 - this is fine
Bail out! # this is fine
BAILOUT: "# this is fine"
`
exports[`test/test.js TAP short output checks no plan fail runOnly > no plan fail 1`] = `
TAP version 13
not ok 1 - this is fine
not ok 2 - (unnamed test) # TODO
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail({ todo: true })
...
not ok 3 - this is fine
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail('this is fine')
stack: |
{STACK}
...
1..3
# failed 3 of 3 tests
# todo: 1
`
exports[`test/test.js TAP short output checks plan fail no options > plan fail 1`] = `
TAP version 13
1..1 # expect some failure here
not ok 1 - this is fine
# failed 1 test
`
exports[`test/test.js TAP short output checks plan fail buffered > plan fail 1`] = `
TAP version 13
1..1 # expect some failure here
not ok 1 - this is fine
# failed 1 test
`
exports[`test/test.js TAP short output checks plan fail bailout > plan fail 1`] = `
TAP version 13
1..1 # expect some failure here
not ok 1 - this is fine
Bail out! # this is fine
BAILOUT: "# this is fine"
`
exports[`test/test.js TAP short output checks plan fail runOnly > plan fail 1`] = `
TAP version 13
1..1 # expect some failure here
not ok 1 - this is fine
# failed 1 test
`
exports[`test/test.js TAP short output checks fail then end no options > fail then end 1`] = `
TAP version 13
# Subtest: child
not ok 1 - this is not ok
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail('this is not ok')
stack: |
{STACK}
...
1..1
# failed 1 test
not ok 1 - child # {time}
1..1
# failed 1 test
`
exports[`test/test.js TAP short output checks fail then end buffered > fail then end 1`] = `
TAP version 13
# Subtest: child
not ok 1 - this is not ok
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail('this is not ok')
stack: |
{STACK}
...
1..1
# failed 1 test
not ok 1 - child # {time}
1..1
# failed 1 test
`
exports[`test/test.js TAP short output checks fail then end bailout > fail then end 1`] = `
TAP version 13
# Subtest: child
not ok 1 - this is not ok
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail('this is not ok')
stack: |
{STACK}
...
Bail out! # this is not ok
BAILOUT: "# this is not ok"
`
exports[`test/test.js TAP short output checks fail then end runOnly > fail then end 1`] = `
TAP version 13
ok 1 - child # SKIP filter: only
1..1
# skip: 1
`
exports[`test/test.js TAP short output checks planned skip no options > planned skip 1`] = `
TAP version 13
1..0 # skip this one
`
exports[`test/test.js TAP short output checks planned skip buffered > planned skip 1`] = `
TAP version 13
1..0 # skip this one
`
exports[`test/test.js TAP short output checks planned skip bailout > planned skip 1`] = `
TAP version 13
1..0 # skip this one
`
exports[`test/test.js TAP short output checks planned skip runOnly > planned skip 1`] = `
TAP version 13
1..0 # skip this one
`
exports[`test/test.js TAP short output checks multi-plan throws no options > multi-plan throws 1`] = `
TAP version 13
1..1
ok 1 - expected to throw
`
exports[`test/test.js TAP short output checks multi-plan throws buffered > multi-plan throws 1`] = `
TAP version 13
1..1
ok 1 - expected to throw
`
exports[`test/test.js TAP short output checks multi-plan throws bailout > multi-plan throws 1`] = `
TAP version 13
1..1
ok 1 - expected to throw
`
exports[`test/test.js TAP short output checks multi-plan throws runOnly > multi-plan throws 1`] = `
TAP version 13
1..1
ok 1 - expected to throw
`
exports[`test/test.js TAP short output checks negative plan throws no options > negative plan throws 1`] = `
TAP version 13
ok 1 - expected to throw
1..1
`
exports[`test/test.js TAP short output checks negative plan throws buffered > negative plan throws 1`] = `
TAP version 13
ok 1 - expected to throw
1..1
`
exports[`test/test.js TAP short output checks negative plan throws bailout > negative plan throws 1`] = `
TAP version 13
ok 1 - expected to throw
1..1
`
exports[`test/test.js TAP short output checks negative plan throws runOnly > negative plan throws 1`] = `
TAP version 13
ok 1 - expected to throw
1..1
`
exports[`test/test.js TAP short output checks expect fail no options > expect fail 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks expect fail buffered > expect fail 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks expect fail bailout > expect fail 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks expect fail runOnly > expect fail 1`] = `
TAP version 13
1..1
ok 1 - this is fine
`
exports[`test/test.js TAP short output checks sub no options > sub 1`] = `
TAP version 13
ok 1 - named child # {time} {
ok 1 - this is fine
ok 2 - (unnamed test)
ok 3 - (unnamed test) # TODO
1..3
# todo: 1
}
# Subtest: named_function
1..1
ok 1 - also fine
ok 2 - named_function # {time}
# Subtest: promisey
ok 1 - i promise, it is fine
1..1
ok 3 - promisey # {time}
1..3
`
exports[`test/test.js TAP short output checks sub buffered > sub 1`] = `
TAP version 13
ok 1 - named child # {time} {
ok 1 - this is fine
ok 2 - (unnamed test)
ok 3 - (unnamed test) # TODO
1..3
# todo: 1
}
# Subtest: named_function
1..1
ok 1 - also fine
ok 2 - named_function # {time}
# Subtest: promisey
ok 1 - i promise, it is fine
1..1
ok 3 - promisey # {time}
1..3
`
exports[`test/test.js TAP short output checks sub bailout > sub 1`] = `
TAP version 13
ok 1 - named child # {time} {
ok 1 - this is fine
ok 2 - (unnamed test)
ok 3 - (unnamed test) # TODO
1..3
# todo: 1
}
# Subtest: named_function
1..1
ok 1 - also fine
ok 2 - named_function # {time}
# Subtest: promisey
ok 1 - i promise, it is fine
1..1
ok 3 - promisey # {time}
1..3
`
exports[`test/test.js TAP short output checks sub runOnly > sub 1`] = `
TAP version 13
ok 1 - named child # SKIP filter: only
ok 2 - named_function # SKIP filter: only
ok 3 - promisey # SKIP filter: only
1..3
# skip: 3
`
exports[`test/test.js TAP short output checks parallel sub no options > parallel sub 1`] = `
TAP version 13
1..2
ok 1 - slow child # {time} {
1..0
}
ok 2 - fast child # {time} {
ok 1 - slow is going
1..1
}
`
exports[`test/test.js TAP short output checks parallel sub buffered > parallel sub 1`] = `
TAP version 13
1..2
ok 1 - slow child # {time} {
1..0
}
ok 2 - fast child # {time} {
ok 1 - slow is going
1..1
}
`
exports[`test/test.js TAP short output checks parallel sub bailout > parallel sub 1`] = `
TAP version 13
1..2
ok 1 - slow child # {time} {
1..0
}
ok 2 - fast child # {time} {
ok 1 - slow is going
1..1
}
`
exports[`test/test.js TAP short output checks parallel sub runOnly > parallel sub 1`] = `
TAP version 13
1..2
ok 1 - slow child # SKIP filter: only
ok 2 - fast child # SKIP filter: only
# skip: 2
`
exports[`test/test.js TAP short output checks reasoned bailout no options > reasoned bailout 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
Bail out! not fine
BAILOUT: "not fine"
`
exports[`test/test.js TAP short output checks reasoned bailout buffered > reasoned bailout 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
Bail out! not fine
BAILOUT: "not fine"
`
exports[`test/test.js TAP short output checks reasoned bailout bailout > reasoned bailout 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
Bail out! not fine
BAILOUT: "not fine"
`
exports[`test/test.js TAP short output checks reasoned bailout runOnly > reasoned bailout 1`] = `
TAP version 13
ok 1 - (unnamed test) # SKIP filter: only
1..1
# skip: 1
`
exports[`test/test.js TAP short output checks unreasonable bailout no options > unreasonable bailout 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
Bail out!
`
exports[`test/test.js TAP short output checks unreasonable bailout buffered > unreasonable bailout 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
Bail out!
`
exports[`test/test.js TAP short output checks unreasonable bailout bailout > unreasonable bailout 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
Bail out!
`
exports[`test/test.js TAP short output checks unreasonable bailout runOnly > unreasonable bailout 1`] = `
TAP version 13
ok 1 - (unnamed test) # SKIP filter: only
1..1
# skip: 1
`
exports[`test/test.js TAP short output checks bailout after end no options > bailout after end 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
1..1
Bail out! not fine
BAILOUT: "not fine"
`
exports[`test/test.js TAP short output checks bailout after end buffered > bailout after end 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
1..1
Bail out! not fine
BAILOUT: "not fine"
`
exports[`test/test.js TAP short output checks bailout after end bailout > bailout after end 1`] = `
TAP version 13
# Subtest
ok 1 - this is fine
1..1
Bail out! not fine
BAILOUT: "not fine"
`
exports[`test/test.js TAP short output checks bailout after end runOnly > bailout after end 1`] = `
TAP version 13
ok 1 - (unnamed test) # SKIP filter: only
1..1
# skip: 1
`
exports[`test/test.js TAP short output checks diags no options > diags 1`] = `
TAP version 13
ok 1 - has diags
---
foo: 1
...
not ok 2 - fails without diag
ok 3 - has diags
---
foo: 1
...
not ok 4 - fails without diag
ok 5 - has diags
---
foo: 1
...
not ok 6 - fails without diag
1..6
# failed 3 of 6 tests
`
exports[`test/test.js TAP short output checks diags buffered > diags 1`] = `
TAP version 13
ok 1 - has diags
---
foo: 1
...
not ok 2 - fails without diag
ok 3 - has diags
---
foo: 1
...
not ok 4 - fails without diag
ok 5 - has diags
---
foo: 1
...
not ok 6 - fails without diag
1..6
# failed 3 of 6 tests
`
exports[`test/test.js TAP short output checks diags bailout > diags 1`] = `
TAP version 13
ok 1 - has diags
---
foo: 1
...
not ok 2 - fails without diag
Bail out! # fails without diag
BAILOUT: "# fails without diag"
`
exports[`test/test.js TAP short output checks diags runOnly > diags 1`] = `
TAP version 13
ok 1 - has diags
---
foo: 1
...
not ok 2 - fails without diag
ok 3 - has diags
---
foo: 1
...
not ok 4 - fails without diag
ok 5 - has diags
---
foo: 1
...
not ok 6 - fails without diag
1..6
# failed 3 of 6 tests
`
exports[`test/test.js TAP short output checks gentle thrower no options > gentle thrower 1`] = `
TAP version 13
not ok 1 - ok
---
at:
line: #
column: #
file: test/test.js
source: |
'gentle thrower': tt => tt.threw(new Error('ok')),
stack: |
{STACK}
...
1..1
# failed 1 test
`
exports[`test/test.js TAP short output checks gentle thrower buffered > gentle thrower 1`] = `
TAP version 13
not ok 1 - ok
---
at:
line: #
column: #
file: test/test.js
source: |
'gentle thrower': tt => tt.threw(new Error('ok')),
stack: |
{STACK}
...
1..1
# failed 1 test
`
exports[`test/test.js TAP short output checks gentle thrower bailout > gentle thrower 1`] = `
TAP version 13
not ok 1 - ok
---
at:
line: #
column: #
file: test/test.js
source: |
'gentle thrower': tt => tt.threw(new Error('ok')),
stack: |
{STACK}
...
Bail out! # ok
BAILOUT: "# ok"
`
exports[`test/test.js TAP short output checks gentle thrower runOnly > gentle thrower 1`] = `
TAP version 13
not ok 1 - ok
---
at:
line: #
column: #
file: test/test.js
runOnly: true
source: |
'gentle thrower': tt => tt.threw(new Error('ok')),
stack: |
{STACK}
...
1..1
# failed 1 test
`
exports[`test/test.js TAP short output checks child thrower no options > child thrower 1`] = `
TAP version 13
# Subtest: child test
not ok 1 - ok
---
at:
line: #
column: #
file: test/test.js
source: |
tt.threw(new Error('ok'))).then(tt.end),
stack: |
{STACK}
test: child test
...
1..1
# failed 1 test
not ok 1 - child test # {time}
1..1
# failed 1 test
`
exports[`test/test.js TAP short output checks child thrower buffered > child thrower 1`] = `
TAP version 13
# Subtest: child test
not ok 1 - ok
---
at:
line: #
column: #
file: test/test.js
source: |
tt.threw(new Error('ok'))).then(tt.end),
stack: |
{STACK}
test: child test
...
1..1
# failed 1 test
not ok 1 - child test # {time}
1..1
# failed 1 test
`
exports[`test/test.js TAP short output checks child thrower bailout > child thrower 1`] = `
TAP version 13
# Subtest: child test
not ok 1 - ok
---
at:
line: #
column: #
file: test/test.js
source: |
tt.threw(new Error('ok'))).then(tt.end),
stack: |
{STACK}
test: child test
...
Bail out! # ok
BAILOUT: "# ok"
`
exports[`test/test.js TAP short output checks child thrower runOnly > child thrower 1`] = `
TAP version 13
ok 1 - child test # SKIP filter: only
1..1
# skip: 1
`
exports[`test/test.js TAP short output checks child end event thrower no options > child end event thrower 1`] = `
TAP version 13
# Subtest
1..1
ok 1 - should be equal
# end() event
ok 1 # {time}
not ok 2 - beep
---
at:
line: #
column: #
file: test/test.js
source: |
throw new Error('beep')
stack: |
{STACK}
...
1..2
# failed 1 of 2 tests
`
exports[`test/test.js TAP short output checks child end event thrower buffered > child end event thrower 1`] = `
TAP version 13
# Subtest
1..1
ok 1 - should be equal
# end() event
ok 1 # {time}
not ok 2 - beep
---
at:
line: #
column: #
file: test/test.js
source: |
throw new Error('beep')
stack: |
{STACK}
...
1..2
# failed 1 of 2 tests
`
exports[`test/test.js TAP short output checks child end event thrower bailout > child end event thrower 1`] = `
TAP version 13
# Subtest
1..1
ok 1 - should be equal
# end() event
ok 1 # {time}
not ok 2 - beep
---
at:
line: #
column: #
file: test/test.js
source: |
throw new Error('beep')
stack: |
{STACK}
...
Bail out! # beep
BAILOUT: "# beep"
`
exports[`test/test.js TAP short output checks child end event thrower runOnly > child end event thrower 1`] = `
TAP version 13
ok 1 - (unnamed test) # SKIP filter: only
1..1
# skip: 1
`
exports[`test/test.js TAP assertions and weird stuff error > error 1`] = `
TAP version 13
ok 1 - this is not an error
not ok 2 - this error is poop
---
at:
line: #
column: #
file: test/test.js
found:
name: Error
stack: |
{STACK}
message: 'fail: poop'
source: |
tt.error(new Error('fail: poop'), 'this error is poop')
stack: |
{STACK}
...
not ok 3 - fail: poop
---
at:
line: #
column: #
file: test/test.js
found:
name: Error
stack: |
{STACK}
message: 'fail: poop'
source: |
tt.error(new Error('fail: poop'))
stack: |
{STACK}
...
not ok 4 - this error is "poop"
---
at:
line: #
column: #
file: test/test.js
found: 'fail: poop'
source: |
tt.error('fail: poop', 'this error is "poop"')
stack: |
{STACK}
...
not ok 5 - non-Error error encountered
---
at:
line: #
column: #
file: test/test.js
found: 'fail: poop'
source: |
tt.error('fail: poop')
stack: |
{STACK}
...
ok 6 - should not error # TODO
ok 7 - should not error
1..7
# failed 4 of 7 tests
# todo: 1
`
exports[`test/test.js TAP assertions and weird stuff equal > equal 1`] = `
TAP version 13
not ok 1 - should be equal
---
at:
line: #
column: #
file: test/test.js
compare: ===
found: 1
source: |
tt.equal(1, 2)
stack: |
{STACK}
wanted: 2
...
not ok 2 - should be equal # SKIP
ok 3 - one is one
not ok 4 - should be equal
---
at:
line: #
column: #
file: test/test.js
compare: ===
found:
foo: 1
note: Objects never === one another
source: |
tt.equal({foo: 1}, {foo: 1})
stack: |
{STACK}
wanted:
foo: 1
...
1..4
# failed 3 of 4 tests
# skip: 1
`
exports[`test/test.js TAP assertions and weird stuff not > not 1`] = `
TAP version 13
ok 1 - should not be equal
ok 2 - should not be equal # SKIP
not ok 3 - one is not one
---
at:
line: #
column: #
file: test/test.js
compare: '!=='
doNotWant: 1
found: 1
source: |
tt.not(1, 1, 'one is not one')
stack: |
{STACK}
...
ok 4 - should not be equal
1..4
# failed 1 of 4 tests
# skip: 1
`
exports[`test/test.js TAP assertions and weird stuff same > same 1`] = `
TAP version 13
ok 1 - should be equivalent
ok 2 - should be equivalent
ok 3 - object exactness
not ok 4 - should be equivalent # SKIP
ok 5 - this one passes
ok 6 - should not be equivalent # SKIP
not ok 7 - this one fails
---
at:
line: #
column: #
file: test/test.js
doNotWant:
foo:
bar: '2'
found:
foo:
bar: 2
source: |
tt.notSame({ foo: { bar: 2 } }, { foo: { bar: '2' } },
stack: |
{STACK}
...
not ok 8 - should be equivalent strictly # SKIP
not ok 9 - should be equivalent strictly
---
at:
line: #
column: #
file: test/test.js
found:
- 1
- 2
- 3
source: |
tt.strictSame([1, 2, 3], ['1', '2', '3'])
stack: |
{STACK}
wanted:
- '1'
- '2'
- '3'
...
ok 10 - should be equivalent strictly
ok 11 - should be equivalent strictly
ok 12 - should not be equivalent strictly # SKIP
ok 13 - this one passes
ok 14 - this one passes
not ok 15 - this one fails
---
at:
line: #
column: #
file: test/test.js
doNotWant:
foo:
bar: 2
found:
foo:
bar: 2
source: |
tt.notStrictSame({ foo: { bar: 2 } }, { foo: { bar: 2 } },
stack: |
{STACK}
...
1..15
# failed 5 of 15 tests
# skip: 4
`
exports[`test/test.js TAP assertions and weird stuff match > match 1`] = `
TAP version 13
ok 1 - should match pattern provided
not ok 2 - should match pattern provided
---
at:
line: #
column: #
file: test/test.js
found:
a: b
c: /asdf/
pattern:
a: asdf
c: 1
source: |
tt.match({ a: 'b', c: /asdf/ }, { a: 'asdf', c: 1 })
stack: |
{STACK}
...
ok 3 - a message
not ok 4 - should match pattern provided # TODO
---
at:
line: #
column: #
file: test/test.js
found:
a: b
c: /asdf/
pattern:
a: asdf
c: 1
source: |
tt.match({ a: 'b', c: /asdf/ }, { a: 'asdf', c: 1 },
...
not ok 5 - should not match pattern provided
---
at:
line: #
column: #
file: test/test.js
found:
a: b
c: /asdf/
pattern:
a: 'function String() { [native code] }'
c: 'function RegExp() { [native code] }'
source: |
tt.notMatch({ a: 'b', c: /asdf/ }, { a: String, c: RegExp })
stack: |
{STACK}
...
ok 6 - should not match pattern provided
not ok 7 - a message
---
at:
line: #
column: #
file: test/test.js
found:
a: b
c: /asdf/
pattern:
a: 'function String() { [native code] }'
c: 'function RegExp() { [native code] }'
source: |
tt.notMatch({ a: 'b', c: /asdf/ }, { a: String, c: RegExp },
stack: |
{STACK}
...
ok 8 - should not match pattern provided # TODO
1..8
# failed 4 of 8 tests
# todo: 2
`
exports[`test/test.js TAP assertions and weird stuff type > type 1`] = `
TAP version 13
not ok 1 - this fails
---
at:
line: #
column: #
file: test/test.js
compare: ===
found: 'null'
source: |
tt.type(null, 'object', 'this fails')
stack: |
{STACK}
wanted: object
...
ok 2 - type is object
ok 3 - type is number
ok 4 - type is Test
not ok 5 - fails, anonymously
---
at:
line: #
column: #
file: test/test.js
found: Object
source: |
tt.type({}, function () {}, 'fails, anonymously')
stack: |
{STACK}
wanted: (anonymous constructor)
...
ok 6 - a thing is a thing
ok 7 - arrows are functions
ok 8 - arrows are functions
not ok 9 - fail: arrows are not objects
---
at:
line: #
column: #
file: test/test.js
compare: ===
found: function
source: |
tt.type(() => {}, Object, 'fail: arrows are not objects')
stack: |
{STACK}
wanted: Object
...
ok 10 - type is object
ok 11 - type is Test
ok 12 - type is EventEmitter
1..12
# failed 3 of 12 tests
`
exports[`test/test.js TAP assertions and weird stuff throws > throws 1`] = `
TAP version 13
ok 1 - expected to throw
ok 2 - expected to throw
ok 3 - expected to throw: TypeError x
ok 4 - expected to throw
ok 5 - expected to throw: Error x
ok 6 - expected to throw
ok 7 - expected to throw
ok 8 - expected to throw
ok 9 - expected to throw: Error noent
not ok 10 - fail: does not throw actually
---
at:
line: #
column: #
file: test/test.js
source: |
tt.throws(() => 'doesnt tho', 'fail: does not throw actually')
stack: |
{STACK}
...
ok 11 - expected to throw # SKIP
ok 12 - expected to throw
ok 13 - extra functions are no-ops for bw comp
ok 14 - todo # TODO
1..14
# failed 1 of 14 tests
# todo: 1
# skip: 1
`
exports[`test/test.js TAP assertions and weird stuff doesNotThrow > doesNotThrow 1`] = `
TAP version 13
ok 1 - this is fine
ok 2 - expected to not throw # TODO
ok 3 - reverse args
ok 4 - this is todo # TODO
not ok 5 - fail
---
at:
line: #
column: #
file: test/test.js
message: ouch
source: |
throw new Error('ouch')
stack: |
{STACK}
...
1..5
# failed 1 of 5 tests
# todo: 2
`
exports[`test/test.js TAP assertions and weird stuff rejects > rejects 1`] = `
TAP version 13
ok 1 - promise # {time} {
ok 1 - promise
1..1
}
ok 2 - fn returns promise # {time} {
ok 1 - fn returns promise
1..1
}
ok 3 - expect rejected Promise # {time} {
ok 1 - expect rejected Promise
1..1
}
ok 4 - expect rejected Promise # {time} {
ok 1 - expect rejected Promise
1..1
}
ok 5 - todo because no fn/promise # TODO
# next 2 also todo, no message
ok 6 - expect rejected Promise # TODO
ok 7 - expect rejected Promise # TODO
ok 8 - throws expected error: Error expected # {time} {
ok 1 - throws expected error: Error expected
1..1
}
ok 9 - throws expected error type # {time} {
ok 1 - throws expected error type
1..1
}
ok 10 - extra functions are no-ops # {time} {
ok 1 - extra functions are no-ops
1..1
}
ok 11 - extra args are no-ops # {time} {
ok 1 - extra args are no-ops
1..1
}
ok 12 - expect rejected Promise: Error noent # {time} {
ok 1 - expect rejected Promise: Error noent
1..1
}
ok 13 - expect rejected Promise: Error x # {time} {
ok 1 - expect rejected Promise: Error x
1..1
}
ok 14 - expect rejected Promise # {time} {
ok 1 - expect rejected Promise
1..1
}
ok 15 - expect rejected Promise # {time} {
ok 1 - expect rejected Promise
1..1
}
ok 16 - expect rejected Promise # {time} {
ok 1 - expect rejected Promise
1..1
}
not ok 17 - fail: no promise # {time} {
not ok 1 - fail: no promise
---
stack: |
{STACK}
...
1..1
# failed 1 test
}
not ok 18 - fail: no promise # {time} {
not ok 1 - fail: no promise
---
stack: |
{STACK}
...
1..1
# failed 1 test
}
not ok 19 - fail: passing promise # {time} {
not ok 1 - fail: passing promise
---
at:
line: #
column: #
file: test/test.js
found: 420
source: |
tt.rejects(new Promise(r => r(420)), 'fail: passing promise')
...
1..1
# failed 1 test
}
1..19
# failed 3 of 19 tests
# todo: 3
`
exports[`test/test.js TAP assertions and weird stuff resolves > resolves 1`] = `
TAP version 13
ok 1 - expect resolving Promise # {time} {
ok 1 - expect resolving Promise
1..1
}
ok 2 - expect resolving Promise # TODO
ok 3 - passing promise # {time} {
ok 1 - passing promise
1..1
}
ok 4 - passing promise fn # {time} {
ok 1 - passing promise fn
1..1
}
not ok 5 - fail: no promise # {time} {
not ok 1 - fail: no promise
---
at:
line: #
column: #
file: test/test.js
source: |
tt.resolves(() => {}, 'fail: no promise')
...
1..1
# failed 1 test
}
1..5
# failed 1 of 5 tests
# todo: 1
`
exports[`test/test.js TAP assertions and weird stuff resolveMatch > resolveMatch 1`] = `
TAP version 13
ok 1 - expect resolving Promise # {time} {
ok 1 - should match pattern provided
1..1
}
ok 2 - expect resolving Promise # TODO
ok 3 - promise # {time} {
ok 1 - should match pattern provided
1..1
}
not ok 4 - promise fn # {time} {
not ok 1 - promise fn
---
at:
line: #
column: #
file: test/test.js
source: |
tt.resolveMatch(() => new Promise(r => r(420)), 420, 'promise fn')
...
1..1
# failed 1 test
}
not ok 5 - fail: no promise # {time} {
not ok 1 - fail: no promise
---
at:
line: #
column: #
file: test/test.js
source: |
tt.resolveMatch(() => {}, {}, 'fail: no promise')
...
1..1
# failed 1 test
}
1..5
# failed 2 of 5 tests
# todo: 1
`
exports[`test/test.js TAP assertions and weird stuff test after end fails > test after end fails 1`] = `
TAP version 13
1..0
STDERR:
Error: test after end() was called
{STACK}
{ test: '', plan: 0 }
`
exports[`test/test.js TAP assertions and weird stuff plan excess > plan excess 1`] = `
TAP version 13
1..1
ok 1 - fine
STDERR:
Error: test count exceeds plan
{STACK}
{ test: '', plan: 1 }
`
exports[`test/test.js TAP assertions and weird stuff plan excess, ignored when failing > plan excess, ignored when failing 1`] = `
TAP version 13
1..1
not ok 1 - expected fail
# failed 1 test
`
exports[`test/test.js TAP assertions and weird stuff using the assertAt field > using the assertAt field 1`] = `
TAP version 13
1..1
not ok 1 - expect fail
---
at:
line: #
column: #
file: test/test.js
source: |
const baz = () => { tt.assertAt = stack.at(); bar() }
...
# failed 1 test
`
exports[`test/test.js TAP assertions and weird stuff using the assertStack field > using the assertStack field 1`] = `
TAP version 13
1..1
not ok 1 - expect fail
---
at:
line: #
column: #
file: test/test.js
source: |
const baz = () => { tt.assertStack = stack.captureString(80); bar() }
stack: |
{STACK}
...
# failed 1 test
`
exports[`test/test.js TAP assertions and weird stuff printResult > printResult 1`] = `
TAP version 13
ok 1 - this is fine
1..1
`
exports[`test/test.js TAP assertions and weird stuff printResult after plan end > printResult after plan end 1`] = `
TAP version 13
1..0
STDERR:
Error: test after end() was called
{STACK}
{ test: '', plan: 0 }
`
exports[`test/test.js TAP assertions and weird stuff plan, child test, explicit end > plan, child test, explicit end 1`] = `
TAP version 13
1..1
# Subtest
1..0
ok 1 # {time}
`
exports[`test/test.js TAP assertions and weird stuff end multiple times > end multiple times 1`] = `
TAP version 13
1..1
ok 1 - yes
STDERR:
Error: test end() method called more than once
{STACK}
{ test: '' }
`
exports[`test/test.js TAP assertions and weird stuff error event with domainEmitter re-throws > error event with domainEmitter re-throws 1`] = `
TAP version 13
ok 1 - the better to this.threw you with
1..1
`
exports[`test/test.js TAP assertions and weird stuff thrower after end > thrower after end 1`] = `
TAP version 13
# Subtest: child
1..1
ok 1 - this is fine
ok 1 - child # {time}
not ok 2 - catch it in the parent
---
at:
line: #
column: #
file: test/test.js
source: |
tt.threw(new Error('catch it in the parent'))
stack: |
{STACK}
test: child
...
1..2
# failed 1 of 2 tests
`
exports[`test/test.js TAP assertions and weird stuff child breaks a promise > child breaks a promise 1`] = `
TAP version 13
# Subtest: child
not ok 1 - poop
---
at:
line: #
column: #
file: test/test.js
source: |
tt.test('child', () => new Promise((_, r) => r(new Error('poop'))))
stack: |
{STACK}
test: child
...
1..1
# failed 1 test
not ok 1 - child # {time}
1..1
# failed 1 test
`
exports[`test/test.js TAP assertions and weird stuff child teardown throw > child teardown throw 1`] = `
TAP version 13
# Subtest: child
1..0
ok 1 - child # {time}
not ok 2 - fail
---
at:
line: #
column: #
file: test/test.js
source: |
tt.teardown(() => { throw new Error('fail') })
stack: |
{STACK}
test: child
...
1..2
# failed 1 of 2 tests
`
exports[`test/test.js TAP assertions and weird stuff fullname without main > fullname without main 1`] = `
TAP version 13
# Subtest: child
ok 1 - child
1..1
ok 1 - child # {time}
ok 2
1..2
`
exports[`test/test.js TAP assertions and weird stuff comment after end > comment after end 1`] = `
TAP version 13
1..0
# this is fine
`
exports[`test/test.js TAP assertions and weird stuff grep > grep 1`] = `
TAP version 13
# Subtest: parent
ok 1 - do not run this # SKIP filter: /x$/
# Subtest: but do run this x
ok 1 - do not run this # SKIP filter: /y$/
# Subtest: but do run this y
# Subtest: grand kids
1..0
ok 1 - grand kids # {time}
# Subtest: get all the
1..0
ok 2 - get all the # {time}
# Subtest: goodies
ok 1 - this is good
1..1
ok 3 - goodies # {time}
1..3
ok 2 - but do run this y # {time}
1..2
# skip: 1
ok 2 - but do run this x # {time}
1..2
# skip: 1
ok 1 - parent # {time}
1..1
`
exports[`test/test.js TAP assertions and weird stuff grepInvert > grepInvert 1`] = `
TAP version 13
# Subtest: parent
ok 1 - do not run this x # SKIP filter out: /x$/
# Subtest: but do run this
ok 1 - do not run this y # SKIP filter out: /y$/
# Subtest: but do run this
# Subtest: grand kids
1..0
ok 1 - grand kids # {time}
# Subtest: get all the
1..0
ok 2 - get all the # {time}
# Subtest: goodies
ok 1 - this is good
1..1
ok 3 - goodies # {time}
1..3
ok 2 - but do run this # {time}
1..2
# skip: 1
ok 2 - but do run this # {time}
1..2
# skip: 1
ok 1 - parent # {time}
1..1
`
exports[`test/test.js TAP assertions and weird stuff autoEnd > autoEnd 1`] = `
TAP version 13
# Subtest: this should automatically end
ok 1 - this is fine
ok 2 - also fine
1..2
ok 1 - this should automatically end # {time}
# Subtest: this should also end
ok 1 - this is fine
ok 2 - also fine
1..2
ok 2 - this should also end # {time}
# Subtest: autoend async 1
# Subtest: st
1..0
ok 1 - st # {time}
1..1
ok 3 - autoend async 1 # {time}
# Subtest: autoend async 2
# Subtest: st
1..0
ok 1 - st # {time}
1..1
ok 4 - autoend async 2 # {time}
# Subtest: autoend async limit
1..0
ok 5 - autoend async limit # {time}
not ok 6 - cannot create subtest after parent test end # {time}
---
autoend: true
stack: |
{STACK}
test: autoend async limit
...
1..6
# failed 1 of 6 tests
`
exports[`test/test.js TAP assertions and weird stuff endAll with test children > endAll with test children 1`] = `
TAP version 13
# Subtest: this is the test that never ends
# Subtest: it goes on and on my friend
ok 1 - this is ok
# Subtest: misbehaving child
not ok 1 - test unfinished
---
at:
line: #
column: #
file: test/test.js
source: |
tt.test('misbehaving child', () => new Promise(()=>{}))
stack: |
{STACK}
test: misbehaving child
...
1..1
# failed 1 test
not ok 2 - misbehaving child # {time}
1..2
# failed 1 of 2 tests
not ok 1 - it goes on and on my friend # {time}
ok 2 - some queue stuff
1..2
# failed 1 of 2 tests
not ok 1 - this is the test that never ends # {time}
1..1
# failed 1 test
`
exports[`test/test.js TAP assertions and weird stuff endAll with stdin > endAll with stdin 1`] = `
TAP version 13
# Subtest: /dev/stdin
ok - but not ended
not ok 2 - test unfinished
1..2
# failed 1 of 2 tests
not ok 1 - /dev/stdin # {time}
1..1
# failed 1 test
`
exports[`test/test.js TAP assertions and weird stuff endAll with bailout > endAll with bailout 1`] = `
TAP version 13
# Subtest: child
not ok 1 - not fine
---
at:
line: #
column: #
file: test/test.js
source: |
tt.fail('not fine')
stack: |
{STACK}
...
Bail out! # not fine
Bail out! # not fine
`
exports[`test/test.js TAP assertions and weird stuff bailout with indented subs > bailout with indented subs 1`] = `
TAP version 13
# Subtest: 1
1..0
ok 1 - 1 # {time}
# Subtest: 2
Bail out! whoops
`
exports[`test/test.js TAP assertions and weird stuff bailout with buffered subs > bailout with buffered subs 1`] = `
TAP version 13
ok 1 - 1 # {time} {
1..0
}
Bail out! whoops
`
exports[`test/test.js TAP assertions and weird stuff silent subs > silent subs 1`] = `
TAP version 13
# Subtest: child
1..0
ok 1 - child # {time}
# Subtest: child 2
1..0
ok 2 - child 2 # {time}
1..2
`
exports[`test/test.js TAP assertions and weird stuff beforeEach afterEach > beforeEach afterEach 1`] = `
TAP version 13
# Subtest: child
# Subtest: grandkid
1..0
ok 1 - grandkid # {time}
1..1
ok 1 - child # {time}
1..1
STDERR:
parent be child
parent be grandkid
child be grandkid
in test
child ae grandkid
parent ae grandkid
parent ae child
`
exports[`test/test.js TAP assertions and weird stuff timeout expiration > timeout expiration 1`] = `
TAP version 13
# Subtest: get lost buf=false
not ok 1 - timeout!
---
expired: get lost buf=false
stack: |
{STACK}
test: get lost buf=false
timeout: 50
...
1..1
# failed 1 test
not ok 1 - get lost buf=false # {time}
---
timeout: 50
...
not ok 2 - get lost buf=true # {time}
---
timeout: 50
...
{
not ok 1 - timeout!
---
expired: get lost buf=true
stack: |
{STACK}
test: get lost buf=true
timeout: 50
...
1..1
# failed 1 test
}
1..2
# failed 2 of 2 tests
`
exports[`test/test.js TAP assertions and weird stuff timeout with subs > timeout with subs 1`] = `
TAP version 13
# Subtest: get lost buf=false
# Subtest: carry on
not ok 1 - timeout!
---
expired: get lost buf=false
stack: |
{STACK}
test: carry on
...
1..1
# failed 1 test
not ok 1 - carry on # {time}
1..1
# failed 1 test
not ok 1 - get lost buf=false # {time}
---
timeout: 50
...
not ok 2 - get lost buf=true # {time}
---
timeout: 50
...
{
# Subtest: carry on
not ok 1 - timeout!
---
expired: get lost buf=true
stack: |
{STACK}
test: carry on
...
1..1
# failed 1 test
not ok 1 - carry on # {time}
1..1
# failed 1 test
}
1..2
# failed 2 of 2 tests
`
exports[`test/test.js TAP assertions and weird stuff timeout at the last tick > timeout at the last tick 1`] = `
TAP version 13
# Subtest: work it harder buf=false
1..1
ok 1 - this is fine
ok 1 - work it harder buf=false # {time}
not ok 2 - timeout! # {time}
---
expired: work it harder buf=false
stack: |
{STACK}
test: work it harder buf=false
timeout: 1
...
ok 3 - work it harder buf=true # {time} {
1..1
ok 1 - this is fine
}
not ok 4 - timeout!
---
expired: work it harder buf=true
stack: |
{STACK}
test: work it harder buf=true
timeout: 1
...
1..4
# failed 2 of 4 tests
`
exports[`test/test.js TAP addAssert > using the custom isUrl assertion 1`] = `
TAP version 13
not ok 1 - expect a valid http/https url
---
at:
line: #
column: #
file: test/test.js
found:
protocol: null
slashes: null
auth: null
host: null
port: null
hostname: null
hash: null
search: null
query: null
pathname: hello%20is%20not%20a%20url
path: hello%20is%20not%20a%20url
href: hello%20is%20not%20a%20url
pattern:
protocol: '/^https?:$/'
slashes: true
host: 'function String() { [native code] }'
path: /^\\/.*$/
source: |
tt.isUrl('hello is not a url')
stack: |
{STACK}
...
ok 2 - x is a url!
ok 3 - expect a valid http/https url # SKIP
1..3
# failed 1 of 3 tests
# skip: 1
`
exports[`test/test.js TAP snapshots > saving the snapshot 1`] = `
TAP version 13
# Subtest: child test
ok 1 - an object
ok 2 - string
ok 3 - must match snapshot # TODO later
1..3
# todo: 1
ok 1 - child test # {time}
1..1
`
exports[`test/test.js TAP snapshots > verifying the snapshot 1`] = `
TAP version 13
# Subtest: child test
ok 1 - an object
ok 2 - string
ok 3 - must match snapshot # TODO later
1..3
# todo: 1
ok 1 - child test # {time}
1..1
`
node-tap-11.0.0/test-legacy/ 0000775 0000000 0000000 00000000000 13206406237 0015524 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/test-legacy/asserts.js 0000664 0000000 0000000 00000015146 13206406237 0017555 0 ustar 00root root 0000000 0000000 var test = require('../').test
var Test = require('../lib/test.js')
var util = require('util')
var truthies = [ true, 1, 'ok', Infinity, function () {}, {}, [], /./ ]
var falsies = [ false, 0, '', NaN, null, undefined ]
test('NaN', function (t) {
t.same(NaN, NaN)
t.strictSame(NaN, NaN)
t.match(NaN, NaN)
t.end()
})
test('ok finds truthiness, notOk finds falsiness', function (t) {
var tt = new Test()
truthies.forEach(function (truthy) {
t.ok(truthy, util.inspect(truthy) + ' is truthy')
t.notOk(tt.ok(!truthy), util.inspect(truthy) + ' is not falsey')
})
falsies.forEach(function (falsey) {
t.notOk(falsey, util.inspect(falsey) + ' is falsey')
t.notOk(tt.ok(falsey), util.inspect(falsey) + ' is not truthy')
})
t.end()
})
test('error tests for errorness', function (t) {
var er = new Error('ok')
var tt = new Test()
var c = ''
tt.on('end', function () {
t.match(c, /non-Error error encountered/, 'warns about non-errors')
t.end()
})
tt.on('data', function (chunk) { c += chunk })
t.notOk(tt.error(er), 'fails when presented error')
var circular = {}
circular.circular = circular
t.notOk(tt.error(circular), 'fails when presented circular object')
falsies.forEach(function (falsey) {
t.error(falsey, 'passes with ' + util.inspect(falsey))
})
truthies.forEach(function (truthy) {
t.notOk(tt.error(truthy), 'fails with ' + util.inspect(truthy))
})
t.end()
})
test('throws expects to catch', function (t) {
var tt = new Test()
t.throws(function () {
throw 'x' // eslint-disable-line
})
t.throws('message first', function () { throw new Error('x') })
t.throws(function () { throw new Error('x') },
new Error('x'), 'test thrown result')
t.notOk(tt.throws(function () { throw new Error('x') },
new Error('y'), 'test thrown result'))
t.throws('test thrown result',
function () { throw new Error('x') },
new Error('x'), { foo: 'bar' })
t.notOk(tt.throws('test thrown result',
function () { throw new Error('x') },
new Error('y'), { foo: 'bar' }))
t.throws('test thrown non-Error object',
function () {
throw { ok: 'yup' } // eslint-disable-line
},
{ ok: 'yup' })
t.notOk(tt.throws('test thrown non-Error object',
function () {
throw { ok: 'yup' } // eslint-disable-line
},
{ ok: 'nope' }))
t.notOk(tt.throws(function () {}))
t.end()
})
test('doesNotThrow expects not to catch', function (t) {
var tt = new Test()
t.notOk(tt.doesNotThrow(function () {
throw 'x' // eslint-disable-line
}))
t.doesNotThrow(function () {})
t.doesNotThrow('this does not throw', function () {})
t.end()
})
test('equal is strict equality', function (t) {
var tt = new Test()
t.equal(1, 1, 'number 1')
t.equal('a', 'a', 'letter a')
t.notOk(tt.equal('1', 1), 'number 1 !== letter 1')
t.notOk(tt.equal({x: 1}, {x: 1}), 'similar objects not ===')
t.notOk(tt.equal(NaN, NaN), 'NaN cat')
var o = {x: 1}
t.equal(o, o, 'object identity')
t.end()
})
test('not is strict inequality', function (t) {
var tt = new Test()
t.notOk(tt.not(1, 1), 'number 1')
t.notOk(tt.not('a', 'a'), 'letter a')
t.not('1', 1, 'number 1 !== letter 1')
t.not({x: 1}, {x: 1}, 'similar objects not ===')
t.not(NaN, NaN, 'NaN cat')
var o = {x: 1}
t.notOk(tt.not(o, o), 'object identity')
t.end()
})
test('same is deep equivalence', function (t) {
var tt = new Test()
t.same({ x: 1 }, { x: 1 })
t.same({ x: '1' }, { x: 1 })
t.notOk(tt.same([1, 2], '1,2'))
t.notOk(tt.same({ x: 1, y: 2 }, { x: 1 }))
t.notOk(tt.same({ x: 1 }, { x: 1, y: 2 }))
t.same([1, 2], ['1', '2'])
t.same([1, '2'], ['1', 2])
t.end()
})
test('notSame is deep inequivalence', function (t) {
var tt = new Test()
t.notOk(tt.notSame({ x: 1 }, { x: 1 }))
t.notOk(tt.notSame({ x: '1' }, { x: 1 }))
t.not_same([1, 2], '1,2')
t.not_same({ x: 1, y: 2 }, { x: 1 })
t.not_same({ x: 1 }, { x: 1, y: 2 })
t.not_ok(tt.not_same([1, 2], ['1', '2']))
t.notOk(tt.not_same([1, '2'], ['1', 2]))
t.end()
})
test('strictSame is deep strict equality', function (t) {
var tt = new Test()
t.strictSame({ x: 1 }, { x: 1 })
t.notOk(tt.strictSame({ x: '1' }, { x: 1 }))
t.not_ok(tt.strict_same([1, 2], '1,2'))
t.not_ok(tt.strict_same({ x: 1, y: 2 }, { x: 1 }))
t.not_ok(tt.strict_same({ x: 1 }, { x: 1, y: 2 }))
t.not_ok(tt.strict_same([1, 2], ['1', '2']))
t.notOk(tt.strict_same([1, '2'], ['1', 2]))
t.strictSame([1, 2], [1, 2])
t.end()
})
test('strictNotSame is deep strict inequality', function (t) {
var tt = new Test()
t.notOk(tt.notStrictSame({ x: 1 }, { x: 1 }))
t.notStrictSame({ x: '1' }, { x: 1 })
t.not_strict_same([1, 2], '1,2')
t.not_strict_same({ x: 1, y: 2 }, { x: 1 })
t.not_strict_same({ x: 1 }, { x: 1, y: 2 })
t.not_strict_same([1, 2], ['1', '2'])
t.not_strict_same([1, '2'], ['1', 2])
t.notOk(tt.not_strict_same([1, 2], [1, 2]))
t.end()
})
test('match is pattern matching', function (t) {
var tt = new Test()
t.match('asdf', /sd./)
t.match('asdf', 'sd')
t.notOk(tt.match(/sd./, 'asdf'))
t.notOk(tt.match('asdf', 'xyz'))
t.match({ x: 1, y: 2 }, { x: 1 })
t.notOk(tt.match({ x: 1, y: 2 }, { x: 2 }))
t.match('asdf', 'asdf')
t.match('1', 1)
t.match(1, '1')
t.match([1, 2, 3], [1])
t.match([1, 2, 3], [1, Number, '3'])
// XXX debatable?
t.notOk(tt.match(1, [1]))
t.notOk(tt.match([1, 2, 3], 1))
t.end()
})
test('notMatch is pattern unmatching', function (t) {
var tt = new Test()
t.not_ok(tt.not_match('asdf', /sd./))
t.not_match(/sd./, 'asdf')
t.not_match('asdf', 'xyz')
t.not_ok(tt.not_match('asdf', 'sd'))
t.not_ok(tt.not_match({ x: 1, y: 2 }, { x: 1 }))
t.not_match({ x: 1, y: 2 }, { x: 2 })
t.not_ok(tt.not_match('asdf', 'asdf'))
t.not_ok(tt.not_match('1', 1))
t.not_ok(tt.not_match(1, '1'))
// XXX debatable?
t.not_match(1, [1])
t.not_match([1, 2, 3], 1)
t.end()
})
test('type is type checking', function (t) {
function fn () {}
t.type(fn, 'function')
t.type(fn, fn)
// t.type(fn, 'Function')
// t.type(fn, Function)
t.type(new Date(), 'object')
t.type(new Date(), 'Date')
t.type(new Date(), Date)
t.type(/./, 'object')
t.type(/./, 'RegExp')
t.type(/./, RegExp)
t.type('.', 'string')
function Parent () {}
function Child () {}
Child.prototype = Object.create(Parent.prototype, {
constructor: {
value: Child
}
})
var c = new Child()
t.type(c, 'object')
t.type(c, 'Child')
t.type(c, 'Parent')
t.type(c, 'Object')
t.type(c, Child)
t.type(c, Parent)
t.type(c, Object)
t.type(null, 'null')
t.type(null, null)
t.type(undefined, 'undefined')
t.type(undefined, undefined)
t.type(NaN, 'number')
t.end()
})
node-tap-11.0.0/test-legacy/buffer_compare.js 0000664 0000000 0000000 00000000400 13206406237 0021033 0 ustar 00root root 0000000 0000000 var test = require('../').test
test('same buffers', function (t) {
t.same(new Buffer([3, 4, 243]), new Buffer([3, 4, 243]))
t.end()
})
test('not same buffers', function (t) {
t.notSame(new Buffer([3, 5, 243]), new Buffer([3, 4, 243]))
t.end()
})
node-tap-11.0.0/test-legacy/common.js 0000664 0000000 0000000 00000002576 13206406237 0017364 0 ustar 00root root 0000000 0000000 exports.taps = [
'Tests for the foo module',
{
ok: true,
file: 'foo.js',
line: 8,
name: 'fooish test',
stack: new Error('fooish').stack
},
{
ok: false,
name: 'a test that the bar is barish',
file: 'bar.js',
line: 25,
expected: 'bar\nbar\nbaz',
actual: 'rab\nrib\nzib',
hash: {
more: '\nstuff\nhere\n',
regexp: /asdf/
}
},
'Quux module tests',
'This is a longer comment',
{
ok: true,
name: 'an easy one.'
},
{
ok: false,
name: 'bloooooo',
expected: 'blerggeyyy',
actual: 'blorggeyy'
},
{
ok: false,
name: 'array test',
expected: [
{
ok: true
},
{
ok: true
},
{
stack: new Error().stack
}
],
actual: [
1234567890,
123456789,
{
error: new Error('yikes')
}
]
},
{
ok: true,
name: 'nulltest',
expected: undefined,
actual: null
},
{
ok: true,
name: 'weird key test',
expected: 'weird key',
actual: 'weird key',
'this object': {
'has a ': 'weird key',
'and a looooooooonnnnnnnnnggg': 'jacket'
}
},
{
ok: true,
name: 'regexp test',
regexp: /asdf/,
function: function (a, b) { return a + b }
}
]
if (require.main === module) {
console.log('1..1')
console.log('ok 1 - just setup, nothing relevant')
}
node-tap-11.0.0/test-legacy/coverage-export.js 0000664 0000000 0000000 00000002552 13206406237 0021200 0 ustar 00root root 0000000 0000000 'use strict'
var t = require('../')
var spawn = require('child_process').spawn
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var testRe = /COVERAGE_SERVICE_TEST/
t.test('generate some coverage data', function (tt) {
spawn(node, [run, ok, '--coverage'], {
stdio: 'ignore'
}).on('close', function (code, signal) {
tt.equal(code, 0)
tt.equal(signal, null)
tt.end()
})
})
t.test('no coverage export when no tokens in env', function (tt) {
doTest(tt, {}, function (actual) {
tt.notMatch(actual, /Coveralls:coveralls_token\n/)
tt.end()
})
})
t.test('coverage to Coveralls', function (tt) {
var env = {
COVERALLS_REPO_TOKEN: 'coveralls_token'
}
doTest(tt, env, function (actual) {
tt.match(actual, /Coveralls:coveralls_token\n/)
tt.end()
})
})
function doTest (tt, env, cb) {
var args = [ run, '--no-coverage', '--coverage-report=text-lcov' ]
env.COVERAGE_SERVICE_TEST = 'true'
var output = ''
var child = spawn(node, args, {
stdio: [0, 'pipe', 2],
env: env
})
child.stdout.setEncoding('utf-8')
child.stdout.on('data', function (data) {
output += data
})
child.on('close', function (code, signal) {
tt.equal(code, 0)
tt.equal(signal, null)
tt.match(output, testRe)
cb(output.toString().split('FN:27,parseArgs')[0])
})
}
node-tap-11.0.0/test-legacy/coverage-html-no-browser.js 0000664 0000000 0000000 00000002345 13206406237 0022716 0 ustar 00root root 0000000 0000000 var cp = require('child_process')
var spawn = cp.spawn
var exec = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var t = require('../')
var fs = require('fs')
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
var dir = __dirname + '/coverage-html-no-browser'
var htmlfile = dir + '/coverage/lcov-report/bin/run.js.html'
t.test('setup a working dir', function (t) {
mkdirp.sync(dir)
t.end()
})
t.test('generate some coverage data', function (t) {
spawn(node, [run, ok, '--coverage', '--no-coverage-report'], {
cwd: dir,
stdio: 'ignore'
}).on('close', function (code, signal) {
t.equal(code, 0)
t.equal(signal, null)
t.end()
})
})
t.test('generate html, but do not open in a browser', function (t) {
spawn(node, [run, '--coverage-report=html', '--no-browser'], {
cwd: dir,
stdio: 'ignore'
}).on('close', function (code, signal) {
var output = fs.readFileSync(htmlfile, 'utf8')
t.match(output, /^/)
t.match(output, /Code coverage report for bin[\\\/]run\.js/)
t.equal(code, 0)
t.equal(signal, null)
t.end()
})
})
t.test('cleanup', function (t) {
rimraf.sync(dir)
t.end()
})
node-tap-11.0.0/test-legacy/deep-strict.js 0000664 0000000 0000000 00000001737 13206406237 0020315 0 ustar 00root root 0000000 0000000 var tap = require('../')
var test = tap.test
test("strictDeepEquals shouldn't care about key order", function (t) {
t.strictDeepEqual({ a: 1, b: 2 }, { b: 2, a: 1 })
t.end()
})
test("strictDeepEquals shouldn't care about key order recursively", function (t) {
t.strictDeepEqual(
{ x: { a: 1, b: 2 }, y: { c: 3, d: 4 } },
{ y: { d: 4, c: 3 }, x: { b: 2, a: 1 } }
)
t.end()
})
test("strictDeepEquals shoudn't care about key order (but still might)", function (t) {
t.strictDeepEqual(
[
{
foo: {
z: 100,
y: 200,
x: 300
}
},
'bar',
11,
{
baz: {
d: 4,
a: 1,
b: 2,
c: 3
}
}
],
[
{
foo: {
z: 100,
y: 200,
x: 300
}
},
'bar',
11,
{
baz: {
a: 1,
b: 2,
c: 3,
d: 4
}
}
]
)
t.end()
})
node-tap-11.0.0/test-legacy/deep.js 0000664 0000000 0000000 00000002311 13206406237 0016774 0 ustar 00root root 0000000 0000000 var tap = require('../')
var test = tap.test
test("deepEquals shouldn't care about key order and types", function (t) {
t.deepEqual({ a: 1, b: 2 }, { b: 2, a: '1' })
t.end()
})
test("deepEquals shouldn't care about key order recursively and types", function (t) {
t.deepEqual(
{ x: { a: 1, b: 2 }, y: { c: 3, d: 4 } },
{ y: { d: 4, c: 3 }, x: { b: '2', a: '1' } }
)
t.end()
})
test("deepEquals shouldn't care about key order (but still might) and types", function (t) {
t.deepEqual(
[
{
foo: {
z: 100,
y: 200,
x: 300
}
},
'bar',
11,
{
baz: {
d: 4,
a: 1,
b: 2,
c: 3
}
}
],
[
{
foo: {
z: 100,
y: 200,
x: 300
}
},
'bar',
11,
{
baz: {
a: '1',
b: '2',
c: '3',
d: '4'
}
}
]
)
t.end()
})
test("deepEquals shouldn't blow up on circular data structures", function (t) {
var x1 = { z: 4 }
var y1 = { x: x1 }
x1.y = y1
var x2 = { z: 4 }
var y2 = { x: x2 }
x2.y = y2
t.deepEquals(x1, x2)
t.end()
})
node-tap-11.0.0/test-legacy/executable-scripts.js 0000664 0000000 0000000 00000003116 13206406237 0021671 0 ustar 00root root 0000000 0000000 var t = require('../')
if (process.platform === 'win32') {
t.plan(0, 'shebangs and exe bits are unix only')
process.exit(0)
}
var spawn = require('child_process').spawn
var path = require('path')
var fs = require('fs')
var fixdir = path.resolve(__dirname, 'executable-scripts')
var executed = path.resolve(fixdir, 'executed.sh')
var notExecuted = path.resolve(fixdir, 'not-executed.sh')
var run = require.resolve('../bin/run.js')
var node = process.execPath
function cleanup () {
try { fs.unlinkSync(executed) } catch (e) {}
try { fs.unlinkSync(notExecuted) } catch (e) {}
try { fs.rmdirSync(fixdir) } catch (e) {}
}
t.test('setup', function (t) {
cleanup()
fs.mkdirSync(fixdir, '0755')
fs.writeFileSync(
executed,
'#!/bin/sh\n' +
'echo 1..1\n' +
'echo ok 1 File with executable bit should be executed\n'
)
fs.chmodSync(executed, '0755')
fs.writeFileSync(
notExecuted,
'#!/bin/sh\n' +
'echo 1..1\n' +
'echo not ok 1 File without executable bit should not be run\n' +
'exit 1\n'
)
fs.chmodSync(notExecuted, '0644')
t.end()
})
t.test('run tap bin on shell scripts', function (t) {
var args = [run, fixdir, '--bail', '--no-color', '-Rtap']
var child = spawn(node, args)
var output = ''
child.stdout.on('data', function (c) {
output += c
})
child.on('close', function (code, signal) {
t.equal(code, 0, 'exit 0')
t.equal(signal, null, 'no signal exit')
t.notMatch(output, /not-executed\.sh/, 'not-executed.sh not seen')
t.match(output, /executed\.sh/, 'executed.sh was seen')
t.end()
})
})
t.tearDown(cleanup)
node-tap-11.0.0/test-legacy/exit-code.js 0000664 0000000 0000000 00000003541 13206406237 0017746 0 ustar 00root root 0000000 0000000 var spawn = require('child_process').spawn
var node = process.execPath
var bin = require.resolve('../bin/run.js')
var test = require('../').test
var path = require('path')
var fixtures = path.resolve(__dirname, 'fixtures')
test('exit code 1 when tap results show failure', function (t) {
t.plan(3)
t.test('test exits 0, has failures', function (t) {
t.plan(2)
var file = path.resolve(fixtures, 'fail-zero-exit.js')
spawn(node, [bin, file]).on('exit', function (code) {
t.equal(code, 1)
})
spawn(node, [file]).on('exit', function (code) {
t.equal(code, 0)
})
})
t.test('test exits 1, has failures', function (t) {
t.plan(2)
var file = path.resolve(fixtures, 'fail-correct-exit.js')
spawn(node, [bin, file]).on('exit', function (code) {
t.equal(code, 1)
})
spawn(node, [file]).on('exit', function (code) {
t.equal(code, 1)
})
})
t.test('test exits 1, has no failures', function (t) {
t.plan(2)
var file = path.resolve(fixtures, 'fail-exit.js')
spawn(node, [bin, file]).on('exit', function (code) {
t.equal(code, 1)
})
spawn(node, [file]).on('exit', function (code) {
t.equal(code, 1)
})
})
})
test('successes exit 0', function (t) {
t.plan(2)
t.test('test that does nothing, but exits 0', function (t) {
t.plan(2)
var file = path.resolve(fixtures, 'trivial-success.js')
spawn(node, [bin, file]).on('exit', function (code) {
t.equal(code, 0)
})
spawn(node, [file]).on('exit', function (code) {
t.equal(code, 0)
})
})
t.test('test that succeeds, and exits 0', function (t) {
t.plan(2)
var file = path.resolve(fixtures, 'success.js')
spawn(node, [bin, file]).on('exit', function (code) {
t.equal(code, 0)
})
spawn(node, [file]).on('exit', function (code) {
t.equal(code, 0)
})
})
})
node-tap-11.0.0/test-legacy/expose-gc-test.js 0000664 0000000 0000000 00000001713 13206406237 0020733 0 ustar 00root root 0000000 0000000 var tap = require('../')
var cp = require('child_process')
var node = process.execPath
var run = require.resolve('../bin/run.js')
var path = require('path')
var dir = path.resolve(__dirname, '..')
var gcScript = require.resolve('./fixtures/gc-script.js')
var opt = { cwd: dir }
tap.test("gc test when the gc isn't there", function (t) {
t.plan(1)
var args = [run, gcScript]
cp.execFile(node, args, opt, function (err, stdo, stde) {
if (err) throw err
t.equal(stde, 'false\n')
})
})
tap.test('gc test when the gc should be there', function (t) {
var options = [
'--gc',
'--expose-gc',
'--node-arg=--expose_gc'
]
t.plan(options.length)
options.forEach(function (option) {
t.test('test for gc using ' + option, function (t) {
t.plan(1)
var args = [run, option, gcScript]
cp.execFile(node, args, opt, function (err, stdo, stde) {
if (err) throw err
t.equal(stde, 'true\n')
})
})
})
})
node-tap-11.0.0/test-legacy/fixtures/ 0000775 0000000 0000000 00000000000 13206406237 0017375 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/test-legacy/fixtures/assert.js 0000664 0000000 0000000 00000025435 13206406237 0021245 0 ustar 00root root 0000000 0000000 // http://wiki.commonjs.org/wiki/Unit_Testing/1.0
//
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
//
// Originally from narwhal.js (http://narwhaljs.org)
// Copyright (c) 2009 Thomas Robinson <280north.com>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the 'Software'), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict'
// UTILITY
var compare = process.binding('buffer').compare
var util = require('util')
var Buffer = require('buffer').Buffer
var pSlice = Array.prototype.slice
// 1. The assert module provides functions that throw
// AssertionError's when particular conditions are not met. The
// assert module must conform to the following interface.
var assert = module.exports = ok
// 2. The AssertionError is defined in assert.
// new assert.AssertionError({ message: message,
// actual: actual,
// expected: expected })
assert.AssertionError = function AssertionError (options) {
this.name = 'AssertionError'
this.actual = options.actual
this.expected = options.expected
this.operator = options.operator
if (options.message) {
this.message = options.message
this.generatedMessage = false
} else {
this.message = getMessage(this)
this.generatedMessage = true
}
var stackStartFunction = options.stackStartFunction || fail
Error.captureStackTrace(this, stackStartFunction)
}
// assert.AssertionError instanceof Error
util.inherits(assert.AssertionError, Error)
function truncate (s, n) {
if (typeof s === 'string') {
return s.length < n ? s : s.slice(0, n)
} else {
return s
}
}
function getMessage (self) {
return truncate(util.inspect(self.actual), 128) + ' ' +
self.operator + ' ' +
truncate(util.inspect(self.expected), 128)
}
// At present only the three keys mentioned above are used and
// understood by the spec. Implementations or sub modules can pass
// other keys to the AssertionError's constructor - they will be
// ignored.
// 3. All of the following functions must throw an AssertionError
// when a corresponding condition is not met, with a message that
// may be undefined if not provided. All assertion methods provide
// both the actual and expected values to the assertion error for
// display purposes.
function fail (actual, expected, message, operator, stackStartFunction) {
throw new assert.AssertionError({
message: message,
actual: actual,
expected: expected,
operator: operator,
stackStartFunction: stackStartFunction
})
}
// EXTENSION! allows for well behaved errors defined elsewhere.
assert.fail = fail
// 4. Pure assertion tests whether a value is truthy, as determined
// by !!guard.
// assert.ok(guard, message_opt)
// This statement is equivalent to assert.equal(true, !!guard,
// message_opt);. To test strictly for the value true, use
// assert.strictEqual(true, guard, message_opt);.
function ok (value, message) {
if (!value) fail(value, true, message, '==', assert.ok)
}
assert.ok = ok
// 5. The equality assertion tests shallow, coercive equality with
// ==.
// assert.equal(actual, expected, message_opt)
assert.equal = function equal (actual, expected, message) {
if (actual != expected) fail(actual, expected, message, '==', assert.equal) // eslint-disable-line
}
// 6. The non-equality assertion tests for whether two objects are not equal
// with != assert.notEqual(actual, expected, message_opt)
assert.notEqual = function notEqual (actual, expected, message) {
if (actual == expected) { // eslint-disable-line
fail(actual, expected, message, '!=', assert.notEqual)
}
}
// 7. The equivalence assertion tests a deep equality relation.
// assert.deepEqual(actual, expected, message_opt)
assert.deepEqual = function deepEqual (actual, expected, message) {
if (!_deepEqual(actual, expected, false)) {
fail(actual, expected, message, 'deepEqual', assert.deepEqual)
}
}
assert.deepStrictEqual = function deepStrictEqual (actual, expected, message) {
if (!_deepEqual(actual, expected, true)) {
fail(actual, expected, message, 'deepStrictEqual', assert.deepStrictEqual)
}
}
function _deepEqual (actual, expected, strict) {
// 7.1. All identical values are equivalent, as determined by ===.
if (actual === expected) {
return true
} else if (actual instanceof Buffer && expected instanceof Buffer) {
return compare(actual, expected) === 0
// 7.2. If the expected value is a Date object, the actual value is
// equivalent if it is also a Date object that refers to the same time.
} else if (util.isDate(actual) && util.isDate(expected)) {
return actual.getTime() === expected.getTime()
// 7.3 If the expected value is a RegExp object, the actual value is
// equivalent if it is also a RegExp object with the same source and
// properties (`global`, `multiline`, `lastIndex`, `ignoreCase`).
} else if (util.isRegExp(actual) && util.isRegExp(expected)) {
return actual.source === expected.source &&
actual.global === expected.global &&
actual.multiline === expected.multiline &&
actual.lastIndex === expected.lastIndex &&
actual.ignoreCase === expected.ignoreCase
// 7.4. Other pairs that do not both pass typeof value == 'object',
// equivalence is determined by ==.
} else if ((actual === null || typeof actual !== 'object') &&
(expected === null || typeof expected !== 'object')) {
return strict ? actual === expected : actual == expected // eslint-disable-line
// 7.5 For all other Object pairs, including Array objects, equivalence is
// determined by having the same number of owned properties (as verified
// with Object.prototype.hasOwnProperty.call), the same set of keys
// (although not necessarily the same order), equivalent values for every
// corresponding key, and an identical 'prototype' property. Note: this
// accounts for both named and indexed properties on Arrays.
} else {
return objEquiv(actual, expected, strict)
}
}
function isArguments (object) {
return Object.prototype.toString.call(object) === '[object Arguments]'
}
function objEquiv (a, b, strict) {
if (a === null || a === undefined || b === null || b === undefined) {
return false
}
// if one is a primitive, the other must be same
if (util.isPrimitive(a) || util.isPrimitive(b)) {
return a === b
}
if (strict && Object.getPrototypeOf(a) !== Object.getPrototypeOf(b)) {
return false
}
var aIsArgs = isArguments(a)
var bIsArgs = isArguments(b)
if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) {
return false
}
if (aIsArgs) {
a = pSlice.call(a)
b = pSlice.call(b)
return _deepEqual(a, b, strict)
}
var ka = Object.keys(a)
var kb = Object.keys(b)
var key, i
// having the same number of owned properties (keys incorporates
// hasOwnProperty)
if (ka.length !== kb.length) {
return false
}
// the same set of keys (although not necessarily the same order),
ka.sort()
kb.sort()
// ~~~cheap key test
for (i = ka.length - 1; i >= 0; i--) {
if (ka[i] !== kb[i]) {
return false
}
}
// equivalent values for every corresponding key, and
// ~~~possibly expensive deep test
for (i = ka.length - 1; i >= 0; i--) {
key = ka[i]
if (!_deepEqual(a[key], b[key], strict)) return false
}
return true
}
// 8. The non-equivalence assertion tests for any deep inequality.
// assert.notDeepEqual(actual, expected, message_opt)
assert.notDeepEqual = function notDeepEqual (actual, expected, message) {
if (_deepEqual(actual, expected, false)) {
fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual)
}
}
assert.notDeepStrictEqual = notDeepStrictEqual
function notDeepStrictEqual (actual, expected, message) {
if (_deepEqual(actual, expected, true)) {
fail(actual, expected, message, 'notDeepStrictEqual', notDeepStrictEqual)
}
}
// 9. The strict equality assertion tests strict equality, as determined by ===.
// assert.strictEqual(actual, expected, message_opt)
assert.strictEqual = function strictEqual (actual, expected, message) {
if (actual !== expected) {
fail(actual, expected, message, '===', assert.strictEqual)
}
}
// 10. The strict non-equality assertion tests for strict inequality, as
// determined by !==. assert.notStrictEqual(actual, expected, message_opt)
assert.notStrictEqual = function notStrictEqual (actual, expected, message) {
if (actual === expected) {
fail(actual, expected, message, '!==', assert.notStrictEqual)
}
}
function expectedException (actual, expected) {
if (!actual || !expected) {
return false
}
if (Object.prototype.toString.call(expected) === '[object RegExp]') {
return expected.test(actual)
} else if (actual instanceof expected) {
return true
} else if (expected.call({}, actual) === true) {
return true
}
return false
}
function _throws (shouldThrow, block, expected, message) {
var actual
if (typeof block !== 'function') {
throw new TypeError('block must be a function')
}
if (typeof expected === 'string') {
message = expected
expected = null
}
try {
block()
} catch (e) {
actual = e
}
message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
(message ? ' ' + message : '.')
if (shouldThrow && !actual) {
fail(actual, expected, 'Missing expected exception' + message)
}
if (!shouldThrow && expectedException(actual, expected)) {
fail(actual, expected, 'Got unwanted exception' + message)
}
if ((shouldThrow && actual && expected &&
!expectedException(actual, expected)) || (!shouldThrow && actual)) {
throw actual
}
}
// 11. Expected to throw an error:
// assert.throws(block, Error_opt, message_opt)
assert.throws = function (block, error, message) {
_throws.apply(this, [true].concat(pSlice.call(arguments)))
}
// EXTENSION! This is annoying to write outside this module.
assert.doesNotThrow = function (block, message) {
_throws.apply(this, [false].concat(pSlice.call(arguments)))
}
assert.ifError = function (err) { if (err) throw err }
node-tap-11.0.0/test-legacy/fixtures/cat.js 0000664 0000000 0000000 00000000043 13206406237 0020477 0 ustar 00root root 0000000 0000000 process.stdin.pipe(process.stdout)
node-tap-11.0.0/test-legacy/fixtures/dump-args.js 0000664 0000000 0000000 00000000312 13206406237 0021626 0 ustar 00root root 0000000 0000000 var t = require('../..')
function s (k) {
return k.map(JSON.stringify).join(' ').trim()
}
t.pass(process.execPath.replace(/\.exe$/i, '') + ' ' +
s(process.execArgv.concat(process.argv.slice(1))))
node-tap-11.0.0/test-legacy/fixtures/fail-correct-exit.js 0000664 0000000 0000000 00000000166 13206406237 0023257 0 ustar 00root root 0000000 0000000 console.log('TAP Version 13')
console.log('not ok - 1 and it will exit non-zero')
console.log('1..1')
process.exit(1)
node-tap-11.0.0/test-legacy/fixtures/fail-exit.js 0000664 0000000 0000000 00000000162 13206406237 0021614 0 ustar 00root root 0000000 0000000 console.log('TAP Version 13')
console.log('ok - 1 but it will exit non-zero')
console.log('1..1')
process.exit(1)
node-tap-11.0.0/test-legacy/fixtures/fail-zero-exit.js 0000664 0000000 0000000 00000000162 13206406237 0022571 0 ustar 00root root 0000000 0000000 console.log('TAP Version 13')
console.log('not ok - 1 but it will exit zero')
console.log('1..1')
process.exit(0)
node-tap-11.0.0/test-legacy/fixtures/gc-script.js 0000664 0000000 0000000 00000000033 13206406237 0021622 0 ustar 00root root 0000000 0000000 console.error(!!global.gc)
node-tap-11.0.0/test-legacy/fixtures/invalid-rc-file.yml 0000664 0000000 0000000 00000000021 13206406237 0023056 0 ustar 00root root 0000000 0000000 asdf: asdf: asdf
node-tap-11.0.0/test-legacy/fixtures/never-finish.js 0000664 0000000 0000000 00000000154 13206406237 0022330 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.pass('this is ok')
setInterval(function () {
t.pass('still going...')
}, 1000)
node-tap-11.0.0/test-legacy/fixtures/success.js 0000664 0000000 0000000 00000000123 13206406237 0021377 0 ustar 00root root 0000000 0000000 console.log('TAP version 13')
console.log('ok - 1 and exit 0')
console.log('1..1')
node-tap-11.0.0/test-legacy/fixtures/trivial-success.js 0000664 0000000 0000000 00000000001 13206406237 0023042 0 ustar 00root root 0000000 0000000
node-tap-11.0.0/test-legacy/fixtures/using-require-hook.faux 0000664 0000000 0000000 00000000054 13206406237 0024016 0 ustar 00root root 0000000 0000000 The actual content of this file is ignored.
node-tap-11.0.0/test-legacy/fixtures/using-require-hook.js 0000664 0000000 0000000 00000001155 13206406237 0023472 0 ustar 00root root 0000000 0000000 // We're simulating that some test failed in `using-require-hook.faux`
// which was compiled to a js module with more lines than the file on disk.
var Module = require('module')
var path = require('path')
var filename = path.resolve(__dirname, 'using-require-hook.faux')
var m = new Module(filename, module)
m.filename = filename
m.paths = Module._nodeModulePaths(path.dirname(filename))
m._compile('(' + runTapTest.toString() + ')()', filename)
function runTapTest () {
var tap = require('../..')
tap.test(function (t) {
t.plan(1)
t.equal(1, 2) // failing test so tap tries to find the source code
})
}
node-tap-11.0.0/test-legacy/fixtures/valid-rc-file.yml 0000664 0000000 0000000 00000000134 13206406237 0022534 0 ustar 00root root 0000000 0000000 # this is a comment
timeout: 9999
coverage: false
coverageReport: false
reporter: 'classic'
node-tap-11.0.0/test-legacy/independent-timeouts.js 0000664 0000000 0000000 00000001646 13206406237 0022235 0 ustar 00root root 0000000 0000000 // https://github.com/isaacs/node-tap/issues/23
var tap = require('../')
var test = tap.test
var Test = tap.Test
var isCI = !!process.env.CI
var long = 100
var med = 60
var short = 50
if (process.env.CI) {
long *= 10
med *= 10
short *= 10
}
if (process.env.APPVEYOR) {
long *= 2
med *= 2
short *= 2
}
test('finishes in time', {timeout: long}, function (t) {
var start = Date.now()
setTimeout(function () {
t.comment(Date.now() - start)
t.end()
}, med)
})
test('finishes in time too', {timeout: long}, function (t) {
var start = Date.now()
setTimeout(function () {
t.comment(Date.now() - start)
t.end()
}, med)
})
test('does not finish in time', function (t) {
t.plan(1)
var tt = new Test()
tt.test('timeout', { timeout: short }, function (ttt) {
setTimeout(function () {
ttt.fail('shouldve timed out')
ttt.end()
t.notOk(tt._ok)
}, med)
})
tt.end()
})
node-tap-11.0.0/test-legacy/nested-async.js 0000664 0000000 0000000 00000001361 13206406237 0020460 0 ustar 00root root 0000000 0000000 var test = require('../').test
test('Harness async test support', function (t) {
t.plan(3)
t.ok(true, 'sync child A')
t.test('sync child B', function (tt) {
tt.plan(2)
setTimeout(function () {
tt.test('async grandchild A', function (ttt) {
ttt.plan(1)
ttt.ok(true)
})
}, 50)
setTimeout(function () {
tt.test('async grandchild B', function (ttt) {
ttt.plan(1)
ttt.ok(true)
})
}, 100)
})
setTimeout(function () {
t.test('async child', function (tt) {
tt.plan(2)
tt.ok(true, 'sync grandchild in async child A')
tt.test('sync grandchild in async child B', function (ttt) {
ttt.plan(1)
ttt.ok(true)
})
})
}, 200)
})
node-tap-11.0.0/test-legacy/nested-test.js 0000664 0000000 0000000 00000000654 13206406237 0020326 0 ustar 00root root 0000000 0000000 var tap = require('../')
var test = tap.test
test('parent', function (t) {
// TODO: Make grandchildren tests count?
t.plan(3)
t.ok(true, 'p test')
t.test('subtest', function (t) {
t.ok(true, 'ch test')
t.test('nested subtest', function (t) {
t.ok(true, 'grch test')
t.end()
})
t.end()
})
t.test('another subtest', function (t) {
t.ok(true, 'ch test 2')
t.end()
})
t.end()
})
node-tap-11.0.0/test-legacy/non-enumerable-match.js 0000664 0000000 0000000 00000000325 13206406237 0022063 0 ustar 00root root 0000000 0000000 var t = require('../')
var e = Object.create(null, {
id: {
value: 1,
enumerable: false,
writable: false,
configurable: false
}
})
t.has(e, {id: 1})
var f = Object.create(e)
t.has(f, {id: 1})
node-tap-11.0.0/test-legacy/only-non-tap-output.js 0000664 0000000 0000000 00000001643 13206406237 0021757 0 ustar 00root root 0000000 0000000 if (process.argv[2] === 'child') {
console.log('this is the child bit')
} else if (process.argv[2] !== 'silent') {
var t = require('../')
var Test = t.Test
t.test('buffered', { buffered: true }, runTest)
t.test('unbuffered', { buffered: false }, runTest)
}
function runTest (t) {
t.plan(2)
var tt = new Test()
var out = ''
tt.on('data', function (c) {
out += c
})
tt.on('complete', function (res) {
t.has(res, {
ok: true,
count: 2,
pass: 2,
fail: 0,
bailout: false,
todo: 0,
skip: 2,
plan: {
start: 1,
end: 2,
skipAll: false,
skipReason: '',
comment: ''
},
failures: []
})
t.ok(tt.passing(), 'should still be passing')
})
var opt = { buffered: t.buffered }
tt.spawn(process.execPath, [__filename, 'child'], opt)
tt.spawn(process.execPath, [__filename, 'silent'], opt)
tt.end()
}
node-tap-11.0.0/test-legacy/rcfiles.js 0000664 0000000 0000000 00000003640 13206406237 0017514 0 ustar 00root root 0000000 0000000 var fs = require('fs')
var t = require('../')
var spawn = require('child_process').spawn
var node = process.execPath
var run = require.resolve('../bin/run.js')
// fake this one in case you have some weird stuff in ~/.taprc
var path = require('path')
process.env.HOME = path.resolve(__dirname, 'fixtures')
var osHomedir = require('os-homedir')
var defaults = {
grep: [],
grepInvert: false,
nodeArgs: [],
nycArgs: [],
testArgs: [],
timeout: 30,
color: false,
reporter: 'tap',
files: [],
bail: false,
saveFile: null,
pipeToService: false,
coverageReport: null,
browser: true,
coverage: false,
checkCoverage: false,
branches: 0,
functions: 0,
jobs: 1,
lines: 0,
statements: 0,
rcFile: osHomedir() + '/.taprc',
outputFile: null
}
function runTest (rcFile, expect) { return function (t) {
var env = {
HOME: process.env.HOME,
TAP_TIMEOUT: 30
}
if (rcFile) {
env.TAP_RCFILE = rcFile
expect.rcFile = rcFile
}
var child = spawn(node, [ run, '--dump-config' ], { env: env })
var out = ''
child.stdout.on('data', function (c) {
out += c
})
child.stderr.pipe(process.stderr)
t.plan(3)
child.on('close', function (code, sig) {
t.equal(code, 0)
t.equal(sig, null)
Object.keys(defaults).forEach(function (k) {
if (!expect.hasOwnProperty(k)) {
expect[k] = defaults[k]
}
})
t.strictSame(JSON.parse(out), expect)
})
}}
t.test('parseRcFile', function (t) {
t.test('nonexistent rc file uses defaults', runTest('./does/not/exist', {}))
t.test('invalid rc file uses defaults',
runTest('./test-legacy/fixtures/invalid-rc-file.yml', {}))
t.test('parses when valid yaml',
runTest('./test-legacy/fixtures/valid-rc-file.yml', {
timeout: 9999,
coverage: false,
coverageReport: false,
reporter: 'classic'
}))
t.test('uses homedir rcfile when none provided', runTest(null, {}))
t.end()
})
node-tap-11.0.0/test-legacy/require-hooks.js 0000664 0000000 0000000 00000001517 13206406237 0020663 0 ustar 00root root 0000000 0000000 var bin = require.resolve('../bin/run.js')
var execFile = require('child_process').execFile
var path = require('path')
var test = require('../').test
var fixtures = path.resolve(__dirname, 'fixtures')
var node = process.execPath
test('compile-to-js require hook', function (t) {
t.plan(1)
t.test('failing test with unmatched stack-trace', function (t) {
t.plan(6)
function verifyOutput (err, stdout, stderr) {
t.ok(!!err, 'Should have failed to run')
t.match(stdout, /file: .*[\\\/]using-require-hook\.faux/,
'error happened in the *.faux file')
t.notMatch(stdout, 'source:',
'omits the source because the line cannot be resolved')
}
var file = path.resolve(fixtures, 'using-require-hook.js')
execFile(node, [bin, file], verifyOutput)
execFile(node, [file], verifyOutput)
})
})
node-tap-11.0.0/test-legacy/root-no-tests.js 0000664 0000000 0000000 00000003255 13206406237 0020624 0 ustar 00root root 0000000 0000000 // verify that just loading tap doesn't cause it to
// print out some TAP stuff, unless an actual thing happens.
var t = require('../')
var spawn = require('child_process').spawn
switch (process.argv[2]) {
case 'child-plan':
childPlan()
break
case 'child-pragma':
childPragma()
break
case 'child-pipe':
childPipe()
break
case 'child-bail':
childBail()
break
case 'child-assert':
childAssert()
break
case 'child-nothing':
childNothing()
break
case undefined:
parent()
break
default:
throw new Error('oops')
}
function parent () {
t.test('non-zero plan has output', runTest('child-plan', true))
t.test('bailout has output', runTest('child-bail', true))
t.test('explicit pipe has output', runTest('child-pipe', true))
t.test('pragma has output', runTest('child-pragma', true))
t.test('assert has output', runTest('child-assert', true))
t.test('loading tap has no output', runTest('child-nothing', false))
}
function childPragma () {
t.pragma({ fine: true, ok: false })
}
function childPipe () {
t.pipe(process.stdout)
}
function childAssert () {
t.pass('this is fine')
}
function childBail () {
t.bailout('bo')
}
function childPlan () {
t.plan(2)
}
function childNothing () {
// nothing to see here
}
function runTest (arg, expectOutput) { return function (t) {
var node = process.execPath
var args = [__filename, arg]
var child = spawn(node, args)
var output = ''
child.stdout.on('data', function (c) {
output += c
})
child.on('close', function () {
if (expectOutput) {
t.notEqual(output.trim(), '')
} else {
t.equal(output, '')
}
t.end()
})
}}
node-tap-11.0.0/test-legacy/runner-bailout-args.js 0000664 0000000 0000000 00000004143 13206406237 0021764 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('bailout args', function (t) {
function bailTest (args, env, bail) {
return function (t) {
var out = ''
env = env || {}
env.TAP = 0
env.TAP_COLORS = 0
args = [run, notok, ok, '-C', '-Rclassic'].concat(args || [])
var child = spawn(node, args, { env: env })
child.stdout.on('data', function (o) {
out += o
})
child.on('close', function (code) {
t.equal(code, 1, 'code should be 1')
if (bail) {
t.match(out, bailRe, 'should show bail out')
t.notMatch(out, okre, 'should not run second test')
} else {
t.notMatch(out, bailRe, 'should not bail out')
t.match(out, okre, 'should run second test')
}
t.end()
})
}
}
t.test('force bailout with -b or --bail', function (t) {
t.test('-b', bailTest(['-b'], {}, true))
t.test('-Bb', bailTest(['-Bb'], {}, true))
t.test('--bail', bailTest(['--bail'], {}, true))
t.test('--no-bail --bail', bailTest(['--no-bail', '--bail'], {}, true))
t.test('TAP_BAIL=1', bailTest([], { TAP_BAIL: 1 }, true))
t.end()
})
t.test('do not bail out with -B or --no-bail', function (t) {
t.test('-B', bailTest(['-B'], {}, false))
t.test('-bB', bailTest(['-bB'], {}, false))
t.test('--no-bail', bailTest(['--no-bail'], {}, false))
t.test('--bail --no-bail', bailTest(['--bail', '--no-bail'], {}, false))
t.test('TAP_BAIL=0', bailTest([], { TAP_BAIL: 0 }, false))
t.end()
})
t.end()
})
node-tap-11.0.0/test-legacy/runner-colors.js 0000664 0000000 0000000 00000003430 13206406237 0020672 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('colors', function (t) {
function colorTest (args, env, hasColor) {
return function (t) {
var out = ''
env = env || {}
env.TAP = 0
args = [run, ok].concat(args || [])
var child = spawn(node, args, { env: env })
child.stdout.on('data', function (o) {
out += o
})
child.on('close', function (code) {
t.equal(code, 0, 'code should be 0')
if (hasColor) {
t.match(out, colorRe)
} else {
t.notMatch(out, colorRe)
}
t.end()
})
}
}
t.test('no colors by default for non-TTY',
colorTest([], {}, false))
t.test('force colors with -c or --color', function (t) {
;[ '-c', '--color' ].forEach(function (c) {
t.test(c, colorTest([c], {}, true))
})
t.end()
})
t.test('force no colors with -C or --no-color', function (t) {
;[ '-C', '--no-color' ].forEach(function (c) {
t.test(c, colorTest([c], {}, false))
})
t.end()
})
t.test('env.TAP_COLORS', function (t) {
t.test('0', colorTest([], { TAP_COLORS: 0 }, false))
t.test('1', colorTest([], { TAP_COLORS: 1 }, true))
t.end()
})
t.end()
})
node-tap-11.0.0/test-legacy/runner-dashdash.js 0000664 0000000 0000000 00000000660 13206406237 0021152 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
t.test('separate filename args with --', function (t) {
var args = [ run, '--', '-xyz', ok ]
var child = spawn(node, args)
child.on('close', function (code, signal) {
t.equal(code, 0)
t.equal(signal, null)
t.end()
})
})
node-tap-11.0.0/test-legacy/runner-epipe.js 0000664 0000000 0000000 00000003661 13206406237 0020501 0 ustar 00root root 0000000 0000000 var t = require('../')
if (process.env.TRAVIS) {
t.plan(0, 'skip on travis because this test is very timing dependent')
process.exit()
}
if (process.version.match(/^0\.1[02]\./)) {
t.plan(0, 'skip on old versions of node where child proc fds are flaky')
process.exit()
}
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('handle EPIPE gracefully', function (t) {
if (process.platform === 'win32') {
t.plan(0, 'signals on windows are weird')
return
}
t.comment('start epipe test')
var nodeHead = [
'var lines = 0',
'var buf = ""',
'process.stdin.on("data", function (c) {',
' c = (buf + c).split(/\\n|\\r/)',
' buf += c.pop()',
' for (var i = 0; i < c.length; i++) {',
' console.log(c[i])',
' if (++lines > 5) {',
' process.exit()',
' }',
' }',
'})'
].join('\n')
var head = spawn(node, ['-e', nodeHead], {
stdio: [ 'pipe', 'pipe', 2 ]
})
head.stdout.on('data', function (c) {
t.comment('got output from head bin: %j', c.toString())
})
t.comment('start child')
var child = spawn(node, [run, ok], {
stdio: [ 0, head.stdin, 'pipe' ]
})
var err = ''
child.stderr.on('data', function (c) {
console.error('got er data', c+'')
err += c
})
child.on('close', function (code, signal) {
t.equal(err, '', 'should not spew errors')
head.kill('SIGKILL')
t.end()
})
})
node-tap-11.0.0/test-legacy/runner-jobs.js 0000664 0000000 0000000 00000001532 13206406237 0020327 0 ustar 00root root 0000000 0000000 var t = require('../')
var spawn = require('child_process').spawn
var expect = {
jobs: require('os').cpus().length
}
var node = process.execPath
var run = require.resolve('../bin/run.js')
var args = [
['-J'],
['--jobs=99999', '-J'],
['--jobs-auto'],
['--jobs=99999', '--jobs-auto'],
[ '-JbC', { jobs: expect.jobs, bail: true, reporter: 'tap', color: false } ]
]
t.plan(args.length)
args.forEach(function (arg) {
var ex = expect
if (typeof arg[arg.length - 1] !== 'string')
ex = arg.pop()
t.test(arg.join(' '), function (t) {
var child = spawn(node, [run].concat(arg).concat('--dump-config'))
var out = ''
child.stdout.on('data', function (c) {
out += c
})
child.on('close', function (code, signal) {
t.notOk(code)
t.notOk(signal)
t.match(JSON.parse(out), ex)
t.end()
})
})
})
node-tap-11.0.0/test-legacy/runner-no-cov-args.js 0000664 0000000 0000000 00000002037 13206406237 0021526 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('--no-cov args', function (t) {
// this is a weird test, because we want to cover the
// --no-cov case, but still get coverage for it, so
// we test with --no-cov --coverage so it switches back.
var args = [
run, ok,
'--no-cov', '--no-coverage',
'--cov', '--coverage'
]
spawn(node, args).on('close', function (code, signal) {
t.equal(code, 0)
t.equal(signal, null)
t.end()
})
})
node-tap-11.0.0/test-legacy/runner-non-zero-exit.js 0000664 0000000 0000000 00000002117 13206406237 0022110 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('non-zero exit is reported as failure', function (t) {
var file = require.resolve('./test/ok-exit-fail.js')
var args = [run, file, '-Rclassic']
var child = spawn(node, args, { env: { TAP: 0 } })
var out = ''
child.stdout.on('data', function (c) {
out += c
})
child.on('close', function (code, signal) {
t.equal(code, 1)
t.equal(signal, null)
t.match(out, ' not ok ' + file)
t.match(out, /\n+\s+exitCode: 1\n/)
t.end()
})
})
node-tap-11.0.0/test-legacy/runner-nyc-args.js 0000664 0000000 0000000 00000002317 13206406237 0021117 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('--nyc stuff', function (t) {
t.test('--nyc-version', function (t) {
var expect = require('nyc/package.json').version + '\n'
execFile(node, [run, '--nyc-version'], function (err, stdout, stderr) {
if (err) {
throw err
}
t.equal(stderr, '')
t.equal(stdout, expect)
t.end()
})
})
t.test('--nyc-help', function (t) {
execFile(node, [run, '--nyc-help'], function (err, stdout, stderr) {
if (err) {
throw err
}
t.equal(stderr, '')
t.match(stdout, /check-coverage/)
t.end()
})
})
t.end()
})
node-tap-11.0.0/test-legacy/runner-output-file.js 0000664 0000000 0000000 00000002064 13206406237 0021650 0 ustar 00root root 0000000 0000000 var t = require('../')
var spawn = require('child_process').spawn
var run = require.resolve('../bin/run.js')
var fs = require('fs')
var node = process.execPath
var ok = require.resolve('./test/ok.js')
var args = [
'-ofile.txt',
'-Co file.txt',
'-bCco=file.txt',
'-o=file.txt',
'--output-file=file.txt',
'--output-file file.txt'
]
args.forEach(function (arg) {
t.test(arg, function (t) {
try { fs.unlinkSync('file.txt') } catch (er) {}
arg = arg.split(' ')
var child = spawn(node, [run, '-c', ok].concat(arg))
var gotStdout = false
child.stdout.on('data', function (c) {
gotStdout = true
})
child.stderr.on('data', function (c) {
throw new Error('should not write to stderr')
})
child.on('close', function (code, sig) {
t.equal(code, 0)
t.equal(sig, null)
t.ok(gotStdout, 'got standard output')
t.match(fs.readFileSync('file.txt', 'utf8'), /^TAP version 13\n/)
t.end()
})
})
})
t.test('cleanup', function (t) {
try { fs.unlinkSync('file.txt') } catch (er) {}
t.done()
})
node-tap-11.0.0/test-legacy/runner-path-globbing.js 0000664 0000000 0000000 00000002020 13206406237 0022100 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('path globbing', function (t) {
var glob = 'fixtures/*-success.js'
var opt = { env: { TAP: 1 }, cwd: __dirname }
var child = spawn(node, [run, glob], opt)
var out = ''
child.stdout.on('data', function (c) {
out += c
})
child.on('close', function (code) {
t.equal(code, 0, 'exits successfully')
t.match(out, /trivial-success.js/g, 'includes a matched file')
t.end()
})
})
node-tap-11.0.0/test-legacy/runner-read-stdin.js 0000664 0000000 0000000 00000007620 13206406237 0021430 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('read from stdin', { skip: process.platform === 'win32' && 'skip stdin test on windows' }, function (t) {
t.jobs = 4
function stripTime (s) {
return s.split(ok).join('test/test/ok.js')
.replace(/[0-9\.]+m?s/g, '{{TIME}}')
.replace(/\n\r/g, '\n')
}
var opt = { buffered: true }
var defaultExpect = ''
t.test('generated expected output', { buffered: false }, function (t) {
var args = [run, ok, '--reporter', 'spec']
var child = spawn(node, args, {
env: {
TAP: 0,
TAP_BAIL: 0
}
})
child.stdout.on('data', function (c) {
defaultExpect += c
})
child.on('close', function (code, signal) {
defaultExpect = stripTime(defaultExpect)
t.equal(code, 0)
t.equal(signal, null)
t.end()
})
})
function pipeTest (t, warn, repArgs, expect) {
var args = [run, ok]
var err = ''
var out = ''
var expectError = ''
if (warn) {
expectError = 'Reading TAP data from stdin (use "-" argument to suppress)\n'
}
var repClosed = false
var runClosed = true
var repChild = spawn(node, repArgs, {
env: {
TAP: 0,
TAP_BAIL: 0
}
})
var runChild = spawn(node, args, {
stdio: [ 0, repChild.stdin, 2 ],
env: {
TAP_BAIL: 0
}
})
repChild.stderr.on('data', function (c) {
err += c
})
repChild.stdout.on('data', function (c) {
out += c
})
runChild.on('exit', function (code, signal) {
t.equal(code, 0)
t.equal(signal, null)
t.notOk(repClosed)
repChild.stdin.end()
runClosed = true
})
repChild.on('close', function (code, signal) {
repClosed = true
t.ok(runClosed)
t.equal(code, 0)
t.equal(signal, null)
t.equal(err, expectError)
t.equal(stripTime(out), expect || defaultExpect)
t.end()
})
}
t.test('warns if - is not an arg', opt, function (t) {
pipeTest(t, true, [run, '--reporter=spec'])
})
t.test('does not warn if - is present', opt, function (t) {
pipeTest(t, false, [run, '--reporter=spec', '-'])
})
t.test('stdin along with files', opt, function (t) {
var expect = '\n' +
'test/test/ok.js\n' +
' nesting\n' +
' first\n' +
' ✓ true is ok\n' +
' ✓ doag is also okay\n' +
' second\n' +
' ✓ but that is ok\n' +
' ✓ this passes\n' +
' ✓ nested ok\n' +
'\n' +
' ✓ this passes\n' +
' ✓ this passes too\n' +
' async kid\n' +
' ✓ timeout\n' +
' ✓ timeout\n' +
'\n' +
' ✓ pass after async kid\n' +
'/dev/stdin\n' +
' test/test/ok.js\n' +
' nesting\n' +
' first\n' +
' ✓ true is ok\n' +
' ✓ doag is also okay\n' +
' second\n' +
' ✓ but that is ok\n' +
' ✓ this passes\n' +
' ✓ nested ok\n' +
' ✓ this passes\n' +
' ✓ this passes too\n' +
' async kid\n' +
' ✓ timeout\n' +
' ✓ timeout\n' +
' ✓ pass after async kid\n' +
'\n' +
'\n' +
' 20 passing ({{TIME}})\n'
pipeTest(t, false, [run, '--reporter', 'spec', '-', ok], expect)
})
t.end()
})
node-tap-11.0.0/test-legacy/runner-save-file.js 0000664 0000000 0000000 00000006437 13206406237 0021256 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
var saveFile = 'runner-save-test-' + process.pid
t.test('save-file', function (t) {
var bailoutOpts = [true, false]
t.plan(2)
bailoutOpts.forEach(function (b) {
t.test('bailout=' + b, runTest.bind(null, b))
})
function runTest (bailout, t) {
var n = 0
function saveFileTest (cb) {
var args = [run, '-s' + saveFile, notok, ok, '-CRclassic']
if (bailout) {
args.push('-b')
}
// also test the expanded versions for added coverage
if (++n === 1) {
args = [
run, '--save', saveFile,
notok, ok, '-C', '--reporter', 'classic'
]
}
var child = spawn(node, args, { env: { TAP: 0 }, stdio: [0, 'pipe', 2] })
var out = ''
child.stdout.on('data', function (c) {
out += c
})
child.on('close', function (code) {
cb(code, out)
})
}
t.test('run with "ok.js" in save file', function (t) {
fs.writeFileSync(saveFile, ok + '\n')
saveFileTest(function (code, out) {
t.equal(code, 0, 'should exit successfully')
t.match(out, okre, 'should run ok.js test')
t.notMatch(out, notokre, 'should not run not-ok.js test')
t.throws(function () {
fs.statSync(saveFile)
}, 'should delete save file')
t.end()
})
})
t.test('run with empty save file', function (t) {
saveFileTest(function (code, out) {
t.equal(code, 1, 'should fail test')
if (!bailout) {
t.match(out, okre, 'should run ok.js test')
} else {
t.notMatch(out, okre, 'should not run ok.js test')
}
t.match(out, notokre, 'should run not-ok.js test')
var saveRes = fs.readFileSync(saveFile, 'utf8')
if (!bailout) {
t.equal(saveRes, notok + '\n', 'should save not-ok.js')
} else {
t.equal(saveRes, notok + '\n' + ok + '\n', 'should save both files')
}
t.end()
})
})
t.test('run with "not-ok.js" in save file', function (t) {
saveFileTest(function (code, out) {
t.equal(code, 1, 'should fail test')
t.notMatch(out, okre, 'should not run ok.js test')
t.match(out, notokre, 'should run not-ok.js test')
var saveRes = fs.readFileSync(saveFile, 'utf8')
if (!bailout) {
t.equal(saveRes, notok + '\n', 'should save not-ok.js')
} else {
t.equal(saveRes, notok + '\n' + ok + '\n', 'should save both files')
}
t.end()
})
})
t.test('cleanup', function (t) {
fs.unlinkSync(saveFile)
t.end()
})
t.end()
}
})
t.test('cleanup', function (t) {
try { fs.unlinkSync(saveFile) } catch (er) {}
t.end()
})
node-tap-11.0.0/test-legacy/runner-test-args.js 0000664 0000000 0000000 00000002162 13206406237 0021303 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('--test-args', function (t) {
var file = require.resolve('./fixtures/dump-args.js')
var args = [
run,
'--test-arg=--x=y',
'--test-arg=-q',
'--test-arg=x',
file
]
execFile(node, args, function (err, stdout, stderr) {
if (err) {
throw err
}
t.equal(stderr, '')
var re = /ok 1 - .*[\/\\](node(js)?|iojs)(\.exe)? ".*[\\\/]dump-args.js" "--x=y" "-q" "x"$/im
t.match(stdout, re)
t.match(stdout, /^ok 1 - .*[\\\/]dump-args.js/m)
t.end()
})
})
node-tap-11.0.0/test-legacy/runner-timeout.js 0000664 0000000 0000000 00000003133 13206406237 0021057 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('-t or --timeout to set timeout', function (t) {
var nf = require.resolve('./fixtures/never-finish.js')
var args = [run, nf]
var dur = '.2'
if (global.__coverage__) {
dur = '.9'
}
var timers = [
'-t' + dur,
['-t', '0' + dur],
'-t=' + dur,
'--timeout=' + dur,
['--timeout', dur]
]
timers.forEach(function (timer) {
t.test([].concat(timer).join(' '), function (t) {
var child = spawn(node, args.concat(timer))
var out = ''
child.stdout.on('data', function (c) {
out += c
})
child.on('close', function (code, signal) {
var skip =
process.platform === 'win32' ? 'SIGTERM on windows is weird'
: process.version.match(/^v0\.10\./) ? 'v0.10 reports signals wrong'
: false
t.equal(code, 1)
t.equal(signal, null)
t.match(
out,
/signal: SIG(TERM|KILL)/,
{ skip: skip }
)
t.end()
})
})
})
t.end()
})
node-tap-11.0.0/test-legacy/runner-unknown-arg.js 0000664 0000000 0000000 00000002463 13206406237 0021644 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('unknown arg throws', function (t) {
// { arg: unknown }
var cases = {
'--wtf': '--wtf',
'-Bcav': '-a',
'-wtf': '-w'
}
Object.keys(cases).forEach(function (c) {
t.test(c, function (t) {
badArgTest(t, c, cases[c])
})
})
t.end()
function badArgTest (t, arg, error) {
var expectCode = process.version.match(/^v0\.10/) ? 8 : 1
var child = spawn(node, [run, arg])
var err = ''
child.stderr.on('data', function (c) {
err += c
})
child.on('close', function (code, signal) {
t.match(err, new RegExp('Error: Unknown argument: ' + error))
t.equal(code, expectCode)
t.equal(signal, null)
t.end()
})
}
})
node-tap-11.0.0/test-legacy/runner-usage.js 0000664 0000000 0000000 00000003241 13206406237 0020475 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('usage', function (t) {
function usageTest (t, child, c) {
var out = ''
var std = c === 0 ? 'stdout' : 'stderr'
child[std].on('data', function (o) {
out += o
})
child.on('close', function (code) {
t.equal(code, c, 'code should be ' + c)
t.match(out, /^Usage:\r?\n/, 'should print usage')
t.end()
})
}
var stdin = 0
if (!process.stdin.isTTY) {
try {
stdin = fs.openSync('/dev/tty', 'r')
} catch (er) {
stdin = null
}
}
var opt = { skip: stdin === null ? 'could not load tty' : false }
t.test('shows usage when stdin is a tty', opt, function (t) {
var child = spawn(node, [run], { stdio: [ stdin, 'pipe', 'pipe' ] })
usageTest(t, child, 1)
})
t.test('shows usage with -h (even with file)', function (t) {
var child = spawn(node, [run, '-h', __filename])
usageTest(t, child, 0)
})
t.test('shows usage with --help (even with file)', function (t) {
var child = spawn(node, [run, '--help', __filename])
usageTest(t, child, 0)
})
t.end()
})
node-tap-11.0.0/test-legacy/runner-version.js 0000664 0000000 0000000 00000002334 13206406237 0021060 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('version', function (t) {
var version = require('../package.json').version
function versionTest (arg) {
return function (t) {
var child = spawn(node, [run].concat(arg))
var out = ''
child.stdout.on('data', function (o) {
out += o
})
child.on('close', function (code, signal) {
t.equal(code, 0)
t.equal(signal, null)
t.equal(out, version + '\n')
t.end()
})
}
}
t.test('-v', versionTest('-v'))
t.test('--version', versionTest('--version'))
t.test('--version', versionTest(['--version', __filename]))
t.end()
})
node-tap-11.0.0/test-legacy/runner-warn-covering-stdin.js 0000664 0000000 0000000 00000002104 13206406237 0023266 0 ustar 00root root 0000000 0000000 var t = require('../')
var cp = require('child_process')
var spawn = cp.spawn
var execFile = cp.execFile
var node = process.execPath
var run = require.resolve('../bin/run.js')
var ok = require.resolve('./test/ok.js')
var notok = require.resolve('./test/not-ok.js')
var colorRe = new RegExp('\u001b\\[[0-9;]+m') // eslint-disable-line
var bailRe = new RegExp('^Bail out! # this is not ok$', 'm')
var okre = new RegExp('test[\\\\/]test[/\\\\]ok\\.js \\.+ 10/10( [0-9\.]+m?s)?$', 'm')
var notokre = new RegExp('test[\\\\/]test[/\\\\]not-ok\\.js \\.+ 0/[12]( [0-9\.]+m?s)?$', 'm')
var fs = require('fs')
var which = require('which')
t.test('warns when trying to cover stdin', function (t) {
var args = [run, '-', '--coverage']
var out = ''
var err = ''
var expect = 'Coverage disabled because stdin cannot be instrumented\n'
var child = spawn(node, args)
child.stdout.on('data', function (c) {
out += c
})
child.stderr.on('data', function (c) {
err += c
})
child.on('close', function (code, signal) {
t.equal(err, expect)
t.end()
})
child.stdin.end()
})
node-tap-11.0.0/test-legacy/spawn-failures.js 0000664 0000000 0000000 00000002446 13206406237 0021030 0 ustar 00root root 0000000 0000000 var cp = require('child_process')
var spawn = cp.spawn
cp.spawn = hijackedSpawn
var throwNow = false
var throwLater = false
function hijackedSpawn (cmd, args, options) {
if (throwNow) {
throw throwNow
}
var child = spawn.call(cp, cmd, args, options)
if (throwLater) {
setTimeout(function () {
child.emit('error', throwLater)
})
}
return child
}
var t = require('../')
var Test = t.Test
var ok = require.resolve('./test/ok.js')
t.test('handle throws from spawn()', function (t) {
throwNow = new Error('now is fine')
var output = ''
var tt = new Test()
tt.on('data', function (c) {
output += c
})
t.doesNotThrow(function spawn_throw_now () {
tt.spawn(process.execPath, [ok])
})
tt.end()
throwNow = false
t.comment(output)
t.notOk(tt.passing(), 'a failed spawn should fail the test')
t.end()
})
t.test('handle child process error event', function (t) {
throwLater = new Error('later is fine')
var output = ''
var tt = new Test()
tt.on('data', function (c) {
output += c
})
t.doesNotThrow(function spawn_throw_later () {
tt.spawn(process.execPath, [ok])
})
tt.end()
setTimeout(function () {
throwLater = false
t.comment(output)
t.notOk(tt.passing(), 'a failed spawn should fail the test')
t.end()
}, 100)
})
node-tap-11.0.0/test-legacy/test-args.js 0000664 0000000 0000000 00000003770 13206406237 0020002 0 ustar 00root root 0000000 0000000 var t = require('../')
var parseTestArgs = require('../lib/parse-test-args.js')
function namedFunction () {}
var fn = function () {}
function clone (o) {
return Object.keys(o).reduce(function (c, k) {
c[k] = o[k]
return c
}, {})
}
var obj = { thisIsMyObject: true }
var cobj = clone.bind(null, obj)
var objTodo = { thisIsMyObject: true, todo: true }
var cobjTodo = clone.bind(null, objTodo)
function runTest (args, expect) {
var result = parseTestArgs.apply(null, args)
t.match(result, expect)
}
function c (obj, props) {
return Object.keys(obj).reduce(function (p, k) {
if (!k in p)
p[k] = obj[k]
return p
}, props)
}
runTest(['name', cobj(), fn], c(cobj(), {name: 'name', cb: fn}))
runTest(['name', fn], { name: 'name', cb: fn })
runTest([cobj(), fn], c(cobj(), { name: /^(fn)?$/, cb: fn }))
runTest([cobj(), namedFunction], c(cobj(), { name: 'namedFunction', cb: namedFunction }))
runTest(['name', cobj()], c(cobjTodo(), { name: 'name' }))
runTest(['name'], { name: 'name', todo: true })
runTest([cobj()], c(cobjTodo(), { name: /^(fn)?$/ }))
runTest([fn], {name: /^(fn)?$/, cb: fn})
runTest([namedFunction], { name: 'namedFunction', cb: namedFunction })
runTest([], { name: /^(fn)?$/, todo: true })
var dn = 'defaultName'
var _ = undefined
runTest(['name', cobj(), fn, dn], c(cobj(), {name: 'name', cb: fn}))
runTest(['name', fn, _, dn], { name: 'name', cb: fn })
runTest([cobj(), fn, _, dn], c(cobj(), { name: /defaultName|fn/, cb: fn }))
runTest([cobj(), namedFunction, _, dn], c(cobj(), { name: 'namedFunction', cb: namedFunction }))
runTest(['name', cobj(), _, dn], c(cobjTodo(), { name: 'name' }))
runTest(['name', _, _, dn], { name: 'name', todo: true })
runTest([cobj(), _, _, dn], c(cobjTodo(), { name: /defaultName|fn/ }))
runTest([fn, _, _, dn], {name: /defaultName|fn/, cb: fn})
runTest([namedFunction, _, _, dn], { name: 'namedFunction', cb: namedFunction })
runTest([_, _, _, dn], { name: /defaultName|fn/, todo: true })
t.throws(function () {
runTest(['name', cobj(), 99], {})
})
node-tap-11.0.0/test-legacy/test-bail-buffer.js 0000664 0000000 0000000 00000000101 13206406237 0021205 0 ustar 00root root 0000000 0000000 var runTests = require('./test.js')
runTests('*.js', true, true)
node-tap-11.0.0/test-legacy/test-bail.js 0000664 0000000 0000000 00000000102 13206406237 0017737 0 ustar 00root root 0000000 0000000 var runTests = require('./test.js')
runTests('*.js', true, false)
node-tap-11.0.0/test-legacy/test-buffer.js 0000664 0000000 0000000 00000000102 13206406237 0020301 0 ustar 00root root 0000000 0000000 var runTests = require('./test.js')
runTests('*.js', false, true)
node-tap-11.0.0/test-legacy/test-test.js 0000664 0000000 0000000 00000010221 13206406237 0020012 0 ustar 00root root 0000000 0000000 var t = require('../')
var Test = t.Test
t.test('testing the test object', function (t) {
t.isa(t, Test, 'test object should be instanceof Test')
// now test all the methods.
;[
'isNotDeepEqual',
'equals',
'inequivalent',
'threw',
'strictEqual',
'emit',
'fail',
'strictEquals',
'notLike',
'dissimilar',
'true',
'assert',
'is',
'ok',
'isEqual',
'isDeeply',
'deepEqual',
'deepEquals',
'pass',
'isNotEqual',
'looseEquals',
'false',
'notDeeply',
'ifErr',
'hasFields',
'isNotDeeply',
'like',
'similar',
'notOk',
'isDissimilar',
'isEquivalent',
'doesNotEqual',
'isSimilar',
'notDeepEqual',
'type',
'notok',
'isInequivalent',
'isNot',
'same',
'isInequal',
'ifError',
'iferror',
'has',
'not',
'notSimilar',
'isUnlike',
'notEquals',
'unsimilar',
'doesNotThrow',
'error',
'constructor',
'notEqual',
'throws',
'isLike',
'isNotSimilar',
'isNotEquivalent',
'inequal',
'notEquivalent',
'isNotLike',
'equivalent',
'looseEqual',
'equal',
'unlike',
'doesNotHave',
'comment',
'isa'
].forEach(function (method) {
t.ok(t[method], 'should have ' + method + ' method')
t.isa(t[method], 'function', method + ' method should be a function')
})
t.end()
})
t.test('plan stuff', function (t) {
t.throws(function () {
var tt = new Test({ buffered: false })
tt.plan(1)
tt.plan(1)
}, new Error('Cannot set plan more than once'))
t.throws(function () {
var tt = new Test({ buffered: false })
tt.plan('foo')
}, new TypeError('plan must be a number'))
t.throws(function () {
var tt = new Test({ buffered: false })
tt.plan(-1)
}, new TypeError('plan must be a number'))
t.end()
})
t.test('invalid test arguments', function (t) {
t.throws(function () {
var tt = new Test({ buffered: false })
tt.test('name', { skip: false }, 'not a function')
}, new TypeError('unknown argument passed to parseTestArgs: string'))
t.end()
})
t.test('throws type', function (t) {
t.throws(function() {
throw new TypeError('some type error');
}, TypeError, 'should throw a TypeError');
var tt = new Test({ buffered: false })
t.notOk(tt.throws(function () {
throw new RangeError('x')
}, TypeError))
t.notOk(tt.throws(function () {
throw new RangeError('x')
}, new TypeError('x')))
t.throws(function () {
throw new SyntaxError('y')
}, { message: 'y' })
t.throws(function () {
throw new RangeError('x')
}, new Error('x'))
t.end()
})
t.test('test-point', function (t) {
var TestPoint = require('../lib/point.js')
t.throws(function () {
new TestPoint(100, 'century!', { flerg: 'blooze' })
}, new TypeError('ok must be boolean'))
var tp = new TestPoint(true, 'msg', { a: 1 })
t.isa(tp, TestPoint)
t.match(tp, {
ok: 'ok ',
message: '- msg\n'
})
t.match(new TestPoint(true, 'msg', { a: 1, diagnostic: true }), {
ok: 'ok ',
message: ' - msg\n ---\n a: 1\n ...\n\n'
})
t.match(new TestPoint(true, 'msg', { a: 1, tapChildBuffer: 'subtest output' }), {
ok: 'ok ',
message: ' - msg {\nsubtest output\n}\n\n'
})
t.end()
})
t.test('t.only', t => {
const tt = new Test({ runOnly: true })
tt.setEncoding('utf8')
tt.test('1', ttt => { ttt.fail('no'); ttt.end() })
tt.only('2', ttt => { ttt.pass('this is fine'); ttt.end() })
tt.test('3', ttt => { ttt.fail('not this either'); ttt.end() })
tt.end()
const output = tt.read()
t.match(output, /\nok 1 - 1 # SKIP filter: only\n/)
t.match(output, /\n ok 1 - this is fine\n/)
t.match(output, /\nok 3 - 3 # SKIP filter: only\n/)
t.end()
})
t.test('t.skip and t.todo', t => {
const tt = new Test()
tt.setEncoding('utf8')
tt.skip('1', ttt => { ttt.fail('no'); ttt.end() })
tt.test('2', ttt => { ttt.pass('this is fine'); ttt.end() })
tt.todo('3', ttt => { ttt.fail('not this either'); ttt.end() })
tt.end()
const output = tt.read()
t.match(output, /\nok 1 - 1 # SKIP\n/)
t.match(output, /\nok 3 - 3 # TODO\n/)
t.match(output, /\n ok 1 - this is fine\n/)
t.end()
})
node-tap-11.0.0/test-legacy/test.js 0000664 0000000 0000000 00000012205 13206406237 0017041 0 ustar 00root root 0000000 0000000 var glob = require('glob')
var t = require('../')
var spawn = require('child_process').spawn
var node = process.execPath
var fs = require('fs')
var dir = __dirname + '/test/'
var path = require('path')
var yaml = require('js-yaml')
process.env.TAP_BUFFER = 1
// don't turn on parallelization for `npm test`, because it also
// has coverage and this makes the spawn timeouts stuff break.
if (process.env.npm_lifecycle_event !== 'test')
t.jobs = 2
function regEsc (str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&')
}
module.exports = function (pattern, bail, buffer) {
pattern = path.basename(pattern)
glob.sync(dir + pattern).forEach(function (f) {
runTests(f, bail, buffer)
})
}
if (module === require.main) {
if (process.argv[2]) {
var bail, buffer
process.argv.slice(3).forEach(function (x) {
switch (x) {
case 'bail': return bail = true
case 'buffer': return buffer = true
case 'nobail': return bail = false
case 'nobuffer': return buffer = false
}
})
module.exports(process.argv[2], bail, buffer)
} else {
module.exports('*.js', false, false)
}
}
function runTests (file, bail, buffer) {
var bails = [ !!bail ]
var buffs = [ !!buffer ]
if (bail === undefined) {
bails = [ true, false ]
}
if (buffer === undefined) {
buffs = [ true, false ]
}
var skip = false
if (file.match(/\b(timeout.*|pending-handles)\.js$/)) {
if (process.env.TRAVIS) {
skip = 'timeout and handles tests too timing dependent for Travis'
} else if (process.platform === 'win32') {
skip = 'timeout and handles tests rely on sinals windows cannot do'
}
}
if (file.match(/\bsegv\b/)) {
if (process.platform === 'win32')
skip = 'skip segv on windows'
else if (process.env.TRAVIS)
skip = 'skip segv on CI'
}
if (file.match(/\bsigterm\b/)) {
if (process.version.match(/^v0\.10\./)) {
skip = 'sigterm handling test does not work on 0.10'
} else if (process.platform === 'win32') {
skip = 'sigterm handling is weird on windows'
}
}
var f = file.substr(dir.length)
t.test(f, { skip: skip }, function (t) {
t.plan(bails.length * buffs.length)
bails.forEach(function (bail) {
buffs.forEach(function (buff) {
t.test('bail=' + bail + ' buffer=' + buff, function (t) {
runTest(t, bail, buff, file)
})
})
})
})
}
function runTest (t, bail, buffer, file) {
var resfile = file.replace(/\.js$/,
(bail ? '--bail' : '') +
(buffer ? '--buffer' : '') +
'.tap')
var want
try {
want = fs.readFileSync(resfile, 'utf8').split(/\r?\n/)
} catch (er) {
// there isn't an output file for bail tests that pass.
if (bail)
return t.end()
else
throw er
}
var child = spawn(node, [file], {
stdio: [ 0, 'pipe', 'pipe' ],
env: {
TAP_BAIL: bail ? 1 : 0,
TAP_BUFFER: buffer ? 1 : 0,
PATH: process.env.PATH
}
})
var found = ''
child.stdout.setEncoding('utf8')
child.stdout.on('data', function (c) {
found += c
})
child.on('close', function (er) {
found = found.split(/\r?\n/)
var inyaml = false
var startlen = 0
var y = ''
// walk line by line so yamlish (json) can be handled
// otherwise making any changes in this lib would hurt
for (var f = 0, w = 0;
f < found.length && w < want.length;
f++, w++) {
var wline = want[w]
var fline = found[f]
var wdata = false
if (inyaml) {
if (fline.match(/^\s*\.\.\.$/) && fline.length === startlen) {
var data = yaml.safeLoad(y)
inyaml = false
y = ''
wdata = JSON.parse(wline)
patternify(wdata)
var msg = 'line ' + f + ' '
if (wline.length < 50)
msg += wline
else
msg += wline.substr(0, 45) + '...'
t.match(data, wdata, msg)
f--
} else {
y += fline + '\n'
w--
}
continue
} else {
t.match(fline, patternify(wline),
'line ' + f + ' ' +
wline.replace(/# (todo|skip)/gi, '- $1'),
{ test: f })
if (fline.match(/^\s*\-\-\-$/)) {
startlen = fline.length
inyaml = true
y = ''
}
}
if (!t.passing()) {
return t.end()
}
}
t.end()
})
}
function patternify (pattern, key) {
var root = !key
if (typeof pattern === 'object' && pattern) {
Object.keys(pattern).forEach(function (k) {
pattern[k] = patternify(pattern[k], k)
// sigbus an sigsegv are more or less the same thing.
if (root && k === 'signal' && pattern[k] === 'SIGBUS')
pattern[k] = /^SIG(BUS|SEGV)$/
})
return pattern
}
if (typeof pattern !== 'string') {
return pattern
}
var re = /___\/(.*?)\/~~~/
var match = pattern.match(re)
if (!match) {
return pattern
}
var pl = pattern.split('___/')
var p = '^' + regEsc(pl.shift())
pl.forEach(function (wlpart) {
var wlp = wlpart.split('/~~~')
p += wlp.shift()
p += regEsc(wlp.join('/~~~'))
})
p += '$'
return new RegExp(p)
}
node-tap-11.0.0/test-legacy/test/ 0000775 0000000 0000000 00000000000 13206406237 0016503 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/test-legacy/test/assert-at--bail--buffer.tap 0000664 0000000 0000000 00000000356 13206406237 0023426 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - foo ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - baz
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":14},"source":"blo(t)\n"}
...
Bail out! # baz
}
Bail out! # baz
node-tap-11.0.0/test-legacy/test/assert-at--bail.tap 0000664 0000000 0000000 00000000316 13206406237 0022076 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: foo
not ok 1 - baz
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":14},"source":"blo(t)\n"}
...
Bail out! # baz
Bail out! # baz
node-tap-11.0.0/test-legacy/test/assert-at--buffer.tap 0000664 0000000 0000000 00000001317 13206406237 0022442 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - foo ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - baz
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":14},"source":"blo(t)\n"}
...
not ok 2 - bler
---
{"at":{"column":5,"file":"test-legacy/test/assert-at.js","line":25},"source":"t.fail('bler')\n"}
...
not ok 3 - bar
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":10},"source":"baz(t)\n"}
...
not ok 4 - bar stack
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":10},"source":"baz(t)\n"}
...
1..4
# failed 4 of 4 tests
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/assert-at.js 0000664 0000000 0000000 00000000725 13206406237 0020750 0 ustar 00root root 0000000 0000000 // verify that stacks
var t = require('../..')
var stack = require('stack-utils')
function foo (t) {
bar(t)
}
function bar (t) {
baz(t)
}
function baz (t) {
blo(t)
}
function blo (t) {
t.assertStack = stack.captureString(blo)
t.assertAt = stack.at(blo)
bler(t)
}
function bler (t) {
t.fail('baz')
t.fail('bler')
t.assertAt = stack.at(baz)
t.fail('bar')
t.assertStack = stack.captureString(baz)
t.fail('bar stack')
t.end()
}
t.test(foo)
node-tap-11.0.0/test-legacy/test/assert-at.tap 0000664 0000000 0000000 00000001332 13206406237 0021113 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: foo
not ok 1 - baz
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":14},"source":"blo(t)\n"}
...
not ok 2 - bler
---
{"at":{"column":5,"file":"test-legacy/test/assert-at.js","line":25},"source":"t.fail('bler')\n"}
...
not ok 3 - bar
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":10},"source":"baz(t)\n"}
...
not ok 4 - bar stack
---
{"at":{"column":3,"file":"test-legacy/test/assert-at.js","line":10},"source":"baz(t)\n"}
...
1..4
# failed 4 of 4 tests
not ok 1 - foo ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/assert-todo-skip--buffer.tap 0000664 0000000 0000000 00000001535 13206406237 0023751 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - not much ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - always passes # SKIP skip it good
not ok 2 - false # SKIP always fails
ok 3 - bonus # TODO remove todo directive
not ok 4 - expected # TODO implement a thing
---
{"at":{"column":5,"file":"test-legacy/test/assert-todo-skip.js","line":7},"source":"t.ok(false, 'expected', {todo: 'implement a thing'})\n"}
...
ok 5 - always passes without explanation # SKIP
not ok 6 - false without explanation # SKIP
ok 7 - bonus without explanation # TODO
not ok 8 - expected without explanation # TODO
---
{"at":{"column":5,"file":"test-legacy/test/assert-todo-skip.js","line":11},"source":"t.ok(false, 'expected without explanation', {todo: true})\n"}
...
1..8
# todo: 4
# skip: 4
}
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/assert-todo-skip.js 0000664 0000000 0000000 00000001011 13206406237 0022242 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('not much', function (t) {
t.ok(true, 'always passes', {skip: 'skip it good'})
t.ok(false, 'false', {skip: 'always fails'})
t.ok(true, 'bonus', {todo: 'remove todo directive'})
t.ok(false, 'expected', {todo: 'implement a thing'})
t.ok(true, 'always passes without explanation', {skip: true})
t.ok(false, 'false without explanation', {skip: true})
t.ok(true, 'bonus without explanation', {todo: true})
t.ok(false, 'expected without explanation', {todo: true})
t.end()
})
node-tap-11.0.0/test-legacy/test/assert-todo-skip.tap 0000664 0000000 0000000 00000001555 13206406237 0022427 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: not much
ok 1 - always passes # SKIP skip it good
not ok 2 - false # SKIP always fails
ok 3 - bonus # TODO remove todo directive
not ok 4 - expected # TODO implement a thing
---
{"at":{"column":5,"file":"test-legacy/test/assert-todo-skip.js","line":7},"source":"t.ok(false, 'expected', {todo: 'implement a thing'})\n"}
...
ok 5 - always passes without explanation # SKIP
not ok 6 - false without explanation # SKIP
ok 7 - bonus without explanation # TODO
not ok 8 - expected without explanation # TODO
---
{"at":{"column":5,"file":"test-legacy/test/assert-todo-skip.js","line":11},"source":"t.ok(false, 'expected without explanation', {todo: true})\n"}
...
1..8
# todo: 4
# skip: 4
ok 1 - not much ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/async--buffer.tap 0000664 0000000 0000000 00000000336 13206406237 0021654 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - first test ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is ok
1..1
}
ok 2 - second test (async) ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is ok
1..1
}
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/async.js 0000664 0000000 0000000 00000000330 13206406237 0020152 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('first test', function (t) {
t.pass('this is ok')
t.end()
})
setTimeout(function () {
t.test('second test (async)', function (t) {
t.pass('this is ok')
t.end()
})
})
node-tap-11.0.0/test-legacy/test/async.tap 0000664 0000000 0000000 00000000413 13206406237 0020324 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: first test
ok 1 - this is ok
1..1
ok 1 - first test ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second test (async)
ok 1 - this is ok
1..1
ok 2 - second test (async) ___/# time=[0-9.]+(ms)?/~~~
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/bail-child--bail--buffer.tap 0000664 0000000 0000000 00000000551 13206406237 0023510 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - bail fail ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - failer ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - this fails
---
{"at":{"column":7,"file":"test-legacy/test/bail-child.js","line":7},"source":"t.fail('this fails')\n"}
...
Bail out! # this fails
}
}
Bail out! # this fails
node-tap-11.0.0/test-legacy/test/bail-child--bail.tap 0000664 0000000 0000000 00000000445 13206406237 0022166 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: bail fail
# Subtest: failer
not ok 1 - this fails
---
{"at":{"column":7,"file":"test-legacy/test/bail-child.js","line":7},"source":"t.fail('this fails')\n"}
...
Bail out! # this fails
Bail out! # this fails
node-tap-11.0.0/test-legacy/test/bail-child--buffer.tap 0000664 0000000 0000000 00000000551 13206406237 0022526 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - bail fail ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - failer ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - this fails
---
{"at":{"column":7,"file":"test-legacy/test/bail-child.js","line":7},"source":"t.fail('this fails')\n"}
...
Bail out! # this fails
}
}
Bail out! # this fails
node-tap-11.0.0/test-legacy/test/bail-child.js 0000664 0000000 0000000 00000000521 13206406237 0021027 0 ustar 00root root 0000000 0000000 // test that failOnBail is contagious to child processes
var t = require('../..')
t.test('bail fail', { bail: true }, function (t) {
t.test('failer', function (t) {
t.fail('this fails')
t.ok('should not see this')
t.end()
})
t.end()
})
t.test('this should never happen', function (t) {
t.fail('nope')
t.end()
})
node-tap-11.0.0/test-legacy/test/bail-child.tap 0000664 0000000 0000000 00000000445 13206406237 0021204 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: bail fail
# Subtest: failer
not ok 1 - this fails
---
{"at":{"column":7,"file":"test-legacy/test/bail-child.js","line":7},"source":"t.fail('this fails')\n"}
...
Bail out! # this fails
Bail out! # this fails
node-tap-11.0.0/test-legacy/test/bail-error-object--bail--buffer.tap 0000664 0000000 0000000 00000000051 13206406237 0025015 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! TypeError: wat
node-tap-11.0.0/test-legacy/test/bail-error-object--bail.tap 0000664 0000000 0000000 00000000051 13206406237 0023471 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! TypeError: wat
node-tap-11.0.0/test-legacy/test/bail-error-object--buffer.tap 0000664 0000000 0000000 00000000051 13206406237 0024033 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! TypeError: wat
node-tap-11.0.0/test-legacy/test/bail-error-object.js 0000664 0000000 0000000 00000000273 13206406237 0022345 0 ustar 00root root 0000000 0000000 var t = require('../..')
var EE = require('events').EventEmitter
var ee = new EE()
ee.on('error', t.bailout.bind(t))
setTimeout(function () {
ee.emit('error', new TypeError('wat'))
})
node-tap-11.0.0/test-legacy/test/bail-error-object.tap 0000664 0000000 0000000 00000000051 13206406237 0022507 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! TypeError: wat
node-tap-11.0.0/test-legacy/test/bail-fail-spawn--bail--buffer.tap 0000664 0000000 0000000 00000002071 13206406237 0024465 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - bail fail ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/nesting.js ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~nesting.js"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1}
...
{
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
}
}
}
}
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/bail-fail-spawn--bail.tap 0000664 0000000 0000000 00000001440 13206406237 0023140 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: bail fail
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/nesting.js
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/bail-fail-spawn--buffer.tap 0000664 0000000 0000000 00000002071 13206406237 0023503 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - bail fail ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/nesting.js ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~nesting.js"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1}
...
{
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
}
}
}
}
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/bail-fail-spawn.js 0000664 0000000 0000000 00000000444 13206406237 0022011 0 ustar 00root root 0000000 0000000 // test that failOnBail is contagious to child processes
var t = require('../..')
t.test('bail fail', { bail: true }, function (t) {
t.spawn(process.execPath, [require.resolve('./nesting.js')])
t.end()
})
t.test('this should never happen', function (t) {
t.fail('nope')
t.end()
})
node-tap-11.0.0/test-legacy/test/bail-fail-spawn.tap 0000664 0000000 0000000 00000001440 13206406237 0022156 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: bail fail
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/nesting.js
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/bail-teardown--bail--buffer.tap 0000664 0000000 0000000 00000000240 13206406237 0024243 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - child test point
1..1
}
Bail out! i did not want to be torn down
node-tap-11.0.0/test-legacy/test/bail-teardown--bail.tap 0000664 0000000 0000000 00000000255 13206406237 0022725 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
# Subtest: child
ok 1 - child test point
1..1
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~
Bail out! i did not want to be torn down
node-tap-11.0.0/test-legacy/test/bail-teardown--buffer.tap 0000664 0000000 0000000 00000000240 13206406237 0023261 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - child test point
1..1
}
Bail out! i did not want to be torn down
node-tap-11.0.0/test-legacy/test/bail-teardown-async--bail--buffer.tap 0000664 0000000 0000000 00000000145 13206406237 0025362 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
Bail out! teardown fail
node-tap-11.0.0/test-legacy/test/bail-teardown-async--bail.tap 0000664 0000000 0000000 00000000212 13206406237 0024031 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: foobar test
1..0
ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~
# Subtest: barfoo
Bail out! teardown fail
node-tap-11.0.0/test-legacy/test/bail-teardown-async--buffer.tap 0000664 0000000 0000000 00000000145 13206406237 0024400 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
Bail out! teardown fail
node-tap-11.0.0/test-legacy/test/bail-teardown-async.js 0000664 0000000 0000000 00000000611 13206406237 0022702 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('foobar test', function (t) {
t.tearDown(function () {
setTimeout(function () {
t.bailout('teardown fail')
})
})
t.end()
})
t.test('barfoo', function (t) {
return t.test('barfoo2', function (t) {
return t.test('barf3', function (t) {
return t.test('b3rf', function (t) {
setTimeout(t.end, 1000)
})
})
})
})
node-tap-11.0.0/test-legacy/test/bail-teardown-async.tap 0000664 0000000 0000000 00000000212 13206406237 0023047 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: foobar test
1..0
ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~
# Subtest: barfoo
Bail out! teardown fail
node-tap-11.0.0/test-legacy/test/bail-teardown.js 0000664 0000000 0000000 00000000307 13206406237 0021571 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.pass('this is fine')
t.test(function child (t) {
t.pass('child test point')
t.tearDown(function () {
t.bailout('i did not want to be torn down')
})
t.end()
})
node-tap-11.0.0/test-legacy/test/bail-teardown.tap 0000664 0000000 0000000 00000000255 13206406237 0021743 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
# Subtest: child
ok 1 - child test point
1..1
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~
Bail out! i did not want to be torn down
node-tap-11.0.0/test-legacy/test/bailout--buffer.tap 0000664 0000000 0000000 00000001146 13206406237 0022176 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
1..2
}
}
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/bailout.js","line":19},"source":"t.fail('this fails')\n"}
...
not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
Bail out! # # # cannot continue
}
Bail out! # # # cannot continue
node-tap-11.0.0/test-legacy/test/bailout-with-stuff-after--bail--buffer.tap 0000664 0000000 0000000 00000000047 13206406237 0026354 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! this is fine
node-tap-11.0.0/test-legacy/test/bailout-with-stuff-after--bail.tap 0000664 0000000 0000000 00000000047 13206406237 0025030 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! this is fine
node-tap-11.0.0/test-legacy/test/bailout-with-stuff-after--buffer.tap 0000664 0000000 0000000 00000000047 13206406237 0025372 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! this is fine
node-tap-11.0.0/test-legacy/test/bailout-with-stuff-after.js 0000664 0000000 0000000 00000000310 13206406237 0023667 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.bailout('this is fine')
t.plan(9999)
t.test('nope', function (t) {
throw new Error('should not get here')
})
t.throws(function () {}, 'did not throw')
t.end()
t.plan(100)
node-tap-11.0.0/test-legacy/test/bailout-with-stuff-after.tap 0000664 0000000 0000000 00000000047 13206406237 0024046 0 ustar 00root root 0000000 0000000 TAP version 13
Bail out! this is fine
node-tap-11.0.0/test-legacy/test/bailout.js 0000664 0000000 0000000 00000001225 13206406237 0020500 0 ustar 00root root 0000000 0000000 var Test = require('../../lib/test.js')
var t = new Test()
t.test('nesting', function (t) {
t.plan(2)
t.test('first', function (tt) {
tt.plan(2)
tt.ok(true, 'true is ok')
tt.ok('doeg', 'doag is also okay')
})
t.test('second', function (tt) {
tt.ok('no plan', 'but that is ok')
tt.pass('this passes')
tt.end()
})
})
t.pass('this passes')
t.fail('this fails')
t.test('async kid', function (t) {
t.plan(2)
setTimeout(function () {
t.pass('first timeout', { foo: 'blz' })
}, 50)
setTimeout(function () {
t.bailout('# # # cannot continue')
})
})
t.pass('pass after async kid')
t.end()
t.pipe(process.stdout)
node-tap-11.0.0/test-legacy/test/bailout.tap 0000664 0000000 0000000 00000001165 13206406237 0020653 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
1..2
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/bailout.js","line":19},"source":"t.fail('this fails')\n"}
...
# Subtest: async kid
1..2
Bail out! # # # cannot continue
Bail out! # # # cannot continue
node-tap-11.0.0/test-legacy/test/before-after-each--buffer.tap 0000664 0000000 0000000 00000001010 13206406237 0023764 0 ustar 00root root 0000000 0000000 0
TAP version 13
before 1 parent
2
# Subtest: parent
before 1 child
before 2 child
3
before 1 grandchild
before 2 grandchild
4
5
after 2 grandchild
after 1 grandchild
6
7
after 2 child
after 1 child
8
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
1..1
}
1..1
}
9
after 1 parent
1..1
10
ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
done
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-async--buffer.tap 0000664 0000000 0000000 00000000745 13206406237 0025115 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
done
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 1 grandchild
after 2 child
after 1 child
after 1 parent
ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
1..1
}
1..1
}
1..1
}
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-async.js 0000664 0000000 0000000 00000001165 13206406237 0023416 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.beforeEach(function (cb) {
console.log('before 1', this.name)
process.nextTick(cb)
})
t.afterEach(function (cb) {
console.log('after 1', this.name)
process.nextTick(cb)
})
t.test('parent', function (t) {
t.beforeEach(function (cb) {
console.log('before 2', this.name)
process.nextTick(cb)
})
t.afterEach(function (cb) {
console.log('after 2', this.name)
process.nextTick(cb)
})
t.test('child', function (t) {
t.test('grandchild', function (t) {
t.pass('the only actual assertion')
t.end()
})
t.end()
})
t.end()
})
console.log('done')
node-tap-11.0.0/test-legacy/test/before-after-each-async.tap 0000664 0000000 0000000 00000001022 13206406237 0023556 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
done
# Subtest: parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
after 2 grandchild
after 1 grandchild
1..1
ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~
after 2 child
after 1 child
1..1
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
after 1 parent
1..1
ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-plan--buffer.tap 0000664 0000000 0000000 00000000727 13206406237 0024732 0 ustar 00root root 0000000 0000000 TAP version 13
1..1
before 1 parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 1 grandchild
after 2 child
after 1 child
after 1 parent
ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - the only actual assertion
}
}
}
___/# time=[0-9.]+(ms)?/~~~
done
node-tap-11.0.0/test-legacy/test/before-after-each-plan.js 0000664 0000000 0000000 00000001105 13206406237 0023225 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.plan(1)
t.beforeEach(function (cb) {
console.log('before 1', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 1', this.name)
cb()
})
t.test('parent', function (t) {
t.plan(1)
t.beforeEach(function (cb) {
console.log('before 2', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 2', this.name)
cb()
})
t.test('child', function (t) {
t.plan(1)
t.test('grandchild', function (t) {
t.plan(1)
t.pass('the only actual assertion')
})
})
})
console.log('done')
node-tap-11.0.0/test-legacy/test/before-after-each-plan.tap 0000664 0000000 0000000 00000001022 13206406237 0023373 0 ustar 00root root 0000000 0000000 TAP version 13
1..1
before 1 parent
# Subtest: parent
1..1
before 1 child
before 2 child
# Subtest: child
1..1
before 1 grandchild
before 2 grandchild
# Subtest: grandchild
1..1
ok 1 - the only actual assertion
after 2 grandchild
after 1 grandchild
ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~
after 2 child
after 1 child
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
after 1 parent
ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
___/# time=[0-9.]+(ms)?/~~~
done
node-tap-11.0.0/test-legacy/test/before-after-each-promise--bail--buffer.tap 0000664 0000000 0000000 00000001310 13206406237 0026425 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
done
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 2 child
after 1 child
after 1 parent
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
not ok 2 - this is fine
---
{"at":{"column":23,"file":"test-legacy/test/before-after-each-promise.js","line":28},"source":"return reject(new Error('this is fine'))\n","test":"grandchild"}
...
Bail out! # this is fine
}
}
}
Bail out! # this is fine
node-tap-11.0.0/test-legacy/test/before-after-each-promise--bail.tap 0000664 0000000 0000000 00000001116 13206406237 0025105 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
done
# Subtest: parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
after 2 grandchild
not ok 2 - this is fine
---
{"at":{"column":23,"file":"test-legacy/test/before-after-each-promise.js","line":28},"source":"return reject(new Error('this is fine'))\n","test":"grandchild"}
...
Bail out! # this is fine
after 2 child
after 1 parent
Bail out! # this is fine
node-tap-11.0.0/test-legacy/test/before-after-each-promise--buffer.tap 0000664 0000000 0000000 00000001477 13206406237 0025461 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
done
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 2 child
after 1 child
after 1 parent
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
not ok 2 - this is fine
---
{"at":{"column":23,"file":"test-legacy/test/before-after-each-promise.js","line":28},"source":"return reject(new Error('this is fine'))\n","test":"grandchild"}
...
1..2
# failed 1 of 2 tests
}
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-promise.js 0000664 0000000 0000000 00000001562 13206406237 0023760 0 ustar 00root root 0000000 0000000 var t = require('../..')
var Promise = require('bluebird')
t.beforeEach(function (cb) {
var self = this
return new Promise(function (resolve, reject) {
console.log('before 1', self.name)
process.nextTick(resolve)
})
})
t.afterEach(function (cb) {
console.log('after 1', this.name)
cb()
})
t.test('parent', function (t) {
t.beforeEach(function (cb) {
console.log('before 2', this.name)
cb()
})
t.afterEach(function (cb) {
var self = this
return new Promise(function (resolve, reject) {
console.log('after 2', self.name)
if (self.name === 'grandchild') {
return reject(new Error('this is fine'))
}
resolve()
})
})
t.test('child', function (t) {
t.test('grandchild', function (t) {
t.pass('the only actual assertion')
t.end()
})
t.end()
})
t.end()
})
console.log('done')
node-tap-11.0.0/test-legacy/test/before-after-each-promise.tap 0000664 0000000 0000000 00000001554 13206406237 0024131 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
done
# Subtest: parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
after 2 grandchild
not ok 2 - this is fine
---
{"at":{"column":23,"file":"test-legacy/test/before-after-each-promise.js","line":28},"source":"return reject(new Error('this is fine'))\n","test":"grandchild"}
...
1..2
# failed 1 of 2 tests
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~
after 2 child
after 1 child
1..1
# failed 1 test
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
after 1 parent
1..1
# failed 1 test
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-raise--bail--buffer.tap 0000664 0000000 0000000 00000001275 13206406237 0026064 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 2 child
after 1 child
after 1 parent
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
not ok 2 - this is fine
---
{"at":{"column":17,"file":"test-legacy/test/before-after-each-raise.js","line":22},"source":"return cb(new Error('this is fine'))\n","test":"grandchild"}
...
Bail out! # this is fine
}
}
}
Bail out! # this is fine
node-tap-11.0.0/test-legacy/test/before-after-each-raise--bail.tap 0000664 0000000 0000000 00000001121 13206406237 0024526 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
# Subtest: parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
after 2 grandchild
not ok 2 - this is fine
---
{"at":{"column":17,"file":"test-legacy/test/before-after-each-raise.js","line":22},"source":"return cb(new Error('this is fine'))\n","test":"grandchild"}
...
Bail out! # this is fine
after 2 child
after 1 child
after 1 parent
Bail out! # this is fine
node-tap-11.0.0/test-legacy/test/before-after-each-raise--buffer.tap 0000664 0000000 0000000 00000001471 13206406237 0025100 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 2 child
after 1 child
after 1 parent
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
not ok 2 - this is fine
---
{"at":{"column":17,"file":"test-legacy/test/before-after-each-raise.js","line":22},"source":"return cb(new Error('this is fine'))\n","test":"grandchild"}
...
1..2
# failed 1 of 2 tests
}
1..1
# failed 1 test
}
1..1
# failed 1 test
}
done
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-raise.js 0000664 0000000 0000000 00000001214 13206406237 0023377 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.beforeEach(function (cb) {
console.log('before 1', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 1', this.name)
cb()
})
t.test('parent', function (t) {
t.beforeEach(function (cb) {
console.log('before 2', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 2', this.name)
if (this.name === 'grandchild') {
return cb(new Error('this is fine'))
}
cb()
})
t.test('child', function (t) {
t.test('grandchild', function (t) {
t.pass('the only actual assertion')
t.end()
})
t.end()
})
t.end()
})
console.log('done')
node-tap-11.0.0/test-legacy/test/before-after-each-raise.tap 0000664 0000000 0000000 00000001546 13206406237 0023557 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
# Subtest: parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
after 2 grandchild
not ok 2 - this is fine
---
{"at":{"column":17,"file":"test-legacy/test/before-after-each-raise.js","line":22},"source":"return cb(new Error('this is fine'))\n","test":"grandchild"}
...
1..2
# failed 1 of 2 tests
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~
after 2 child
after 1 child
1..1
# failed 1 test
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
after 1 parent
1..1
# failed 1 test
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
done
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-throw--bail--buffer.tap 0000664 0000000 0000000 00000001273 13206406237 0026122 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 2 child
after 1 child
after 1 parent
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
not ok 2 - this is fine
---
{"at":{"column":16,"file":"test-legacy/test/before-after-each-throw.js","line":22},"source":"var er = new Error('this is fine')\n","test":"grandchild"}
...
Bail out! # this is fine
}
}
}
Bail out! # this is fine
node-tap-11.0.0/test-legacy/test/before-after-each-throw--bail.tap 0000664 0000000 0000000 00000001117 13206406237 0024573 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
# Subtest: parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
after 2 grandchild
not ok 2 - this is fine
---
{"at":{"column":16,"file":"test-legacy/test/before-after-each-throw.js","line":22},"source":"var er = new Error('this is fine')\n","test":"grandchild"}
...
Bail out! # this is fine
after 2 child
after 1 child
after 1 parent
Bail out! # this is fine
node-tap-11.0.0/test-legacy/test/before-after-each-throw--buffer.tap 0000664 0000000 0000000 00000001467 13206406237 0025145 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
after 2 grandchild
after 2 child
after 1 child
after 1 parent
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - the only actual assertion
not ok 2 - this is fine
---
{"at":{"column":16,"file":"test-legacy/test/before-after-each-throw.js","line":22},"source":"var er = new Error('this is fine')\n","test":"grandchild"}
...
1..2
# failed 1 of 2 tests
}
1..1
# failed 1 test
}
1..1
# failed 1 test
}
done
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each-throw.js 0000664 0000000 0000000 00000001267 13206406237 0023447 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.beforeEach(function (cb) {
console.log('before 1', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 1', this.name)
cb()
})
t.test('parent', function (t) {
t.beforeEach(function (cb) {
console.log('before 2', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 2', this.name)
if (this.name === 'grandchild') {
var er = new Error('this is fine')
console.error(er.stack)
throw er
}
cb()
})
t.test('child', function (t) {
t.test('grandchild', function (t) {
t.pass('the only actual assertion')
t.end()
})
t.end()
})
t.end()
})
console.log('done')
node-tap-11.0.0/test-legacy/test/before-after-each-throw.tap 0000664 0000000 0000000 00000001544 13206406237 0023615 0 ustar 00root root 0000000 0000000 TAP version 13
before 1 parent
# Subtest: parent
before 1 child
before 2 child
before 1 grandchild
before 2 grandchild
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
after 2 grandchild
not ok 2 - this is fine
---
{"at":{"column":16,"file":"test-legacy/test/before-after-each-throw.js","line":22},"source":"var er = new Error('this is fine')\n","test":"grandchild"}
...
1..2
# failed 1 of 2 tests
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~
after 2 child
after 1 child
1..1
# failed 1 test
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
after 1 parent
1..1
# failed 1 test
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
done
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/before-after-each.js 0000664 0000000 0000000 00000001404 13206406237 0022277 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.beforeEach(function (cb) {
console.log('before 1', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 1', this.name)
cb()
})
console.log(0)
t.test('parent', { buffered: false }, function (t) {
t.beforeEach(function (cb) {
console.log('before 2', this.name)
cb()
})
t.afterEach(function (cb) {
console.log('after 2', this.name)
cb()
})
console.log(2)
t.test('child', function (t) {
console.log(3)
t.test('grandchild', function (t) {
console.log(4)
t.pass('the only actual assertion')
console.log(5)
t.end()
console.log(6)
})
console.log(7)
t.end()
console.log(8)
})
console.log(9)
t.end()
console.log(10)
})
console.log('done')
node-tap-11.0.0/test-legacy/test/before-after-each.tap 0000664 0000000 0000000 00000001047 13206406237 0022452 0 ustar 00root root 0000000 0000000 0
TAP version 13
before 1 parent
2
# Subtest: parent
before 1 child
before 2 child
3
before 1 grandchild
before 2 grandchild
4
# Subtest: child
# Subtest: grandchild
ok 1 - the only actual assertion
5
after 2 grandchild
after 1 grandchild
1..1
6
ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~
7
after 2 child
after 1 child
1..1
8
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
9
after 1 parent
1..1
10
ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
done
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/buffer-yaml--bail--buffer.tap 0000664 0000000 0000000 00000007441 13206406237 0023736 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should be equivalent
---
{"at":{"column":3,"file":"test-legacy/test/buffer-yaml.js","line":5},"found":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b","source":"t.same(str, xyz)\n","wanted":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b"}
...
Bail out! # should be equivalent
node-tap-11.0.0/test-legacy/test/buffer-yaml--bail.tap 0000664 0000000 0000000 00000007441 13206406237 0022412 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should be equivalent
---
{"at":{"column":3,"file":"test-legacy/test/buffer-yaml.js","line":5},"found":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b","source":"t.same(str, xyz)\n","wanted":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b"}
...
Bail out! # should be equivalent
node-tap-11.0.0/test-legacy/test/buffer-yaml--buffer.tap 0000664 0000000 0000000 00000007461 13206406237 0022756 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should be equivalent
---
{"at":{"column":3,"file":"test-legacy/test/buffer-yaml.js","line":5},"found":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b","source":"t.same(str, xyz)\n","wanted":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/buffer-yaml.js 0000664 0000000 0000000 00000000223 13206406237 0021247 0 ustar 00root root 0000000 0000000 var t = require('../..')
var str = new Buffer(new Array(100).join('not ok'))
var xyz = new Buffer(new Array(101).join('not ok'))
t.same(str, xyz)
node-tap-11.0.0/test-legacy/test/buffer-yaml.tap 0000664 0000000 0000000 00000007461 13206406237 0021432 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should be equivalent
---
{"at":{"column":3,"file":"test-legacy/test/buffer-yaml.js","line":5},"found":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b","source":"t.same(str, xyz)\n","wanted":"Buffer\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b\n6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f\n74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20\n6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b 6e 6f 74 20 6f 6b"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/buffered--buffer.tap 0000664 0000000 0000000 00000001623 13206406237 0022321 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - unbuffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
ok 2 - buffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
ok 3 - unbuffered spawn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - unbuffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
ok 2 - buffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
1..2
___/# time=[0-9.]+(ms)?/~~~
}
ok 4 - buffered spawn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - unbuffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
ok 2 - buffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
1..2
___/# time=[0-9.]+(ms)?/~~~
}
1..4
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/buffered.js 0000664 0000000 0000000 00000000753 13206406237 0020630 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('unbuffered', function (t) {
t.pass('fine')
setTimeout(function () {
t.pass('also fine')
t.end()
})
})
t.test('buffered', { buffered: true }, function (t) {
t.pass('fine')
setTimeout(function () {
t.pass('also fine')
t.end()
})
})
if (process.argv[2] !== 'child') {
t.spawn(process.execPath, [__filename, 'child'], 'unbuffered spawn')
t.spawn(process.execPath, [__filename, 'child'], { buffered: true }, 'buffered spawn')
}
node-tap-11.0.0/test-legacy/test/buffered.tap 0000664 0000000 0000000 00000001741 13206406237 0020776 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: unbuffered
ok 1 - fine
ok 2 - also fine
1..2
ok 1 - unbuffered ___/# time=[0-9.]+(ms)?/~~~
ok 2 - buffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
# Subtest: unbuffered spawn
# Subtest: unbuffered
ok 1 - fine
ok 2 - also fine
1..2
ok 1 - unbuffered ___/# time=[0-9.]+(ms)?/~~~
ok 2 - buffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
1..2
___/# time=[0-9.]+(ms)?/~~~
ok 3 - unbuffered spawn ___/# time=[0-9.]+(ms)?/~~~
ok 4 - buffered spawn ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: unbuffered
ok 1 - fine
ok 2 - also fine
1..2
ok 1 - unbuffered ___/# time=[0-9.]+(ms)?/~~~
ok 2 - buffered ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
ok 2 - also fine
1..2
}
1..2
___/# time=[0-9.]+(ms)?/~~~
}
1..4
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/catch-tap-throws--bail--buffer.tap 0000664 0000000 0000000 00000000522 13206406237 0024706 0 ustar 00root root 0000000 0000000 TAP version 13
11
12
13
14
ok 1 - exceed_plan_sync ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - 1
}
not ok 2 - test count exceeds plan
---
{"at":{"column":7,"file":"test-legacy/test/catch-tap-throws.js","line":12},"plan":1,"source":"t.pass(2)\n","test":"exceed_plan_sync"}
...
21
22
22.5
Bail out! # test count exceeds plan
node-tap-11.0.0/test-legacy/test/catch-tap-throws--bail.tap 0000664 0000000 0000000 00000000542 13206406237 0023364 0 ustar 00root root 0000000 0000000 TAP version 13
11
# Subtest: exceed_plan_sync
1..1
12
ok 1 - 1
13
14
ok 1 - exceed_plan_sync ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - test count exceeds plan
---
{"at":{"column":7,"file":"test-legacy/test/catch-tap-throws.js","line":12},"plan":1,"source":"t.pass(2)\n","test":"exceed_plan_sync"}
...
21
Bail out! # test count exceeds plan
node-tap-11.0.0/test-legacy/test/catch-tap-throws--buffer.tap 0000664 0000000 0000000 00000003224 13206406237 0023726 0 ustar 00root root 0000000 0000000 TAP version 13
11
12
13
14
ok 1 - exceed_plan_sync ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - 1
}
not ok 2 - test count exceeds plan
---
{"at":{"column":7,"file":"test-legacy/test/catch-tap-throws.js","line":12},"plan":1,"source":"t.pass(2)\n","test":"exceed_plan_sync"}
...
21
22
22.5
ok 3 - exceed_plan_async ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - 3
}
31
32
33
34
ok 4 - multiple_end_sync ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - 5
1..1
}
not ok 5 - test end() method called more than once
---
{"test":"multiple_end_sync"}
...
41
42
42.5
ok 6 - multiple_end_async ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - 6
1..1
}
51
52
53
54
ok 7 - assert_after_end_sync ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - 7
1..1
}
not ok 8 - test after end() was called
---
{"at":{"column":7,"file":"test-legacy/test/catch-tap-throws.js","line":74},"plan":1,"source":"t.pass(8)\n","test":"assert_after_end_sync"}
...
61
62
62.5
ok 9 - assert_after_end_async ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - 9
1..1
}
23
not ok 10 - test count exceeds plan ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":9,"file":"test-legacy/test/catch-tap-throws.js","line":28},"plan":1,"source":"t.pass(4)\n","test":"exceed_plan_async"}
...
24
43
not ok 11 - test end() method called more than once ___/# time=[0-9.]+(ms)?/~~~
---
{"test":"multiple_end_async"}
...
44
63
not ok 12 - test after end() was called ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":9,"file":"test-legacy/test/catch-tap-throws.js","line":91},"plan":1,"source":"t.pass(10)\n","test":"assert_after_end_async"}
...
64
1..12
# failed 6 of 12 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/catch-tap-throws.js 0000664 0000000 0000000 00000003022 13206406237 0022226 0 ustar 00root root 0000000 0000000 var tap = require('../..')
// tap failures should be uncatchable
tap.test(function exceed_plan_sync (t) {
console.log(11)
t.plan(1)
console.log(12)
try {
t.pass(1)
console.log(13)
t.pass(2)
console.log(14)
} catch (e) {
console.log(15)
}
})
tap.test(function exceed_plan_async (t) {
console.log(21)
t.plan(1)
console.log(22)
t.pass(3)
console.log(22.5)
process.nextTick(function () {
console.log(23)
try {
t.pass(4)
console.log(24)
} catch (e) {
console.log(25)
}
})
})
tap.test(function multiple_end_sync (t) {
console.log(31)
try {
t.pass(5)
console.log(32)
t.end()
console.log(33)
t.end()
console.log(34)
} catch (e) {
console.log(35)
}
})
tap.test(function multiple_end_async (t) {
console.log(41)
t.pass(6)
console.log(42)
t.end()
console.log(42.5)
process.nextTick(function () {
console.log(43)
try {
t.end()
console.log(44)
} catch (e) {
console.log(45)
}
})
})
tap.test(function assert_after_end_sync (t) {
console.log(51)
t.pass(7)
console.log(52)
t.end()
console.log(53)
try {
t.pass(8)
console.log(54)
} catch (e) {
console.log(55)
// noop
}
})
tap.test(function assert_after_end_async (t) {
console.log(61)
t.pass(9)
console.log(62)
t.end()
console.log(62.5)
process.nextTick(function () {
console.log(63)
try {
t.pass(10)
console.log(64)
} catch (e) {
console.log(65)
// noop
}
})
})
node-tap-11.0.0/test-legacy/test/catch-tap-throws.tap 0000664 0000000 0000000 00000003463 13206406237 0022407 0 ustar 00root root 0000000 0000000 TAP version 13
11
# Subtest: exceed_plan_sync
1..1
12
ok 1 - 1
13
14
ok 1 - exceed_plan_sync ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - test count exceeds plan
---
{"at":{"column":7,"file":"test-legacy/test/catch-tap-throws.js","line":12},"plan":1,"source":"t.pass(2)\n","test":"exceed_plan_sync"}
...
21
# Subtest: exceed_plan_async
1..1
22
ok 1 - 3
22.5
ok 3 - exceed_plan_async ___/# time=[0-9.]+(ms)?/~~~
31
# Subtest: multiple_end_sync
ok 1 - 5
32
1..1
33
34
ok 4 - multiple_end_sync ___/# time=[0-9.]+(ms)?/~~~
not ok 5 - test end() method called more than once
---
{"test":"multiple_end_sync"}
...
41
# Subtest: multiple_end_async
ok 1 - 6
42
1..1
42.5
ok 6 - multiple_end_async ___/# time=[0-9.]+(ms)?/~~~
51
# Subtest: assert_after_end_sync
ok 1 - 7
52
1..1
53
54
ok 7 - assert_after_end_sync ___/# time=[0-9.]+(ms)?/~~~
not ok 8 - test after end() was called
---
{"at":{"column":7,"file":"test-legacy/test/catch-tap-throws.js","line":74},"plan":1,"source":"t.pass(8)\n","test":"assert_after_end_sync"}
...
61
# Subtest: assert_after_end_async
ok 1 - 9
62
1..1
62.5
ok 9 - assert_after_end_async ___/# time=[0-9.]+(ms)?/~~~
23
not ok 10 - test count exceeds plan ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":9,"file":"test-legacy/test/catch-tap-throws.js","line":28},"plan":1,"source":"t.pass(4)\n","test":"exceed_plan_async"}
...
24
43
not ok 11 - test end() method called more than once ___/# time=[0-9.]+(ms)?/~~~
---
{"test":"multiple_end_async"}
...
44
63
not ok 12 - test after end() was called ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":9,"file":"test-legacy/test/catch-tap-throws.js","line":91},"plan":1,"source":"t.pass(10)\n","test":"assert_after_end_async"}
...
64
1..12
# failed 6 of 12 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-sigterm-after-end--buffer.tap 0000664 0000000 0000000 00000000444 13206406237 0025135 0 ustar 00root root 0000000 0000000 TAP version 13
# child start
TAP version 13
ok 1 - this is fine
1..1
___/# time=[0-9.]+(ms)?/~~~
possible timeout: SIGTERM received after tap end
---
{"handles":[{"type":"Timer"}]}
...
# child end code=null signal="SIGTERM"
ok 1 - should not be equal
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-sigterm-after-end.js 0000664 0000000 0000000 00000001146 13206406237 0023441 0 ustar 00root root 0000000 0000000 var t = require('../..')
if (process.argv[2] === 'child') {
setInterval(function () {}, 10000)
t.pass('this is fine')
t.end()
// use ipc so that we're not waiting longer than necessary
process.send({ do: 'it' })
} else {
t.comment('child start')
var spawn = require('child_process').spawn
var child = spawn(process.execPath, [__filename, 'child'], {
stdio: [ 0, 1, 1, 'ipc']
})
child.on('message', function () {
child.kill('SIGTERM')
})
child.on('exit', function (code, signal) {
t.comment('child end code=%j signal=%j', code, signal)
t.notEqual(code, 0)
t.end()
})
}
node-tap-11.0.0/test-legacy/test/child-sigterm-after-end.tap 0000664 0000000 0000000 00000000444 13206406237 0023611 0 ustar 00root root 0000000 0000000 TAP version 13
# child start
TAP version 13
ok 1 - this is fine
1..1
___/# time=[0-9.]+(ms)?/~~~
possible timeout: SIGTERM received after tap end
---
{"handles":[{"type":"Timer"}]}
...
# child end code=null signal="SIGTERM"
ok 1 - should not be equal
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-text-buffer--bail--buffer.tap 0000664 0000000 0000000 00000000545 13206406237 0025037 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-buffer.js buffer ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - parent {
not ok 1 - child {
not ok 1 - grandchild {
ok 1 - this is fine
not ok 2 - burn
Bail out! # burn
}
}
}
}
Bail out! # burn
node-tap-11.0.0/test-legacy/test/child-text-buffer--bail.tap 0000664 0000000 0000000 00000000505 13206406237 0023507 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-buffer.js buffer
not ok 1 - parent {
not ok 1 - child {
not ok 1 - grandchild {
ok 1 - this is fine
not ok 2 - burn
Bail out! # burn
}
}
}
Bail out! # burn
node-tap-11.0.0/test-legacy/test/child-text-buffer--buffer.tap 0000664 0000000 0000000 00000001151 13206406237 0024047 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-buffer.js buffer ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - parent {
not ok 1 - child {
not ok 1 - grandchild {
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
}
1..1
# failed 1 of 1 tests
# failed 1 test
}
1..1
# failed 1 of 1 tests
# failed 1 test
}
1..1
# failed 1 of 1 tests
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-text-buffer.js 0000664 0000000 0000000 00000001100 13206406237 0022345 0 ustar 00root root 0000000 0000000 if (process.argv[2] === 'buffer') {
console.log(function () { /*
TAP version 13
not ok 1 - parent {
not ok 1 - child {
not ok 1 - grandchild {
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
}
1..1
# failed 1 of 1 tests
}
1..1
# failed 1 of 1 tests
}
1..1
# failed 1 of 1 tests
*/}.toString().split('\n').slice(1, -1).join('\n'))
} else {
var t = require('../..')
var extra = { diagnostic: false }
t.spawn(process.execPath, [__filename, 'buffer'], extra)
}
node-tap-11.0.0/test-legacy/test/child-text-buffer.tap 0000664 0000000 0000000 00000001257 13206406237 0022532 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-buffer.js buffer
not ok 1 - parent {
not ok 1 - child {
not ok 1 - grandchild {
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
}
1..1
# failed 1 of 1 tests
# failed 1 test
}
1..1
# failed 1 of 1 tests
# failed 1 test
}
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-buffer.js buffer ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-text-indentsub--bail--buffer.tap 0000664 0000000 0000000 00000000507 13206406237 0025557 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-indentsub.js indentsub ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
Bail out! # burn
}
Bail out! # burn
node-tap-11.0.0/test-legacy/test/child-text-indentsub--bail.tap 0000664 0000000 0000000 00000000447 13206406237 0024236 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-indentsub.js indentsub
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
Bail out! # burn
Bail out! # burn
node-tap-11.0.0/test-legacy/test/child-text-indentsub--buffer.tap 0000664 0000000 0000000 00000001234 13206406237 0024573 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-indentsub.js indentsub ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
not ok 1 - grandchild
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - child
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - parent
1..1
# failed 1 of 1 tests
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-text-indentsub.js 0000664 0000000 0000000 00000001177 13206406237 0023105 0 ustar 00root root 0000000 0000000 if (process.argv[2] === 'indentsub') {
console.log(function () { /*
TAP version 13
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
not ok 1 - grandchild
1..1
# failed 1 of 1 tests
not ok 1 - child
1..1
# failed 1 of 1 tests
not ok 1 - parent
1..1
# failed 1 of 1 tests
*/}.toString().split('\n').slice(1, -1).join('\n'))
} else {
var t = require('../..')
var extra = { diagnostic: false }
t.spawn(process.execPath, [__filename, 'indentsub'], extra)
}
node-tap-11.0.0/test-legacy/test/child-text-indentsub.tap 0000664 0000000 0000000 00000001350 13206406237 0023246 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-indentsub.js indentsub
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
not ok 1 - grandchild
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - child
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - parent
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-indentsub.js indentsub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-text-sub--bail--buffer.tap 0000664 0000000 0000000 00000000473 13206406237 0024357 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-sub.js sub ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
Bail out! # burn
}
Bail out! # burn
node-tap-11.0.0/test-legacy/test/child-text-sub--bail.tap 0000664 0000000 0000000 00000000433 13206406237 0023027 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-sub.js sub
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
Bail out! # burn
Bail out! # burn
node-tap-11.0.0/test-legacy/test/child-text-sub--buffer.tap 0000664 0000000 0000000 00000001220 13206406237 0023364 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-sub.js sub ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
not ok 1 - grandchild
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - child
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - parent
1..1
# failed 1 of 1 tests
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/child-text-sub.js 0000664 0000000 0000000 00000001147 13206406237 0021700 0 ustar 00root root 0000000 0000000 if (process.argv[2] === 'sub') {
console.log(function () { /*
TAP version 13
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
not ok 1 - grandchild
1..1
# failed 1 of 1 tests
not ok 1 - child
1..1
# failed 1 of 1 tests
not ok 1 - parent
1..1
# failed 1 of 1 tests
*/}.toString().split('\n').slice(1, -1).join('\n'))
} else {
var t = require('../..')
var extra = { diagnostic: false }
t.spawn(process.execPath, [__filename, 'sub'], extra)
}
node-tap-11.0.0/test-legacy/test/child-text-sub.tap 0000664 0000000 0000000 00000001320 13206406237 0022041 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-sub.js sub
# Subtest: parent
# Subtest: child
# Subtest: grandchild
ok 1 - this is fine
not ok 2 - burn
1..2
# failed 1 of 2 tests
not ok 1 - grandchild
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - child
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - parent
1..1
# failed 1 of 1 tests
# failed 1 test
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~child-text-sub.js sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/console-log--buffer.tap 0000664 0000000 0000000 00000001635 13206406237 0022763 0 ustar 00root root 0000000 0000000 >>>> before any tests
TAP version 13
>>>> an object is { a: 'thing', to: [ 'inspect' ] }
>>>> after first child
>>>> after second child
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - true is ok
ok 2 - doag is also okay
ok 3 - doag is very okay
}
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
ok 3 - nested ok
ok 4 - nested ok second
1..4
}
}
>>>> after child test
ok 2 - this passes
ok 3 - this passes too
>>>> after pass() calls
>>>> in async kid, before plan
>>>> in async kid, after plan
>>>> after async kid
>>>> after all tests, before end()
>>>> after end() called
ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - timeout
ok 2 - timeout
}
ok 5 - pass after async kid
1..5
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/console-log.js 0000664 0000000 0000000 00000002533 13206406237 0021265 0 ustar 00root root 0000000 0000000 var t = require('../..')
console.log('>>>> before any tests')
t.test('nesting', function (t) {
t.plan(2)
t.test('first', function (tt) {
tt.plan(3)
tt.ok(true, 'true is ok')
console.log('>>>> an object is', { a: 'thing', to: [ 'inspect' ] })
tt.assert('doeg', 'doag is also okay')
tt.assert('doeg', 'doag is very okay')
})
console.log('>>>> after first child')
t.test('second', function (tt) {
function foo () {
tt.ok('no plan', 'but that is ok')
tt.pass('this passes')
tt.equal(1, 1, 'nested ok')
console.trace('in foo')
tt.equal(1, 1, 'nested ok second')
tt.end()
}
function bar () {
return foo()
}
function baz () {
return bar()
}
baz()
})
console.log('>>>> after second child')
})
console.log('>>>> after child test')
t.pass('this passes')
t.pass('this passes too')
console.log('>>>> after pass() calls')
t.test('async kid', function (t) {
console.log('>>>> in async kid, before plan')
t.plan(2)
console.log('>>>> in async kid, after plan')
setTimeout(function () {
t.ok(true, 'timeout', { foo: 'blz' })
}, 50)
setTimeout(function () {
t.pass('timeout')
})
})
console.log('>>>> after async kid')
t.pass('pass after async kid')
console.log('>>>> after all tests, before end()')
t.end()
console.log('>>>> after end() called')
node-tap-11.0.0/test-legacy/test/console-log.tap 0000664 0000000 0000000 00000001735 13206406237 0021440 0 ustar 00root root 0000000 0000000 >>>> before any tests
TAP version 13
# Subtest: nesting
1..2
# Subtest: first
1..3
ok 1 - true is ok
>>>> an object is { a: 'thing', to: [ 'inspect' ] }
ok 2 - doag is also okay
ok 3 - doag is very okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
>>>> after first child
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
ok 3 - nested ok
ok 4 - nested ok second
1..4
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
>>>> after second child
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~
>>>> after child test
ok 2 - this passes
ok 3 - this passes too
>>>> after pass() calls
>>>> in async kid, before plan
# Subtest: async kid
1..2
>>>> in async kid, after plan
>>>> after async kid
>>>> after all tests, before end()
>>>> after end() called
ok 1 - timeout
ok 2 - timeout
ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~
ok 5 - pass after async kid
1..5
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/deferred-comment--buffer.tap 0000664 0000000 0000000 00000000205 13206406237 0023752 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
# this is {"some":true} json
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/deferred-comment.js 0000664 0000000 0000000 00000000224 13206406237 0022257 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('child', function (t) {
setTimeout(function () {
t.end()
})
})
t.comment('this is %j json', { some: true })
node-tap-11.0.0/test-legacy/test/deferred-comment.tap 0000664 0000000 0000000 00000000222 13206406237 0022425 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: child
1..0
ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
# this is {"some":true} json
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/descendant-fail--bail--buffer.tap 0000664 0000000 0000000 00000000555 13206406237 0024545 0 ustar 00root root 0000000 0000000 TAP version 13
1..1
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - nope
---
{"at":{"column":7,"file":"test-legacy/test/descendant-fail.js","line":7},"source":"t.fail('nope')\n"}
...
Bail out! # nope
}
}
Bail out! # nope
node-tap-11.0.0/test-legacy/test/descendant-fail--bail.tap 0000664 0000000 0000000 00000000451 13206406237 0023214 0 ustar 00root root 0000000 0000000 TAP version 13
1..1
# Subtest: parent
1..1
# Subtest: child
1..1
not ok 1 - nope
---
{"at":{"column":7,"file":"test-legacy/test/descendant-fail.js","line":7},"source":"t.fail('nope')\n"}
...
Bail out! # nope
Bail out! # nope
node-tap-11.0.0/test-legacy/test/descendant-fail--buffer.tap 0000664 0000000 0000000 00000000641 13206406237 0023557 0 ustar 00root root 0000000 0000000 TAP version 13
1..1
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - nope
---
{"at":{"column":7,"file":"test-legacy/test/descendant-fail.js","line":7},"source":"t.fail('nope')\n"}
...
# failed 1 test
}
# failed 1 test
}
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/descendant-fail.js 0000664 0000000 0000000 00000000231 13206406237 0022056 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.plan(1)
t.test('parent', function (t) {
t.plan(1)
t.test('child', function (t) {
t.plan(1)
t.fail('nope')
})
})
node-tap-11.0.0/test-legacy/test/descendant-fail.tap 0000664 0000000 0000000 00000000674 13206406237 0022241 0 ustar 00root root 0000000 0000000 TAP version 13
1..1
# Subtest: parent
1..1
# Subtest: child
1..1
not ok 1 - nope
---
{"at":{"column":7,"file":"test-legacy/test/descendant-fail.js","line":7},"source":"t.fail('nope')\n"}
...
# failed 1 test
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
# failed 1 test
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/does-not-throw-message--bail--buffer.tap 0000664 0000000 0000000 00000000446 13206406237 0026036 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - expected to not throw
---
{"at":{"column":9,"file":"test-legacy/test/does-not-throw-message.js","line":3},"message":"this is a type of error","source":"throw new TypeError('this is a type of error')\n","type":"TypeError"}
...
Bail out! # expected to not throw
node-tap-11.0.0/test-legacy/test/does-not-throw-message--bail.tap 0000664 0000000 0000000 00000000446 13206406237 0024512 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - expected to not throw
---
{"at":{"column":9,"file":"test-legacy/test/does-not-throw-message.js","line":3},"message":"this is a type of error","source":"throw new TypeError('this is a type of error')\n","type":"TypeError"}
...
Bail out! # expected to not throw
node-tap-11.0.0/test-legacy/test/does-not-throw-message--buffer.tap 0000664 0000000 0000000 00000000465 13206406237 0025055 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - expected to not throw
---
{"at":{"column":9,"file":"test-legacy/test/does-not-throw-message.js","line":3},"message":"this is a type of error","source":"throw new TypeError('this is a type of error')\n","type":"TypeError"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/does-not-throw-message.js 0000664 0000000 0000000 00000000152 13206406237 0023352 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.doesNotThrow(function () {
throw new TypeError('this is a type of error')
})
node-tap-11.0.0/test-legacy/test/does-not-throw-message.tap 0000664 0000000 0000000 00000000465 13206406237 0023531 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - expected to not throw
---
{"at":{"column":9,"file":"test-legacy/test/does-not-throw-message.js","line":3},"message":"this is a type of error","source":"throw new TypeError('this is a type of error')\n","type":"TypeError"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/domain-escaping--bail--buffer.tap 0000664 0000000 0000000 00000000724 13206406237 0024560 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - thisPasses ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - expected to throw: Error one
ok 2 - threw expected error
1..2
}
ok 2 - expected to throw: Error one
ok 3 - threw expected error
not ok 4 - one ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - one-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er one-sub
---
{"test":"one-sub"}
...
Bail out! # er one-sub
}
}
Bail out! # er one-sub
node-tap-11.0.0/test-legacy/test/domain-escaping--bail.tap 0000664 0000000 0000000 00000000702 13206406237 0023230 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: thisPasses
ok 1 - expected to throw: Error one
ok 2 - threw expected error
1..2
ok 1 - thisPasses ___/# time=[0-9.]+(ms)?/~~~
ok 2 - expected to throw: Error one
ok 3 - threw expected error
not ok 4 - one ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: one-sub
not ok 1 - er one-sub
---
{"test":"one-sub"}
...
Bail out! # er one-sub
}
Bail out! # er one-sub
node-tap-11.0.0/test-legacy/test/domain-escaping--buffer.tap 0000664 0000000 0000000 00000004637 13206406237 0023605 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - thisPasses ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - expected to throw: Error one
ok 2 - threw expected error
1..2
}
ok 2 - expected to throw: Error one
ok 3 - threw expected error
not ok 4 - one ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - one-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er one-sub
---
{"test":"one-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 5 - two ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - two-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er two-sub
---
{"test":"two-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 6 - tre ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - tre-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er tre-sub
---
{"test":"tre-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 7 - for ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - for-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er for-sub
---
{"test":"for-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 8 - fiv ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - fiv-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er fiv-sub
---
{"test":"fiv-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 9 - six ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - six-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er six-sub
---
{"test":"six-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 10 - svn ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - svn-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er svn-sub
---
{"test":"svn-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 11 - eit ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - eit-sub ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - er eit-sub
---
{"test":"eit-sub"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..11
# failed 8 of 11 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/domain-escaping.js 0000664 0000000 0000000 00000002527 13206406237 0022105 0 ustar 00root root 0000000 0000000 // make sure domains don't obscure things.
var tap = require('../..')
var EE = require('events').EventEmitter
tap.jobs = 4
function thisPasses (t) {
var ee = new EE()
t.throws(function () {
ee.emit('error', new Error('one'))
}, new Error('one'))
try {
ee.emit('error', new Error('two'))
t.fail('should throw')
} catch (er) {
t.match(er, { message: 'two' }, 'threw expected error')
}
if (t !== tap)
t.end()
}
tap.test(thisPasses)
thisPasses(tap)
function thisFailsNicely (t) {
return t.test(t.name + '-sub', function (t) {
// throw a Math.random timeout around this so that we verify
// that the correct error gets to the correct test no matter
// what order they are actually run in.
setTimeout(function () {
var ee = new EE()
ee.emit('error', { message: 'er ' + t.name, at: null, stack: '' })
t.fail('should throw')
t.end()
}, Math.random() * 100)
})
}
tap.test('one', { buffered: true }, thisFailsNicely)
tap.test('two', { buffered: true }, thisFailsNicely)
tap.test('tre', { buffered: true }, thisFailsNicely)
tap.test('for', { buffered: true }, thisFailsNicely)
tap.test('fiv', { buffered: true }, thisFailsNicely)
tap.test('six', { buffered: true }, thisFailsNicely)
tap.test('svn', { buffered: true }, thisFailsNicely)
tap.test('eit', { buffered: true }, thisFailsNicely)
node-tap-11.0.0/test-legacy/test/domain-escaping.tap 0000664 0000000 0000000 00000005051 13206406237 0022250 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: thisPasses
ok 1 - expected to throw: Error one
ok 2 - threw expected error
1..2
ok 1 - thisPasses ___/# time=[0-9.]+(ms)?/~~~
ok 2 - expected to throw: Error one
ok 3 - threw expected error
not ok 4 - one ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: one-sub
not ok 1 - er one-sub
---
{"test":"one-sub"}
...
1..1
# failed 1 test
not ok 1 - one-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
not ok 5 - two ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: two-sub
not ok 1 - er two-sub
---
{"test":"two-sub"}
...
1..1
# failed 1 test
not ok 1 - two-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
not ok 6 - tre ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: tre-sub
not ok 1 - er tre-sub
---
{"test":"tre-sub"}
...
1..1
# failed 1 test
not ok 1 - tre-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
not ok 7 - for ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: for-sub
not ok 1 - er for-sub
---
{"test":"for-sub"}
...
1..1
# failed 1 test
not ok 1 - for-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
not ok 8 - fiv ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: fiv-sub
not ok 1 - er fiv-sub
---
{"test":"fiv-sub"}
...
1..1
# failed 1 test
not ok 1 - fiv-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
not ok 9 - six ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: six-sub
not ok 1 - er six-sub
---
{"test":"six-sub"}
...
1..1
# failed 1 test
not ok 1 - six-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
not ok 10 - svn ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: svn-sub
not ok 1 - er svn-sub
---
{"test":"svn-sub"}
...
1..1
# failed 1 test
not ok 1 - svn-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
not ok 11 - eit ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: eit-sub
not ok 1 - er eit-sub
---
{"test":"eit-sub"}
...
1..1
# failed 1 test
not ok 1 - eit-sub ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
}
1..11
# failed 8 of 11 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/emitter-match--bail--buffer.tap 0000664 0000000 0000000 00000000722 13206406237 0024263 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - check ee matches ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - should match pattern provided
---
{"at":{"column":5,"file":"test-legacy/test/emitter-match.js","line":9},"found":{"_events":{},"_eventsCount":0,"_maxListeners":10,"domain":{},"truthy":false},"pattern":{"truthy":true},"source":"t.match(e, { truthy: true })\n"}
...
Bail out! # should match pattern provided
}
Bail out! # should match pattern provided
node-tap-11.0.0/test-legacy/test/emitter-match--bail.tap 0000664 0000000 0000000 00000000662 13206406237 0022742 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: check ee matches
not ok 1 - should match pattern provided
---
{"at":{"column":5,"file":"test-legacy/test/emitter-match.js","line":9},"found":{"_events":{},"_eventsCount":0,"_maxListeners":10,"domain":{},"truthy":false},"pattern":{"truthy":true},"source":"t.match(e, { truthy: true })\n"}
...
Bail out! # should match pattern provided
Bail out! # should match pattern provided
node-tap-11.0.0/test-legacy/test/emitter-match--buffer.tap 0000664 0000000 0000000 00000000711 13206406237 0023277 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - check ee matches ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - should match pattern provided
---
{"at":{"column":5,"file":"test-legacy/test/emitter-match.js","line":9},"found":{"_events":{},"_eventsCount":0,"_maxListeners":10,"domain":{},"truthy":false},"pattern":{"truthy":true},"source":"t.match(e, { truthy: true })\n"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/emitter-match.js 0000664 0000000 0000000 00000000417 13206406237 0021606 0 ustar 00root root 0000000 0000000 var t = require('../..')
var EE = require('events').EventEmitter
t.test('check ee matches', function (t) {
var e = new EE()
e.truthy = false
// put this here for 0.10's benefit
e._eventsCount = 0
e._maxListeners = 10
t.match(e, { truthy: true })
t.end()
})
node-tap-11.0.0/test-legacy/test/emitter-match.tap 0000664 0000000 0000000 00000000741 13206406237 0021756 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: check ee matches
not ok 1 - should match pattern provided
---
{"at":{"column":5,"file":"test-legacy/test/emitter-match.js","line":9},"found":{"_events":{},"_eventsCount":0,"_maxListeners":10,"domain":{},"truthy":false},"pattern":{"truthy":true},"source":"t.match(e, { truthy: true })\n"}
...
1..1
# failed 1 test
not ok 1 - check ee matches ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/empty--buffer.tap 0000664 0000000 0000000 00000000001 13206406237 0021662 0 ustar 00root root 0000000 0000000
node-tap-11.0.0/test-legacy/test/empty.js 0000664 0000000 0000000 00000000021 13206406237 0020170 0 ustar 00root root 0000000 0000000 require('../..')
node-tap-11.0.0/test-legacy/test/empty.tap 0000664 0000000 0000000 00000000001 13206406237 0020336 0 ustar 00root root 0000000 0000000
node-tap-11.0.0/test-legacy/test/end-end--bail--buffer.tap 0000664 0000000 0000000 00000000322 13206406237 0023026 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - end end ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 2 - test end() method called more than once
---
{"test":"end end"}
...
Bail out! # test end() method called more than once
node-tap-11.0.0/test-legacy/test/end-end--bail.tap 0000664 0000000 0000000 00000000341 13206406237 0021503 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: end end
1..0
ok 1 - end end ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - test end() method called more than once
---
{"test":"end end"}
...
Bail out! # test end() method called more than once
node-tap-11.0.0/test-legacy/test/end-end--buffer.tap 0000664 0000000 0000000 00000001663 13206406237 0022055 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - end end ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 2 - test end() method called more than once
---
{"test":"end end"}
...
ok 3 - end then async end ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 4 - double async end ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 5 - plan end ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - this is fine
}
ok 6 - plan then async end ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - this is fine
}
ok 7 - plan end end ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - this is fine
}
not ok 8 - test end() method called more than once ___/# time=[0-9.]+(ms)?/~~~
---
{"test":"end then async end"}
...
not ok 9 - test end() method called more than once
---
{"test":"plan end end"}
...
not ok 10 - test end() method called more than once ___/# time=[0-9.]+(ms)?/~~~
---
{"test":"double async end"}
...
1..10
# failed 4 of 10 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/end-end.js 0000664 0000000 0000000 00000001167 13206406237 0020360 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('end end', function (t) {
t.end()
t.end()
})
t.test('end then async end', function (t) {
t.end()
setTimeout(function () {
t.end()
})
})
t.test('double async end', function (t) {
setTimeout(function () {
t.end()
})
setTimeout(function () {
t.end()
}, 100)
})
t.test('plan end', function (t) {
t.plan(1)
t.pass('this is fine')
t.end()
})
t.test('plan then async end', function (t) {
t.plan(1)
t.pass('this is fine')
setTimeout(function () { t.end() })
})
t.test('plan end end', function (t) {
t.plan(1)
t.pass('this is fine')
t.end()
t.end()
})
node-tap-11.0.0/test-legacy/test/end-end.tap 0000664 0000000 0000000 00000002063 13206406237 0020524 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: end end
1..0
ok 1 - end end ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - test end() method called more than once
---
{"test":"end end"}
...
# Subtest: end then async end
1..0
ok 3 - end then async end ___/# time=[0-9.]+(ms)?/~~~
# Subtest: double async end
1..0
ok 4 - double async end ___/# time=[0-9.]+(ms)?/~~~
# Subtest: plan end
1..1
ok 1 - this is fine
ok 5 - plan end ___/# time=[0-9.]+(ms)?/~~~
# Subtest: plan then async end
1..1
ok 1 - this is fine
ok 6 - plan then async end ___/# time=[0-9.]+(ms)?/~~~
# Subtest: plan end end
1..1
ok 1 - this is fine
ok 7 - plan end end ___/# time=[0-9.]+(ms)?/~~~
not ok 8 - test end() method called more than once ___/# time=[0-9.]+(ms)?/~~~
---
{"test":"end then async end"}
...
not ok 9 - test end() method called more than once
---
{"test":"plan end end"}
...
not ok 10 - test end() method called more than once ___/# time=[0-9.]+(ms)?/~~~
---
{"test":"double async end"}
...
1..10
# failed 4 of 10 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/end-event-timing--buffer.tap 0000664 0000000 0000000 00000000472 13206406237 0023712 0 ustar 00root root 0000000 0000000 TAP version 13
> start first
> before ending first
> first end event
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
> start second
> after ending first
> before ending second
> second end event
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
> after ending second
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/end-event-timing.js 0000664 0000000 0000000 00000001100 13206406237 0022203 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('first', function (t) {
console.log('> start first')
process.nextTick(function () {
t.on('end', function () {
console.log('> first end event')
})
console.log('> before ending first')
t.end()
console.log('> after ending first')
})
})
t.test('second', function (t) {
console.log('> start second')
process.nextTick(function () {
t.on('end', function () {
console.log('> second end event')
})
console.log('> before ending second')
t.end()
console.log('> after ending second')
})
})
node-tap-11.0.0/test-legacy/test/end-event-timing.tap 0000664 0000000 0000000 00000000525 13206406237 0022365 0 ustar 00root root 0000000 0000000 TAP version 13
> start first
> before ending first
# Subtest: first
1..0
> first end event
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
> start second
> after ending first
> before ending second
# Subtest: second
1..0
> second end event
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
> after ending second
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/end-exception--bail--buffer.tap 0000664 0000000 0000000 00000000376 13206406237 0024267 0 ustar 00root root 0000000 0000000 TAP version 13
end()
ok 1 ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - should be equal
}
not ok 2 - beep
---
{"at":{"column":11,"file":"test-legacy/test/end-exception.js","line":8},"source":"throw new Error('beep')\n"}
...
Bail out! # beep
node-tap-11.0.0/test-legacy/test/end-exception--bail.tap 0000664 0000000 0000000 00000000404 13206406237 0022733 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest
1..1
ok 1 - should be equal
end()
ok 1 ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - beep
---
{"at":{"column":11,"file":"test-legacy/test/end-exception.js","line":8},"source":"throw new Error('beep')\n"}
...
Bail out! # beep
node-tap-11.0.0/test-legacy/test/end-exception--buffer.tap 0000664 0000000 0000000 00000000444 13206406237 0023301 0 ustar 00root root 0000000 0000000 TAP version 13
end()
ok 1 ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - should be equal
}
not ok 2 - beep
---
{"at":{"column":11,"file":"test-legacy/test/end-exception.js","line":8},"source":"throw new Error('beep')\n"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/end-exception.js 0000664 0000000 0000000 00000000256 13206406237 0021606 0 ustar 00root root 0000000 0000000 var test = require('../../').test
test(function (t) {
t.plan(1)
t.on('end', function () {
console.log('end()')
throw new Error('beep')
})
t.equal(3, 3)
})
node-tap-11.0.0/test-legacy/test/end-exception.tap 0000664 0000000 0000000 00000000452 13206406237 0021754 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest
1..1
ok 1 - should be equal
end()
ok 1 ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - beep
---
{"at":{"column":11,"file":"test-legacy/test/end-exception.js","line":8},"source":"throw new Error('beep')\n"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/equivalent--bail--buffer.tap 0000664 0000000 0000000 00000000617 13206406237 0023700 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":3},"compare":"===","found":"foo\nbaz\nbar\n","source":"t.equal('foo\\nbaz\\nbar\\n', 'foo\\nblerb\\nbar\\n')\n","wanted":"foo\nblerb\nbar\n"}
...
Bail out! # should be equal
}
Bail out! # should be equal
node-tap-11.0.0/test-legacy/test/equivalent--bail.tap 0000664 0000000 0000000 00000000557 13206406237 0022357 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: child test
not ok 1 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":3},"compare":"===","found":"foo\nbaz\nbar\n","source":"t.equal('foo\\nbaz\\nbar\\n', 'foo\\nblerb\\nbar\\n')\n","wanted":"foo\nblerb\nbar\n"}
...
Bail out! # should be equal
Bail out! # should be equal
node-tap-11.0.0/test-legacy/test/equivalent--buffer.tap 0000664 0000000 0000000 00000003507 13206406237 0022717 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":3},"compare":"===","found":"foo\nbaz\nbar\n","source":"t.equal('foo\\nbaz\\nbar\\n', 'foo\\nblerb\\nbar\\n')\n","wanted":"foo\nblerb\nbar\n"}
...
not ok 2 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":4},"compare":"===","found":"foo","source":"t.equal('foo', 'foople')\n","wanted":"foople"}
...
not ok 3 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":5},"compare":"===","found":1,"source":"t.equal(1, '1')\n","wanted":"1"}
...
not ok 4 - should be equivalent
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":6},"found":{"bar":1,"extra":9,"foo":"bar"},"source":"t.same({ foo: 'bar', bar: 1, extra: 9 }, { bar: 1, foo: 'baz', missing: true })\n","wanted":{"bar":1,"foo":"baz","missing":true}}
...
not ok 5 - should be equivalent
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":7},"found":{"bar":1,"extra":9,"foo":"bar","foop":2},"source":"t.same({ foop: 2, foo: 'bar', bar: 1, extra: 9 },\n","wanted":{"bar":1,"foo":"baz","foop":2,"missing":true}}
...
not ok 6 - should be equivalent
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":9},"found":{"bar":1,"extra":9,"foo":"baz","prop":1,"x":[1,2]},"source":"t.same({ foo: 'baz', bar: 1, extra: 9, x: [1, 2], prop: 1 }, { prop: 1, bar: 1, foo: 'baz', missing: true, x: [1, 2], z: 1 })\n","wanted":{"bar":1,"foo":"baz","missing":true,"prop":1,"x":[1,2],"z":1}}
...
1..6
# failed 6 of 6 tests
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/equivalent.js 0000664 0000000 0000000 00000000744 13206406237 0021223 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('child test', function (t) {
t.equal('foo\nbaz\nbar\n', 'foo\nblerb\nbar\n')
t.equal('foo', 'foople')
t.equal(1, '1')
t.same({ foo: 'bar', bar: 1, extra: 9 }, { bar: 1, foo: 'baz', missing: true })
t.same({ foop: 2, foo: 'bar', bar: 1, extra: 9 },
{ bar: 1, foo: 'baz', foop: 2, missing: true })
t.same({ foo: 'baz', bar: 1, extra: 9, x: [1, 2], prop: 1 }, { prop: 1, bar: 1, foo: 'baz', missing: true, x: [1, 2], z: 1 })
t.end()
})
node-tap-11.0.0/test-legacy/test/equivalent.tap 0000664 0000000 0000000 00000003531 13206406237 0021370 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: child test
not ok 1 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":3},"compare":"===","found":"foo\nbaz\nbar\n","source":"t.equal('foo\\nbaz\\nbar\\n', 'foo\\nblerb\\nbar\\n')\n","wanted":"foo\nblerb\nbar\n"}
...
not ok 2 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":4},"compare":"===","found":"foo","source":"t.equal('foo', 'foople')\n","wanted":"foople"}
...
not ok 3 - should be equal
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":5},"compare":"===","found":1,"source":"t.equal(1, '1')\n","wanted":"1"}
...
not ok 4 - should be equivalent
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":6},"found":{"bar":1,"extra":9,"foo":"bar"},"source":"t.same({ foo: 'bar', bar: 1, extra: 9 }, { bar: 1, foo: 'baz', missing: true })\n","wanted":{"bar":1,"foo":"baz","missing":true}}
...
not ok 5 - should be equivalent
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":7},"found":{"bar":1,"extra":9,"foo":"bar","foop":2},"source":"t.same({ foop: 2, foo: 'bar', bar: 1, extra: 9 },\n","wanted":{"bar":1,"foo":"baz","foop":2,"missing":true}}
...
not ok 6 - should be equivalent
---
{"at":{"column":5,"file":"test-legacy/test/equivalent.js","line":9},"found":{"bar":1,"extra":9,"foo":"baz","prop":1,"x":[1,2]},"source":"t.same({ foo: 'baz', bar: 1, extra: 9, x: [1, 2], prop: 1 }, { prop: 1, bar: 1, foo: 'baz', missing: true, x: [1, 2], z: 1 })\n","wanted":{"bar":1,"foo":"baz","missing":true,"prop":1,"x":[1,2],"z":1}}
...
1..6
# failed 6 of 6 tests
not ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/exit-on-bailout--bail--buffer.tap 0000664 0000000 0000000 00000000473 13206406237 0024543 0 ustar 00root root 0000000 0000000 log in root, before child
TAP version 13
log in child, before grandchild
log in grandchild, before bailout
log in grandchild, after bailout
log in child, after grandchild
not ok 1 - child {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
Bail out! cannot continue
}
}
Bail out! cannot continue
node-tap-11.0.0/test-legacy/test/exit-on-bailout--bail.tap 0000664 0000000 0000000 00000000323 13206406237 0023211 0 ustar 00root root 0000000 0000000 log in root, before child
TAP version 13
log in child, before grandchild
# Subtest: child
log in grandchild, before bailout
# Subtest: grandchild
Bail out! cannot continue
Bail out! cannot continue
node-tap-11.0.0/test-legacy/test/exit-on-bailout--buffer.tap 0000664 0000000 0000000 00000000473 13206406237 0023561 0 ustar 00root root 0000000 0000000 log in root, before child
TAP version 13
log in child, before grandchild
log in grandchild, before bailout
log in grandchild, after bailout
log in child, after grandchild
not ok 1 - child {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
Bail out! cannot continue
}
}
Bail out! cannot continue
node-tap-11.0.0/test-legacy/test/exit-on-bailout.js 0000664 0000000 0000000 00000000763 13206406237 0022067 0 ustar 00root root 0000000 0000000 var tap = require('../..')
setInterval(function () {
console.log('this should not happen')
}, 1000)
console.log('log in root, before child')
tap.test('child', function (t) {
console.log('log in child, before grandchild')
t.test('grandchild', function (t) {
console.log('log in grandchild, before bailout')
t.bailout('cannot continue')
console.log('log in grandchild, after bailout')
})
console.log('log in child, after grandchild')
})
console.log('log in root, after child')
node-tap-11.0.0/test-legacy/test/exit-on-bailout.tap 0000664 0000000 0000000 00000000323 13206406237 0022227 0 ustar 00root root 0000000 0000000 log in root, before child
TAP version 13
log in child, before grandchild
# Subtest: child
log in grandchild, before bailout
# Subtest: grandchild
Bail out! cannot continue
Bail out! cannot continue
node-tap-11.0.0/test-legacy/test/exit-on-exit--buffer.tap 0000664 0000000 0000000 00000002547 13206406237 0023077 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~exit-on-exit.js subtest ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - memoizes identical registry requests ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - got a manifest
ok 2 - got a manifest
}
ok 2 - tag requests memoize versions ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - (unnamed test)
ok 2 - (unnamed test)
}
ok 3 - tag requests memoize tags ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - got a manifest
ok 2 - got a manifest
}
ok 4 - memoization is scoped to a given cache # TODO
ok 5 - inflights concurrent requests ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - got a manifest
ok 2 - got a manifest
}
ok 6 - supports fetching from an optional cache ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should be equivalent
1..1
}
ok 7 - expires stale request data # TODO
ok 8 - falls back to registry if cache entry is invalid JSON # TODO
ok 9 - does not insert plain manifests into the cache # TODO
ok 10 - falls back to registry if cache entry missing ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 11 - allows forcing use of cache when data stale # TODO
1..11
# todo: 5
___/# time=[0-9.]+(ms)?/~~~
}
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/exit-on-exit.js 0000664 0000000 0000000 00000003056 13206406237 0021377 0 ustar 00root root 0000000 0000000 process.on('exit', function (code) {
process.exit()
})
var t = require('../..')
if (process.argv[2] !== 'subtest')
t.spawn(process.execPath, [__filename, 'subtest'], { buffered: true })
else {
var BIG = 10
t.test('memoizes identical registry requests', function (t) {
t.tearDown(function () {})
t.plan(2)
setTimeout(function () {
t.pass('got a manifest')
t.pass('got a manifest')
})
})
t.test('tag requests memoize versions', function (t) {
t.plan(2)
setTimeout(t.pass.bind('got a manifest'))
setTimeout(t.pass.bind('got a manifest'))
})
t.test('tag requests memoize tags', function (t) {
t.plan(2)
t.tearDown(function () {})
setTimeout(function () {
t.pass('got a manifest')
t.pass('got a manifest')
})
})
t.test('memoization is scoped to a given cache')
t.test('inflights concurrent requests', function (t) {
t.plan(2)
t.tearDown(function () {})
setTimeout(function () {
t.pass('got a manifest')
t.pass('got a manifest')
})
})
t.test('supports fetching from an optional cache', function (t) {
t.same(1, '1')
t.tearDown(function () {})
setTimeout(t.end)
})
t.test('expires stale request data')
t.test('falls back to registry if cache entry is invalid JSON')
t.test('does not insert plain manifests into the cache')
t.test('falls back to registry if cache entry missing', function (t) {
t.tearDown(function () {})
setTimeout(function () {
t.end()
})
})
t.test('allows forcing use of cache when data stale')
}
node-tap-11.0.0/test-legacy/test/exit-on-exit.tap 0000664 0000000 0000000 00000003143 13206406237 0021544 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~exit-on-exit.js subtest ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: memoizes identical registry requests
1..2
ok 1 - got a manifest
ok 2 - got a manifest
ok 1 - memoizes identical registry requests ___/# time=[0-9.]+(ms)?/~~~
# Subtest: tag requests memoize versions
1..2
ok 1 - (unnamed test)
ok 2 - (unnamed test)
ok 2 - tag requests memoize versions ___/# time=[0-9.]+(ms)?/~~~
# Subtest: tag requests memoize tags
1..2
ok 1 - got a manifest
ok 2 - got a manifest
ok 3 - tag requests memoize tags ___/# time=[0-9.]+(ms)?/~~~
ok 4 - memoization is scoped to a given cache # TODO
# Subtest: inflights concurrent requests
1..2
ok 1 - got a manifest
ok 2 - got a manifest
ok 5 - inflights concurrent requests ___/# time=[0-9.]+(ms)?/~~~
# Subtest: supports fetching from an optional cache
ok 1 - should be equivalent
1..1
ok 6 - supports fetching from an optional cache ___/# time=[0-9.]+(ms)?/~~~
ok 7 - expires stale request data # TODO
ok 8 - falls back to registry if cache entry is invalid JSON # TODO
ok 9 - does not insert plain manifests into the cache # TODO
# Subtest: falls back to registry if cache entry missing
1..0
ok 10 - falls back to registry if cache entry missing ___/# time=[0-9.]+(ms)?/~~~
ok 11 - allows forcing use of cache when data stale # TODO
1..11
# todo: 5
___/# time=[0-9.]+(ms)?/~~~
}
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/grep--buffer.tap 0000664 0000000 0000000 00000005741 13206406237 0021501 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ./test-legacy/test/ok.js -C --grep=nesting --grep=/[ASDF].*d$/gi ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - ___/.*/~~~ok.js ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first # SKIP filter: /[ASDF].*d$/gi
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
ok 3 - nested ok
1..3
}
# skip: 1
}
ok 2 - this passes
ok 3 - this passes too
ok 4 - async kid # SKIP filter: /nesting/
ok 5 - pass after async kid
1..5
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
}
1..1
___/# time=[0-9.]+(ms)?/~~~
}
ok 2 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ./test-legacy/test/ok.js -C -i --grep=nesting --grep=/[ASDF].*d$/gi ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - ___/.*/~~~ok.js ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - nesting # SKIP filter out: /nesting/
ok 2 - this passes
ok 3 - this passes too
ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - timeout
ok 2 - timeout
}
ok 5 - pass after async kid
1..5
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
}
1..1
___/# time=[0-9.]+(ms)?/~~~
}
# invert=false
ok 3 - a ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - x ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - abc ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - 123 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine
1..1
}
ok 2 - ijk # SKIP filter: /[246]+/
1..2
# skip: 1
}
ok 2 - xyz # SKIP filter: /b/
1..2
# skip: 1
}
ok 2 - y ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - abc ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - 123 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine
1..1
}
ok 2 - ijk # SKIP filter: /[246]+/
1..2
# skip: 1
}
ok 2 - xyz # SKIP filter: /b/
1..2
# skip: 1
}
ok 3 - z # SKIP filter: /[^z]/
1..3
# skip: 1
}
# invert=true
ok 4 - a ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - x # SKIP filter out: /[^z]/
ok 2 - y # SKIP filter out: /[^z]/
ok 3 - z ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - abc # SKIP filter out: /b/
ok 2 - xyz ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - 123 # SKIP filter out: /[246]+/
ok 2 - ijk ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine
1..1
}
1..2
# skip: 1
}
1..2
# skip: 1
}
1..3
# skip: 2
}
1..4
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/grep.js 0000664 0000000 0000000 00000001674 13206406237 0020006 0 ustar 00root root 0000000 0000000 // node bin/run.js test/test/ok.js -C --grep=nesting --grep=/[ASDF].*d$/gi
var run = require.resolve('../../bin/run.js')
var node = process.execPath
var ok = require.resolve('./ok.js')
var t = require('../..')
var greps = ['--grep=nesting', '--grep=/[ASDF].*d$/gi']
var spawn = require('child_process').spawn
t.spawn(node, [run, ok, '-C'].concat(greps))
t.spawn(node, [run, ok, '-C', '-i'].concat(greps))
var inverts = [ false, true ]
inverts.forEach(function (invert) {
t.comment('invert=%j', invert)
t.test('a', {
grepInvert: invert,
grep: [/[^z]/, /b/, /[246]+/]
}, function (t) {
t.test('x', top)
t.test('y', top)
t.test('z', top)
t.end()
function top (t) {
t.test('abc', second)
t.test('xyz', second)
t.end()
}
function second (t) {
t.test('123', leaf)
t.test('ijk', leaf)
t.end()
}
function leaf (t) {
t.pass('this is fine')
t.end()
}
})
})
node-tap-11.0.0/test-legacy/test/grep.tap 0000664 0000000 0000000 00000006635 13206406237 0020160 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ./test-legacy/test/ok.js -C --grep=nesting --grep=/[ASDF].*d$/gi
# Subtest: ___/.*/~~~ok.js
# Subtest: nesting
1..2
ok 1 - first # SKIP filter: /[ASDF].*d$/gi
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
ok 3 - nested ok
1..3
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
# skip: 1
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~
ok 2 - this passes
ok 3 - this passes too
ok 4 - async kid # SKIP filter: /nesting/
ok 5 - pass after async kid
1..5
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*/~~~ok.js ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ./test-legacy/test/ok.js -C --grep=nesting --grep=/[ASDF].*d$/gi ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ./test-legacy/test/ok.js -C -i --grep=nesting --grep=/[ASDF].*d$/gi
# Subtest: ___/.*/~~~ok.js
ok 1 - nesting # SKIP filter out: /nesting/
ok 2 - this passes
ok 3 - this passes too
# Subtest: async kid
1..2
ok 1 - timeout
ok 2 - timeout
ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~
ok 5 - pass after async kid
1..5
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*/~~~ok.js ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
ok 2 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ./test-legacy/test/ok.js -C -i --grep=nesting --grep=/[ASDF].*d$/gi ___/# time=[0-9.]+(ms)?/~~~
# invert=false
# Subtest: a
# Subtest: x
# Subtest: abc
# Subtest: 123
ok 1 - this is fine
1..1
ok 1 - 123 ___/# time=[0-9.]+(ms)?/~~~
ok 2 - ijk # SKIP filter: /[246]+/
1..2
# skip: 1
ok 1 - abc ___/# time=[0-9.]+(ms)?/~~~
ok 2 - xyz # SKIP filter: /b/
1..2
# skip: 1
ok 1 - x ___/# time=[0-9.]+(ms)?/~~~
# Subtest: y
# Subtest: abc
# Subtest: 123
ok 1 - this is fine
1..1
ok 1 - 123 ___/# time=[0-9.]+(ms)?/~~~
ok 2 - ijk # SKIP filter: /[246]+/
1..2
# skip: 1
ok 1 - abc ___/# time=[0-9.]+(ms)?/~~~
ok 2 - xyz # SKIP filter: /b/
1..2
# skip: 1
ok 2 - y ___/# time=[0-9.]+(ms)?/~~~
ok 3 - z # SKIP filter: /[^z]/
1..3
# skip: 1
ok 3 - a ___/# time=[0-9.]+(ms)?/~~~
# invert=true
# Subtest: a
ok 1 - x # SKIP filter out: /[^z]/
ok 2 - y # SKIP filter out: /[^z]/
# Subtest: z
ok 1 - abc # SKIP filter out: /b/
# Subtest: xyz
ok 1 - 123 # SKIP filter out: /[246]+/
# Subtest: ijk
ok 1 - this is fine
1..1
ok 2 - ijk ___/# time=[0-9.]+(ms)?/~~~
1..2
# skip: 1
ok 2 - xyz ___/# time=[0-9.]+(ms)?/~~~
1..2
# skip: 1
ok 3 - z ___/# time=[0-9.]+(ms)?/~~~
1..3
# skip: 2
ok 4 - a ___/# time=[0-9.]+(ms)?/~~~
1..4
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/mocha-bdd--buffer.tap 0000664 0000000 0000000 00000002304 13206406237 0022352 0 ustar 00root root 0000000 0000000 TAP version 13
before
beforeEach should not throw an error
during should not throw an error
afterEach should not throw an error
beforeEach should return -1
during should return -1
afterEach should return -1
beforeEach should return the index where the element first appears in the array
during should return the index where the element first appears in the array
afterEach should return the index where the element first appears in the array
after
after named
ok 1 - Array ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - #indexOf() ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - when not present ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should not throw an error ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 2 - should return -1 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..2
}
ok 2 - when present ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should return the index where the element first appears in the array ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..1
}
1..2
}
1..1
}
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/mocha-bdd.js 0000664 0000000 0000000 00000002117 13206406237 0020660 0 ustar 00root root 0000000 0000000 if (typeof describe === 'undefined')
require('../..').mochaGlobals()
if (typeof Promise === 'undefined')
Promise = require('bluebird')
describe('Array', function () {
before('name', function (cb) {
console.log('before')
setTimeout(cb)
})
after(function () {
console.log('after')
})
after('named', function () {
console.log('after named')
})
beforeEach(function () {
console.log('beforeEach', this.name)
return new Promise(function (res) {
setTimeout(res)
})
})
afterEach(function (cb) {
console.log('afterEach', this.name)
return setTimeout(cb)
})
describe('#indexOf()', function() {
context('when not present', function() {
it('should not throw an error', function() {
console.log('during', this.name)
})
it('should return -1', function() {
console.log('during', this.name)
})
})
context('when present', function() {
it('should return the index where the element first appears in the array', function() {
console.log('during', this.name)
})
})
})
})
node-tap-11.0.0/test-legacy/test/mocha-bdd.tap 0000664 0000000 0000000 00000002624 13206406237 0021033 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: Array
before
beforeEach should not throw an error
during should not throw an error
afterEach should not throw an error
# Subtest: #indexOf()
# Subtest: when not present
# Subtest: should not throw an error
1..0
ok 1 - should not throw an error ___/# time=[0-9.]+(ms)?/~~~
beforeEach should return -1
during should return -1
afterEach should return -1
# Subtest: should return -1
1..0
ok 2 - should return -1 ___/# time=[0-9.]+(ms)?/~~~
1..2
ok 1 - when not present ___/# time=[0-9.]+(ms)?/~~~
beforeEach should return the index where the element first appears in the array
during should return the index where the element first appears in the array
afterEach should return the index where the element first appears in the array
# Subtest: when present
# Subtest: should return the index where the element first appears in the array
1..0
ok 1 - should return the index where the element first appears in the array ___/# time=[0-9.]+(ms)?/~~~
1..1
ok 2 - when present ___/# time=[0-9.]+(ms)?/~~~
1..2
ok 1 - #indexOf() ___/# time=[0-9.]+(ms)?/~~~
after
after named
1..1
ok 1 - Array ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/mochalike--bail--buffer.tap 0000664 0000000 0000000 00000003540 13206406237 0023455 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..3
# todo: 2
}
1..3
# todo: 2
}
ok 2 - describe todo # TODO
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
}
ok 4 - reasonably indented things ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - has no asserts, only fails to throw ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 2 - is todo # TODO
ok 3 - is async ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..3
# todo: 1
}
ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..2
}
not ok 5 - failing indented things ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - has no asserts, only throws ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - false is not true on line 50
---
{"actual":false,"at":{"column":7,"file":"test-legacy/test/mochalike.js","line":52},"expected":true,"generatedMessage":false,"operator":"==","source":"ok(false, 'false is not true on line 50')\n","test":"has no asserts, only throws","type":"AssertionError"}
...
Bail out! # false is not true on line 50
}
}
}
Bail out! # false is not true on line 50
node-tap-11.0.0/test-legacy/test/mochalike--bail.tap 0000664 0000000 0000000 00000003757 13206406237 0022143 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: a set of tests to be done later
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
# Subtest: the subset
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
# Subtest: has some of these things
1..0
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~
ok 2 - describe todo # TODO
# Subtest: another set of tests
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~
# Subtest: reasonably indented things
# Subtest: first subset
# Subtest: has no asserts, only fails to throw
1..0
ok 1 - has no asserts, only fails to throw ___/# time=[0-9.]+(ms)?/~~~
ok 2 - is todo # TODO
# Subtest: is async
1..0
ok 3 - is async ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 1
ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second subset
1..0
ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~
1..2
ok 4 - reasonably indented things ___/# time=[0-9.]+(ms)?/~~~
# Subtest: failing indented things
# Subtest: first subset
# Subtest: has no asserts, only throws
not ok 1 - false is not true on line 50
---
{"actual":false,"at":{"column":7,"file":"test-legacy/test/mochalike.js","line":52},"expected":true,"generatedMessage":false,"operator":"==","source":"ok(false, 'false is not true on line 50')\n","test":"has no asserts, only throws","type":"AssertionError"}
...
Bail out! # false is not true on line 50
Bail out! # false is not true on line 50
node-tap-11.0.0/test-legacy/test/mochalike--buffer.tap 0000664 0000000 0000000 00000005565 13206406237 0022504 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..3
# todo: 2
}
1..3
# todo: 2
}
ok 2 - describe todo # TODO
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
}
ok 4 - reasonably indented things ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - has no asserts, only fails to throw ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 2 - is todo # TODO
ok 3 - is async ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..3
# todo: 1
}
ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..2
}
not ok 5 - failing indented things ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - has no asserts, only throws ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - false is not true on line 50
---
{"actual":false,"at":{"column":7,"file":"test-legacy/test/mochalike.js","line":52},"expected":true,"generatedMessage":false,"operator":"==","source":"ok(false, 'false is not true on line 50')\n","test":"has no asserts, only throws","type":"AssertionError"}
...
1..1
# failed 1 test
}
ok 2 - does not throw # TODO
1..2
# failed 1 of 2 tests
# todo: 1
}
not ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - objectify the truthiness
---
{"actual":false,"at":{"column":5,"file":"test-legacy/test/mochalike.js","line":58},"expected":true,"generatedMessage":false,"operator":"==","source":"ok(!{}, 'objectify the truthiness')\n","test":"second subset","type":"AssertionError"}
...
1..1
# failed 1 test
}
1..2
# failed 2 of 2 tests
}
not ok 6 - a test passing an error to done() callback ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - is marked as failed ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - error arg
---
{"at":{"column":12,"file":"test-legacy/test/mochalike.js","line":65},"source":"done(new Error('error arg'))\n","test":"is marked as failed"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..6
# failed 2 of 6 tests
# todo: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/mochalike-ok--buffer.tap 0000664 0000000 0000000 00000002337 13206406237 0023105 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..3
# todo: 2
}
1..3
# todo: 2
}
ok 2 - describe todo # TODO
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
}
ok 4 - reasonably indented things ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - has no asserts, only fails to throw ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 2 - is todo # TODO
ok 3 - is async ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..3
# todo: 1
}
ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..2
}
1..4
# todo: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/mochalike-ok.js 0000664 0000000 0000000 00000002172 13206406237 0021406 0 ustar 00root root 0000000 0000000 if (typeof describe !== 'function') {
var t = require('../..')
t.mochaGlobals()
}
/* global describe, it */
var ok = require('../fixtures/assert.js')
describe('a set of tests to be done later', function () {
it('should have a thingie')
it('should have a second whoosits also')
describe('the subset', function () {
it('should be a child thingie')
it('should also be a whoosits')
it('has some of these things', function (done) {
ok(true, 'true is truthy')
ok(10, 'ten is also truthy')
setTimeout(function () {
done()
})
})
})
})
describe('describe todo')
describe('another set of tests', function () {
it('is a second set')
it('looks like english')
it('is marked TODO')
})
describe('reasonably indented things', function () {
describe('first subset', function () {
it('has no asserts, only fails to throw', function () {
// no throwing here
})
it('is todo')
it('is async', function (done) {
setTimeout(done)
})
})
describe('second subset', function () {
ok(true, 'true is truly truthy')
ok({}, 'objectify the truthiness')
})
})
node-tap-11.0.0/test-legacy/test/mochalike-ok.tap 0000664 0000000 0000000 00000002732 13206406237 0021560 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: a set of tests to be done later
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
# Subtest: the subset
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
# Subtest: has some of these things
1..0
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~
ok 2 - describe todo # TODO
# Subtest: another set of tests
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~
# Subtest: reasonably indented things
# Subtest: first subset
# Subtest: has no asserts, only fails to throw
1..0
ok 1 - has no asserts, only fails to throw ___/# time=[0-9.]+(ms)?/~~~
ok 2 - is todo # TODO
# Subtest: is async
1..0
ok 3 - is async ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 1
ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second subset
1..0
ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~
1..2
ok 4 - reasonably indented things ___/# time=[0-9.]+(ms)?/~~~
1..4
# todo: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/mochalike.js 0000664 0000000 0000000 00000003272 13206406237 0021001 0 ustar 00root root 0000000 0000000 if (typeof describe !== 'function')
require('../../lib/mocha.js').global()
/* global describe, it */
var ok = require('../fixtures/assert.js')
describe('a set of tests to be done later', function () {
it('should have a thingie')
it('should have a second whoosits also')
describe('the subset', function () {
it('should be a child thingie')
it('should also be a whoosits')
it('has some of these things', function (done) {
ok(true, 'true is truthy')
ok(10, 'ten is also truthy')
setTimeout(function () {
done()
})
})
})
})
describe('describe todo')
describe('another set of tests', function () {
it('is a second set')
it('looks like english')
it('is marked TODO')
})
describe('reasonably indented things', function () {
describe('first subset', function () {
it('has no asserts, only fails to throw', function () {
// no throwing here
})
it('is todo')
it('is async', function (done) {
setTimeout(done)
})
})
describe('second subset', function () {
ok(true, 'true is truly truthy')
ok({}, 'objectify the truthiness')
})
})
describe('failing indented things', function () {
describe('first subset', function () {
'just some line breaks'
it('has no asserts, only throws', function () {
ok(false, 'false is not true on line 50')
})
it('does not throw')
})
describe('second subset', function () {
ok(true, 'true is truly truthy')
ok(!{}, 'objectify the truthiness')
})
})
describe('a test passing an error to done() callback', function () {
it('is marked as failed', function (done) {
process.nextTick(function () {
done(new Error('error arg'))
})
})
})
node-tap-11.0.0/test-legacy/test/mochalike.tap 0000664 0000000 0000000 00000006450 13206406237 0021152 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: a set of tests to be done later
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
# Subtest: the subset
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
# Subtest: has some of these things
1..0
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~
ok 2 - describe todo # TODO
# Subtest: another set of tests
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~
# Subtest: reasonably indented things
# Subtest: first subset
# Subtest: has no asserts, only fails to throw
1..0
ok 1 - has no asserts, only fails to throw ___/# time=[0-9.]+(ms)?/~~~
ok 2 - is todo # TODO
# Subtest: is async
1..0
ok 3 - is async ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 1
ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second subset
1..0
ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~
1..2
ok 4 - reasonably indented things ___/# time=[0-9.]+(ms)?/~~~
# Subtest: failing indented things
# Subtest: first subset
# Subtest: has no asserts, only throws
not ok 1 - false is not true on line 50
---
{"actual":false,"at":{"column":7,"file":"test-legacy/test/mochalike.js","line":52},"expected":true,"generatedMessage":false,"operator":"==","source":"ok(false, 'false is not true on line 50')\n","test":"has no asserts, only throws","type":"AssertionError"}
...
1..1
# failed 1 test
not ok 1 - has no asserts, only throws ___/# time=[0-9.]+(ms)?/~~~
ok 2 - does not throw # TODO
1..2
# failed 1 of 2 tests
# todo: 1
not ok 1 - first subset ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second subset
not ok 1 - objectify the truthiness
---
{"actual":false,"at":{"column":5,"file":"test-legacy/test/mochalike.js","line":58},"expected":true,"generatedMessage":false,"operator":"==","source":"ok(!{}, 'objectify the truthiness')\n","test":"second subset","type":"AssertionError"}
...
1..1
# failed 1 test
not ok 2 - second subset ___/# time=[0-9.]+(ms)?/~~~
1..2
# failed 2 of 2 tests
not ok 5 - failing indented things ___/# time=[0-9.]+(ms)?/~~~
# Subtest: a test passing an error to done() callback
# Subtest: is marked as failed
not ok 1 - error arg
---
{"at":{"column":12,"file":"test-legacy/test/mochalike.js","line":65},"source":"done(new Error('error arg'))\n","test":"is marked as failed"}
...
1..1
# failed 1 test
not ok 1 - is marked as failed ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
not ok 6 - a test passing an error to done() callback ___/# time=[0-9.]+(ms)?/~~~
1..6
# failed 2 of 6 tests
# todo: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/nesting--bail--buffer.tap 0000664 0000000 0000000 00000001153 13206406237 0023166 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
}
}
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/nesting--bail.tap 0000664 0000000 0000000 00000001064 13206406237 0021643 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/nesting--buffer.tap 0000664 0000000 0000000 00000002266 13206406237 0022212 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
1..3
# failed 1 of 3 tests
}
# failed 1 of 2 tests
}
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/nesting.js","line":28},"source":"t.fail('this fails')\n"}
...
not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - second timeout
not ok 2 - first timeout
---
{"at":{"column":7,"file":"test-legacy/test/nesting.js","line":33,"method":"_onTimeout"},"foo":"blz","source":"t.ok(false, 'first timeout', { foo: 'blz' })\n"}
...
# failed 1 of 2 tests
}
ok 5 - pass after async kid
1..5
# failed 3 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/nesting.js 0000664 0000000 0000000 00000001404 13206406237 0020507 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('nesting', function (t) {
t.plan(2)
t.test('first', function (tt) {
tt.plan(2)
tt.ok(true, 'true is ok')
tt.assert('doeg', 'doag is also okay')
})
t.test('second', function (tt) {
function foo () {
tt.ok('no plan', 'but that is ok')
tt.pass('this passes')
tt.equal(1, '1', 'nested failure')
tt.end()
}
function bar () {
return foo()
}
function baz () {
return bar()
}
baz()
})
})
t.pass('this passes')
t.fail('this fails')
t.test('async kid', function (t) {
t.plan(2)
setTimeout(function () {
t.ok(false, 'first timeout', { foo: 'blz' })
}, 50)
setTimeout(function () {
t.pass('second timeout')
})
})
t.pass('pass after async kid')
node-tap-11.0.0/test-legacy/test/nesting.tap 0000664 0000000 0000000 00000002361 13206406237 0020662 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/nesting.js","line":14},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
1..3
# failed 1 of 3 tests
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
# failed 1 of 2 tests
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/nesting.js","line":28},"source":"t.fail('this fails')\n"}
...
# Subtest: async kid
1..2
ok 1 - second timeout
not ok 2 - first timeout
---
{"at":{"column":7,"file":"test-legacy/test/nesting.js","line":33,"method":"_onTimeout"},"foo":"blz","source":"t.ok(false, 'first timeout', { foo: 'blz' })\n"}
...
# failed 1 of 2 tests
not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~
ok 5 - pass after async kid
1..5
# failed 3 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/no-diags--bail--buffer.tap 0000664 0000000 0000000 00000000105 13206406237 0023214 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
Bail out! # this is not ok
node-tap-11.0.0/test-legacy/test/no-diags--bail.tap 0000664 0000000 0000000 00000000105 13206406237 0021670 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
Bail out! # this is not ok
node-tap-11.0.0/test-legacy/test/no-diags--buffer.tap 0000664 0000000 0000000 00000000333 13206406237 0022235 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
not ok 2 - not ok subtest ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - diagnostics not ok
1..1
# failed 1 test
}
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/no-diags.js 0000664 0000000 0000000 00000000313 13206406237 0020537 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.fail('this is not ok', { diagnostic: false })
t.test('not ok subtest', { diagnostic: false }, function (t) {
t.fail('diagnostics not ok', { diagnostic: false })
t.end()
})
node-tap-11.0.0/test-legacy/test/no-diags.tap 0000664 0000000 0000000 00000000361 13206406237 0020712 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
# Subtest: not ok subtest
not ok 1 - diagnostics not ok
1..1
# failed 1 test
not ok 2 - not ok subtest ___/# time=[0-9.]+(ms)?/~~~
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/non-tap-output--buffer.tap 0000664 0000000 0000000 00000000341 13206406237 0023445 0 ustar 00root root 0000000 0000000 everything is fine
there are no errors
this output is not haiku.
is 8 ok?
ok, 8 can stay.
ok 100 might be confusing
but: nevertheless, here we are
this: is indented
and: it
might: ~
be: yaml?
ok done now, exiting
node-tap-11.0.0/test-legacy/test/non-tap-output.js 0000664 0000000 0000000 00000000510 13206406237 0021747 0 ustar 00root root 0000000 0000000 console.log('everything is fine\n' +
'there are no errors\n' +
'this output is not haiku.\n\n' +
'is 8 ok?\n' +
'ok, 8 can stay.\n' +
'ok 100 might be confusing\n' +
' but: nevertheless, here we are\n' +
' this: is indented\n' +
' and: it\n' +
' might: ~\n' +
' be: yaml?\n' +
'ok done now, exiting')
node-tap-11.0.0/test-legacy/test/non-tap-output.tap 0000664 0000000 0000000 00000000341 13206406237 0022121 0 ustar 00root root 0000000 0000000 everything is fine
there are no errors
this output is not haiku.
is 8 ok?
ok, 8 can stay.
ok 100 might be confusing
but: nevertheless, here we are
this: is indented
and: it
might: ~
be: yaml?
ok done now, exiting
node-tap-11.0.0/test-legacy/test/not-ok--bail--buffer.tap 0000664 0000000 0000000 00000000273 13206406237 0022730 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
---
{"at":{"column":3,"file":"test-legacy/test/not-ok.js","line":3},"source":"t.fail('this is not ok')\n"}
...
Bail out! # this is not ok
node-tap-11.0.0/test-legacy/test/not-ok--bail.tap 0000664 0000000 0000000 00000000273 13206406237 0021404 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
---
{"at":{"column":3,"file":"test-legacy/test/not-ok.js","line":3},"source":"t.fail('this is not ok')\n"}
...
Bail out! # this is not ok
node-tap-11.0.0/test-legacy/test/not-ok--buffer.tap 0000664 0000000 0000000 00000000321 13206406237 0021740 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
---
{"at":{"column":3,"file":"test-legacy/test/not-ok.js","line":3},"source":"t.fail('this is not ok')\n"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/not-ok-nested--bail--buffer.tap 0000664 0000000 0000000 00000000543 13206406237 0024210 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - gp ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test-legacy/test/not-ok-nested.js","line":7},"source":"t.fail('fail')\n"}
...
Bail out! # fail
}
}
Bail out! # fail
node-tap-11.0.0/test-legacy/test/not-ok-nested--bail.tap 0000664 0000000 0000000 00000000437 13206406237 0022666 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: gp
1..1
# Subtest: parent
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test-legacy/test/not-ok-nested.js","line":7},"source":"t.fail('fail')\n"}
...
Bail out! # fail
Bail out! # fail
node-tap-11.0.0/test-legacy/test/not-ok-nested--buffer.tap 0000664 0000000 0000000 00000000634 13206406237 0023227 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - gp ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test-legacy/test/not-ok-nested.js","line":7},"source":"t.fail('fail')\n"}
...
# failed 1 test
}
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/not-ok-nested.js 0000664 0000000 0000000 00000000215 13206406237 0021526 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('gp', function (t) {
t.plan(1)
t.test('parent', function (t) {
t.plan(1)
t.fail('fail')
})
})
node-tap-11.0.0/test-legacy/test/not-ok-nested.tap 0000664 0000000 0000000 00000000664 13206406237 0021706 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: gp
1..1
# Subtest: parent
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test-legacy/test/not-ok-nested.js","line":7},"source":"t.fail('fail')\n"}
...
# failed 1 test
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
# failed 1 test
not ok 1 - gp ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/not-ok.js 0000664 0000000 0000000 00000000063 13206406237 0020247 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.fail('this is not ok')
node-tap-11.0.0/test-legacy/test/not-ok.tap 0000664 0000000 0000000 00000000321 13206406237 0020414 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - this is not ok
---
{"at":{"column":3,"file":"test-legacy/test/not-ok.js","line":3},"source":"t.fail('this is not ok')\n"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok--buffer.tap 0000664 0000000 0000000 00000001050 13206406237 0021142 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
ok 3 - nested ok
1..3
}
}
ok 2 - this passes
ok 3 - this passes too
ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - timeout
ok 2 - timeout
}
ok 5 - pass after async kid
1..5
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok-diags--buffer.tap 0000664 0000000 0000000 00000000271 13206406237 0022233 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
---
{"foo":{"bar":"baz"}}
...
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - this is fine
}
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok-diags.js 0000664 0000000 0000000 00000000303 13206406237 0020533 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.pass('this is fine',{
diagnostic: true,
foo: {
bar: 'baz'
}
})
t.test('child', { diagnostic: true }, function (t) {
t.plan(1)
t.pass('this is fine')
})
node-tap-11.0.0/test-legacy/test/ok-diags.tap 0000664 0000000 0000000 00000000306 13206406237 0020706 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
---
{"foo":{"bar":"baz"}}
...
# Subtest: child
1..1
ok 1 - this is fine
ok 2 - child ___/# time=[0-9.]+(ms)?/~~~
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok-exit-fail--bail--buffer.tap 0000664 0000000 0000000 00000000146 13206406237 0024011 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this passes but the exit code makes it not ok
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok-exit-fail--bail.tap 0000664 0000000 0000000 00000000146 13206406237 0022465 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this passes but the exit code makes it not ok
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok-exit-fail--buffer.tap 0000664 0000000 0000000 00000000146 13206406237 0023027 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this passes but the exit code makes it not ok
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok-exit-fail.js 0000664 0000000 0000000 00000000141 13206406237 0021326 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.pass('this passes but the exit code makes it not ok')
process.exit(1)
node-tap-11.0.0/test-legacy/test/ok-exit-fail.tap 0000664 0000000 0000000 00000000146 13206406237 0021503 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this passes but the exit code makes it not ok
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/ok.js 0000664 0000000 0000000 00000001652 13206406237 0017456 0 ustar 00root root 0000000 0000000 var t = require('../..')
var test = t.test
test(function nesting (t) {
var plan = t.plan
var test = t.test
plan(2)
test('first', function (tt) {
var plan = tt.plan
var ok = tt.ok
var assert = tt.assert
plan(2)
ok(true, 'true is ok')
assert('doeg', 'doag is also okay')
})
test('second', function (tt) {
var pass = tt.pass
var ok = tt.ok
var equal = tt.equal
var done = tt.done
function foo () {
ok('no plan', 'but that is ok')
pass('this passes')
equal(1, 1, 'nested ok')
done()
}
function bar () {
return foo()
}
function baz () {
return bar()
}
baz()
})
})
t.pass('this passes')
t.pass('this passes too')
t.test('async kid', function (t) {
t.plan(2)
setTimeout(function () {
t.ok(true, 'timeout', { foo: 'blz' })
})
setTimeout(function () {
t.pass('timeout')
})
})
t.pass('pass after async kid')
node-tap-11.0.0/test-legacy/test/ok.tap 0000664 0000000 0000000 00000001150 13206406237 0017617 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
ok 3 - nested ok
1..3
ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~
ok 2 - this passes
ok 3 - this passes too
# Subtest: async kid
1..2
ok 1 - timeout
ok 2 - timeout
ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~
ok 5 - pass after async kid
1..5
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/only--buffer.tap 0000664 0000000 0000000 00000005312 13206406237 0021517 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~only.js child ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - normal ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine
1..1
}
# "only" has `only` set but all tests run
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - only do this
1..1
}
# "only" has `only` set but all tests run
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - only do this
1..1
}
1..3
___/# time=[0-9.]+(ms)?/~~~
}
ok 2 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~only.js child ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - normal # SKIP filter: only
# Subtest: only
ok 1 - only do this
1..1
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~
# Subtest: only
ok 1 - only do this
1..1
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
}
ok 3 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child ___/# time=[0-9.]+(ms)?/~~~ {
# Subtest: ___/.*/~~~only.js
ok 1 - normal # SKIP filter: only
# Subtest: only
ok 1 - only do this
1..1
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~
# Subtest: only
ok 1 - only do this
1..1
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*/~~~only.js ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
}
ok 4 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child --only ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - ___/.*/~~~only.js ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - normal # SKIP filter: only
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - only do this
1..1
}
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - only do this
1..1
}
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
}
1..1
___/# time=[0-9.]+(ms)?/~~~
}
ok 5 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child -O ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - ___/.*/~~~only.js ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - normal # SKIP filter: only
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - only do this
1..1
}
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - only do this
1..1
}
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
}
1..1
___/# time=[0-9.]+(ms)?/~~~
}
1..5
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/only.js 0000664 0000000 0000000 00000001276 13206406237 0020030 0 ustar 00root root 0000000 0000000 var t = require('../..')
var run = require.resolve('../../bin/run.js')
var node = process.execPath
if (process.argv[2] === 'child') {
t.test('normal', function (t) {
t.pass('this is fine')
t.end()
})
t.only('only', function (t) {
t.pass('only do this')
t.end()
})
t.test('only', { only: true }, function (t) {
t.pass('only do this')
t.end()
})
} else {
var env = { env: { TAP_ONLY: '1' } }
t.spawn(node, [__filename, 'child'])
t.spawn(node, [__filename, 'child'], env)
t.spawn(node, [run, __filename, '--test-arg=child'], env)
t.spawn(node, [run, __filename, '--test-arg=child', '--only'])
t.spawn(node, [run, __filename, '--test-arg=child', '-O'])
}
node-tap-11.0.0/test-legacy/test/only.tap 0000664 0000000 0000000 00000006327 13206406237 0020202 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~only.js child
# Subtest: normal
ok 1 - this is fine
1..1
ok 1 - normal ___/# time=[0-9.]+(ms)?/~~~
# "only" has `only` set but all tests run
# Subtest: only
ok 1 - only do this
1..1
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~
# "only" has `only` set but all tests run
# Subtest: only
ok 1 - only do this
1..1
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~
1..3
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~only.js child ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~only.js child
ok 1 - normal # SKIP filter: only
# Subtest: only
ok 1 - only do this
1..1
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~
# Subtest: only
ok 1 - only do this
1..1
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
ok 2 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~only.js child ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child
# Subtest: ___/.*/~~~only.js
ok 1 - normal # SKIP filter: only
# Subtest: only
ok 1 - only do this
1..1
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~
# Subtest: only
ok 1 - only do this
1..1
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*/~~~only.js ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
ok 3 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child --only
# Subtest: ___/.*/~~~only.js
ok 1 - normal # SKIP filter: only
# Subtest: only
ok 1 - only do this
1..1
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~
# Subtest: only
ok 1 - only do this
1..1
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*/~~~only.js ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
ok 4 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child --only ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child -O
# Subtest: ___/.*/~~~only.js
ok 1 - normal # SKIP filter: only
# Subtest: only
ok 1 - only do this
1..1
ok 2 - only ___/# time=[0-9.]+(ms)?/~~~
# Subtest: only
ok 1 - only do this
1..1
ok 3 - only ___/# time=[0-9.]+(ms)?/~~~
1..3
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*/~~~only.js ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
ok 5 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./bin/run.js ___/.*/~~~only.js --test-arg=child -O ___/# time=[0-9.]+(ms)?/~~~
1..5
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/pending-handles--bail--buffer.tap 0000664 0000000 0000000 00000000735 13206406237 0024564 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pending-handles.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pending-handles.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1,"timeout":900}
...
{
ok 1 - this is ok
not ok 2 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"TAP"}
...
Bail out! # timeout!
}
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/pending-handles--bail.tap 0000664 0000000 0000000 00000000441 13206406237 0023232 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~pending-handles.js child
ok 1 - this is ok
not ok 2 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"TAP"}
...
Bail out! # timeout!
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/pending-handles--buffer.tap 0000664 0000000 0000000 00000001072 13206406237 0023575 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pending-handles.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pending-handles.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGTERM","timeout":900}
...
{
ok 1 - this is ok
not ok 2 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"TAP"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/pending-handles.js 0000664 0000000 0000000 00000000320 13206406237 0022074 0 ustar 00root root 0000000 0000000 var t = require('../..')
if (process.argv[2] === 'child') {
t.pass('this is ok')
setInterval(function () {}, 100000)
} else {
t.spawn(process.execPath, [__filename, 'child'], {
timeout: 900
})
}
node-tap-11.0.0/test-legacy/test/pending-handles.tap 0000664 0000000 0000000 00000001175 13206406237 0022255 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~pending-handles.js child
ok 1 - this is ok
not ok 2 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"TAP"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pending-handles.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pending-handles.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGTERM","timeout":900}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/plan-async--buffer.tap 0000664 0000000 0000000 00000000332 13206406237 0022600 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - post-plan async ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine
1..1
}
1..1
}
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/plan-async.js 0000664 0000000 0000000 00000000256 13206406237 0021111 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('post-plan async', function (t) {
t.test('child test', function (t) {
t.pass('this is fine')
setTimeout(t.end)
})
t.plan(1)
})
node-tap-11.0.0/test-legacy/test/plan-async.tap 0000664 0000000 0000000 00000000403 13206406237 0021253 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: post-plan async
# Subtest: child test
ok 1 - this is fine
1..1
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~
1..1
ok 1 - post-plan async ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/plan-failures--bail--buffer.tap 0000664 0000000 0000000 00000000515 13206406237 0024262 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - pass then pass plan() ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - ok
}
not ok 2 - test count exceeds plan
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then pass plan()"}
...
Bail out! # test count exceeds plan
node-tap-11.0.0/test-legacy/test/plan-failures--bail.tap 0000664 0000000 0000000 00000000552 13206406237 0022737 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: pass then pass plan()
1..1
ok 1 - ok
ok 1 - pass then pass plan() ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - test count exceeds plan
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then pass plan()"}
...
Bail out! # test count exceeds plan
node-tap-11.0.0/test-legacy/test/plan-failures--buffer.tap 0000664 0000000 0000000 00000004206 13206406237 0023301 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - pass then pass plan() ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - ok
}
not ok 2 - test count exceeds plan
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then pass plan()"}
...
ok 3 - pass then pass end() ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - ok
1..1
}
not ok 4 - test after end() was called
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then pass end()"}
...
ok 5 - pass then fail plan() ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - ok
}
not ok 6 - test count exceeds plan
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then fail plan()"}
...
ok 7 - pass then fail end() ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - ok
1..1
}
not ok 8 - test after end() was called
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then fail end()"}
...
not ok 9 - fail then pass plan() ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
# failed 1 test
}
not ok 10 - fail then pass end() ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
1..1
# failed 1 test
}
not ok 11 - fail then fail plan() ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
# failed 1 test
}
not ok 12 - fail then fail end() ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
1..1
# failed 1 test
}
1..12
# failed 8 of 12 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/plan-failures.js 0000664 0000000 0000000 00000000764 13206406237 0021612 0 ustar 00root root 0000000 0000000 var t = require('../..')
function test (t, first, second, plan) {
if (plan) {
t.plan(1)
}
t[first]('ok')
if (!plan) {
t.end()
}
t[second]('extra')
}
var methods = [ 'pass', 'fail' ]
methods.forEach(function (first) {
methods.forEach(function (second) {
t.test(first + ' then ' + second + ' plan()', function (t) {
test(t, first, second, true)
})
t.test(first + ' then ' + second + ' end()', function (t) {
test(t, first, second, false)
})
})
})
node-tap-11.0.0/test-legacy/test/plan-failures.tap 0000664 0000000 0000000 00000004552 13206406237 0021761 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: pass then pass plan()
1..1
ok 1 - ok
ok 1 - pass then pass plan() ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - test count exceeds plan
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then pass plan()"}
...
# Subtest: pass then pass end()
ok 1 - ok
1..1
ok 3 - pass then pass end() ___/# time=[0-9.]+(ms)?/~~~
not ok 4 - test after end() was called
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then pass end()"}
...
# Subtest: pass then fail plan()
1..1
ok 1 - ok
ok 5 - pass then fail plan() ___/# time=[0-9.]+(ms)?/~~~
not ok 6 - test count exceeds plan
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then fail plan()"}
...
# Subtest: pass then fail end()
ok 1 - ok
1..1
ok 7 - pass then fail end() ___/# time=[0-9.]+(ms)?/~~~
not ok 8 - test after end() was called
---
{"at":{"column":12,"file":"test-legacy/test/plan-failures.js","line":11},"plan":1,"source":"t[second]('extra')\n","test":"pass then fail end()"}
...
# Subtest: fail then pass plan()
1..1
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
# failed 1 test
not ok 9 - fail then pass plan() ___/# time=[0-9.]+(ms)?/~~~
# Subtest: fail then pass end()
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
1..1
# failed 1 test
not ok 10 - fail then pass end() ___/# time=[0-9.]+(ms)?/~~~
# Subtest: fail then fail plan()
1..1
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
# failed 1 test
not ok 11 - fail then fail plan() ___/# time=[0-9.]+(ms)?/~~~
# Subtest: fail then fail end()
not ok 1 - ok
---
{"at":{"column":11,"file":"test-legacy/test/plan-failures.js","line":7},"source":"t[first]('ok')\n"}
...
1..1
# failed 1 test
not ok 12 - fail then fail end() ___/# time=[0-9.]+(ms)?/~~~
1..12
# failed 8 of 12 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/plan-too-many--bail--buffer.tap 0000664 0000000 0000000 00000001062 13206406237 0024211 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - children plan too big ___/# time=[0-9.]+(ms)?/~~~ {
1..9
ok 1 - this is ok
ok 2 - i am ok with how this is proceeding
not ok 3 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
1..8
ok 1 - i am planning big things
not ok 2 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/plan-too-many.js","line":7},"source":"t.test('grandchild', function (tt) {\n","test":"grandchild"}
...
Bail out! # test unfinished
}
}
Bail out! # test unfinished
node-tap-11.0.0/test-legacy/test/plan-too-many--bail.tap 0000664 0000000 0000000 00000000756 13206406237 0022676 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: children plan too big
1..9
ok 1 - this is ok
ok 2 - i am ok with how this is proceeding
# Subtest: grandchild
1..8
ok 1 - i am planning big things
not ok 2 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/plan-too-many.js","line":7},"source":"t.test('grandchild', function (tt) {\n","test":"grandchild"}
...
Bail out! # test unfinished
Bail out! # test unfinished
node-tap-11.0.0/test-legacy/test/plan-too-many--buffer.tap 0000664 0000000 0000000 00000001243 13206406237 0023230 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - children plan too big ___/# time=[0-9.]+(ms)?/~~~ {
1..9
ok 1 - this is ok
ok 2 - i am ok with how this is proceeding
not ok 3 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
1..8
ok 1 - i am planning big things
not ok 2 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/plan-too-many.js","line":7},"source":"t.test('grandchild', function (tt) {\n","test":"grandchild"}
...
# test count(2) != plan(8)
# failed 1 of 2 tests
}
# test count(3) != plan(9)
# failed 1 of 3 tests
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/plan-too-many.js 0000664 0000000 0000000 00000000402 13206406237 0021530 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('children plan too big', function (t) {
t.plan(9)
t.pass('this is ok')
t.pass('i am ok with how this is proceeding')
t.test('grandchild', function (tt) {
tt.plan(8)
tt.pass('i am planning big things')
})
})
node-tap-11.0.0/test-legacy/test/plan-too-many.tap 0000664 0000000 0000000 00000001322 13206406237 0021702 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: children plan too big
1..9
ok 1 - this is ok
ok 2 - i am ok with how this is proceeding
# Subtest: grandchild
1..8
ok 1 - i am planning big things
not ok 2 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/plan-too-many.js","line":7},"source":"t.test('grandchild', function (tt) {\n","test":"grandchild"}
...
# test count(2) != plan(8)
# failed 1 of 2 tests
not ok 3 - grandchild ___/# time=[0-9.]+(ms)?/~~~
# test count(3) != plan(9)
# failed 1 of 3 tests
not ok 1 - children plan too big ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/pragma--bail--buffer.tap 0000664 0000000 0000000 00000001237 13206406237 0022771 0 ustar 00root root 0000000 0000000 TAP version 13
pragma +child
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pragma.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":0,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}]}
...
{
this is not tap but it is ok
ok 1 - an ok test
pragma +strict
this is not tap and it is not ok
pragma -strict
more ok non-tap
ok 2 - ending now
1..2
___/# time=[0-9.]+(ms)?/~~~
# failed 1 of 2 tests
}
Bail out! # ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child
node-tap-11.0.0/test-legacy/test/pragma--bail.tap 0000664 0000000 0000000 00000001332 13206406237 0021441 0 ustar 00root root 0000000 0000000 TAP version 13
pragma +child
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child
this is not tap but it is ok
ok 1 - an ok test
pragma +strict
this is not tap and it is not ok
pragma -strict
more ok non-tap
ok 2 - ending now
1..2
___/# time=[0-9.]+(ms)?/~~~
# failed 1 of 2 tests
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pragma.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":0,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}]}
...
Bail out! # ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child
node-tap-11.0.0/test-legacy/test/pragma--buffer.tap 0000664 0000000 0000000 00000001670 13206406237 0022010 0 ustar 00root root 0000000 0000000 TAP version 13
pragma +child
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pragma.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":0,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}]}
...
{
this is not tap but it is ok
ok 1 - an ok test
pragma +strict
this is not tap and it is not ok
pragma -strict
more ok non-tap
ok 2 - ending now
1..2
___/# time=[0-9.]+(ms)?/~~~
# failed 1 of 2 tests
}
pragma -child
not ok 2 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child bailout ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pragma.js","child","bailout"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1}
...
{
Bail out! no pragmas come after bailout
}
Bail out! no pragmas come after bailout
node-tap-11.0.0/test-legacy/test/pragma.js 0000664 0000000 0000000 00000001405 13206406237 0020310 0 ustar 00root root 0000000 0000000 var t = require('../..')
if (process.argv[2] !== 'child') {
// +child does nothing, just verifying that it gets delayed
t.pragma({ child: true })
t.spawn(process.execPath, [__filename, 'child'])
t.pragma({ child: false })
t.spawn(process.execPath, [__filename, 'child', 'bailout'])
// this one should be skipped entirely
t.pragma({ bailedout: true })
} else if (process.argv[3] !== 'bailout') {
console.log('this is not tap but it is ok')
t.pass('an ok test')
t.pragma({ strict: true })
console.log('this is not tap and it is not ok')
t.pragma({ strict: false })
console.log('more ok non-tap')
t.pass('ending now')
t.end()
} else {
t.removeAllListeners('bailout')
t.bailout('no pragmas come after bailout')
t.pragma({bailout: true })
}
node-tap-11.0.0/test-legacy/test/pragma.tap 0000664 0000000 0000000 00000001503 13206406237 0020457 0 ustar 00root root 0000000 0000000 TAP version 13
pragma +child
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child
this is not tap but it is ok
ok 1 - an ok test
pragma +strict
this is not tap and it is not ok
pragma -strict
more ok non-tap
ok 2 - ending now
1..2
___/# time=[0-9.]+(ms)?/~~~
# failed 1 of 2 tests
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~pragma.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":0,"failures":[{"data":"this is not tap and it is not ok\n","tapError":"Non-TAP data encountered in strict mode"}]}
...
pragma -child
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~pragma.js child bailout
Bail out! no pragmas come after bailout
Bail out! no pragmas come after bailout
node-tap-11.0.0/test-legacy/test/promise--buffer.tap 0000664 0000000 0000000 00000003315 13206406237 0022215 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - two ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - child of 2 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - grandchild of 2 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine
1..1
}
1..1
}
1..1
}
ok 2 - second child of 2 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..2
}
ok 2 - three ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 3 - some_function_name ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - resolved to 1
1..1
}
ok 4 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~promise.js child ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - two ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - child of 2 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - grandchild of 2 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine
1..1
}
1..1
}
1..1
}
ok 2 - second child of 2 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..2
}
ok 2 - three ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 3 - some_function_name ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - resolved to 1
1..1
}
ok 4 - spawned ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - in the spawned child
1..1
}
ok 5 - is root tap test
ok 6 - has no parent
ok 7 - this is fine
1..7
___/# time=[0-9.]+(ms)?/~~~
}
ok 5 - is root tap test
ok 6 - has no parent
ok 7 - this is fine
1..7
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-fails--bail--buffer.tap 0000664 0000000 0000000 00000001077 13206406237 0024276 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - one ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - two ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child of 2 ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild of 2 ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - fail 1
---
{"at":{"column":15,"file":"test-legacy/test/promise-fails.js","line":7},"source":"throw new Error('fail 1')\n","test":"grandchild of 2"}
...
Bail out! # fail 1
}
}
}
}
Bail out! # fail 1
node-tap-11.0.0/test-legacy/test/promise-fails--bail.tap 0000664 0000000 0000000 00000000647 13206406237 0022754 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: one
# Subtest: two
# Subtest: child of 2
# Subtest: grandchild of 2
not ok 1 - fail 1
---
{"at":{"column":15,"file":"test-legacy/test/promise-fails.js","line":7},"source":"throw new Error('fail 1')\n","test":"grandchild of 2"}
...
Bail out! # fail 1
Bail out! # fail 1
node-tap-11.0.0/test-legacy/test/promise-fails--buffer.tap 0000664 0000000 0000000 00000003412 13206406237 0023307 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - one ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - two ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child of 2 ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild of 2 ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - fail 1
---
{"at":{"column":15,"file":"test-legacy/test/promise-fails.js","line":7},"source":"throw new Error('fail 1')\n","test":"grandchild of 2"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 2 - second child of 2 ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - fail 2
---
{"at":{"column":13,"file":"test-legacy/test/promise-fails.js","line":12},"source":"throw new Error('fail 2')\n","test":"second child of 2"}
...
1..1
# failed 1 test
}
1..2
# failed 2 of 2 tests
}
not ok 2 - three ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - fail 3
---
{"at":{"column":13,"file":"test-legacy/test/promise-fails.js","line":18},"source":"throw new Error('fail 3')\n","test":"three"}
...
1..1
# failed 1 test
}
not ok 3 - some_function_name ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - fail 4
---
{"at":{"column":15,"file":"test-legacy/test/promise-fails.js","line":29},"source":"throw new Error('fail 4')\n","test":"some_function_name"}
...
1..1
# failed 1 test
}
not ok 4 - fail 5
---
{"at":{"column":9,"file":"test-legacy/test/promise-fails.js","line":34},"source":"throw new Error('fail 5')\n","test":"TAP"}
...
1..4
# failed 4 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-fails.js 0000664 0000000 0000000 00000002060 13206406237 0021611 0 ustar 00root root 0000000 0000000 var t = require('../..')
var P = typeof Promise === 'undefined' ? require('bluebird') : Promise
t.test('one', function (t) {
return t.test('two', function (t) {
return t.test('child of 2', function (t) {
return t.test('grandchild of 2', function (t) {
throw new Error('fail 1')
})
})
}).then(function (t) {
return t.test('second child of 2', function (t) {
throw new Error('fail 2')
})
})
}).then(function (t) {
return t.test('three', function (t) {
setTimeout(function () {
throw new Error('fail 3')
})
})
}).then(function (t) {
return new P(function (resolve, reject) {
setTimeout(function () {
resolve(1)
})
}).then(function (x) {
return t.test(function some_function_name (t) {
process.nextTick(function () {
throw new Error('fail 4')
})
})
})
}).then(function (t) {
throw new Error('fail 5')
}).then(function (t) {
t.equal(t.name, 'TAP', 'is root tap test')
t.notOk(t._parent, 'has no parent')
t.pass('this is fine')
t.end()
}).catch(t.threw)
node-tap-11.0.0/test-legacy/test/promise-fails.tap 0000664 0000000 0000000 00000003611 13206406237 0021764 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: one
# Subtest: two
# Subtest: child of 2
# Subtest: grandchild of 2
not ok 1 - fail 1
---
{"at":{"column":15,"file":"test-legacy/test/promise-fails.js","line":7},"source":"throw new Error('fail 1')\n","test":"grandchild of 2"}
...
1..1
# failed 1 test
not ok 1 - grandchild of 2 ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
not ok 1 - child of 2 ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
not ok 1 - two ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second child of 2
not ok 1 - fail 2
---
{"at":{"column":13,"file":"test-legacy/test/promise-fails.js","line":12},"source":"throw new Error('fail 2')\n","test":"second child of 2"}
...
1..1
# failed 1 test
not ok 2 - second child of 2 ___/# time=[0-9.]+(ms)?/~~~
1..2
# failed 2 of 2 tests
not ok 1 - one ___/# time=[0-9.]+(ms)?/~~~
# Subtest: three
not ok 1 - fail 3
---
{"at":{"column":13,"file":"test-legacy/test/promise-fails.js","line":18},"source":"throw new Error('fail 3')\n","test":"three"}
...
1..1
# failed 1 test
not ok 2 - three ___/# time=[0-9.]+(ms)?/~~~
# Subtest: some_function_name
not ok 1 - fail 4
---
{"at":{"column":15,"file":"test-legacy/test/promise-fails.js","line":29},"source":"throw new Error('fail 4')\n","test":"some_function_name"}
...
1..1
# failed 1 test
not ok 3 - some_function_name ___/# time=[0-9.]+(ms)?/~~~
not ok 4 - fail 5
---
{"at":{"column":9,"file":"test-legacy/test/promise-fails.js","line":34},"source":"throw new Error('fail 5')\n","test":"TAP"}
...
1..4
# failed 4 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-plan--bail--buffer.tap 0000664 0000000 0000000 00000001275 13206406237 0024132 0 ustar 00root root 0000000 0000000 TAP version 13
running one
one end
after plan fulfilled
after one block
one promise was fulfilled
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - done one
}
running two
two promise was fulfilled
ok 2 - two ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - done two
}
running three
ok 3 - three ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 4 - broken promises ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - end() ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 2 - wtf
---
{"at":{"column":13,"file":"test-legacy/test/promise-plan.js","line":45},"source":"throw new Error('wtf')\n","test":"end()"}
...
Bail out! # wtf
}
Bail out! # wtf
node-tap-11.0.0/test-legacy/test/promise-plan--bail.tap 0000664 0000000 0000000 00000001412 13206406237 0022577 0 ustar 00root root 0000000 0000000 TAP version 13
running one
# Subtest: one
1..1
ok 1 - done one
one end
after plan fulfilled
after one block
one promise was fulfilled
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~
running two
# Subtest: two
1..1
ok 1 - done two
two promise was fulfilled
ok 2 - two ___/# time=[0-9.]+(ms)?/~~~
running three
# Subtest: three
1..0
ok 3 - three ___/# time=[0-9.]+(ms)?/~~~
# Subtest: broken promises
1..2
# Subtest: end()
1..0
ok 1 - end() ___/# time=[0-9.]+(ms)?/~~~
# Subtest: plan
1..1
ok 1 - this is fine
not ok 2 - wtf
---
{"at":{"column":13,"file":"test-legacy/test/promise-plan.js","line":45},"source":"throw new Error('wtf')\n","test":"end()"}
...
Bail out! # wtf
Bail out! # wtf
node-tap-11.0.0/test-legacy/test/promise-plan--buffer.tap 0000664 0000000 0000000 00000002660 13206406237 0023147 0 ustar 00root root 0000000 0000000 TAP version 13
running one
one end
after plan fulfilled
after one block
one promise was fulfilled
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - done one
}
running two
two promise was fulfilled
ok 2 - two ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - done two
}
running three
ok 3 - three ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 4 - broken promises ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - end() ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 2 - wtf
---
{"at":{"column":13,"file":"test-legacy/test/promise-plan.js","line":45},"source":"throw new Error('wtf')\n","test":"end()"}
...
# failed 1 of 2 tests
}
not ok 5 - thrown with timeouts ___/# time=[0-9.]+(ms)?/~~~
---
{"failures":[{"id":3,"name":"test after end() was called","plan":{"end":2,"start":1},"tapError":"id greater than plan end"},{"id":3,"name":"test after end() was called","plan":{"end":2,"start":1},"tapError":"id greater than plan end"}]}
...
{
1..2
not ok 1 - child test left in queue: t.test plan
not ok 2 - wtf
---
{"at":{"column":15,"file":"test-legacy/test/promise-plan.js","line":63},"source":"throw new Error('wtf')\n","test":"end()"}
...
not ok 3 - test after end() was called
---
{"plan":0,"test":"end()"}
...
# test count(3) != plan(2)
# failed 4 of 3 tests
}
1..5
# failed 2 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-plan.js 0000664 0000000 0000000 00000002740 13206406237 0021452 0 ustar 00root root 0000000 0000000 var t = require('../..')
var P = typeof Promise === 'undefined' ? require('bluebird') : Promise
t.test('one', function (t) {
console.log('running one')
t.plan(1)
t.on('end', function () {
console.log('one end')
})
return new P(function (resolve) {
setTimeout(resolve, 50)
t.pass('done one')
console.log('after plan fulfilled')
}).then(function () {
console.log('one promise was fulfilled')
})
})
console.log('after one block')
t.test('two', function (t) {
console.log('running two')
t.plan(1)
return new P(function (resolve) {
setTimeout(resolve, 50)
}).then(function () {
t.pass('done two')
console.log('two promise was fulfilled')
})
})
t.test('three', function (t) {
console.log('running three')
t.end()
})
t.test('broken promises', function (t) {
t.plan(2)
t.test('end()', function (t) {
t.end()
return new P(function () {
throw new Error('wtf')
})
})
t.test('plan', function (t) {
t.plan(1)
t.pass('this is fine')
return new P(function () {
throw new Error('wtf')
})
})
})
t.test('thrown with timeouts', function (t) {
t.plan(2)
t.test('end()', function (t) {
t.end()
return new P(function () {
setTimeout(function () {
throw new Error('wtf')
})
})
})
t.test('plan', function (t) {
t.plan(1)
t.pass('this is fine')
return new P(function () {
setTimeout(function () {
throw new Error('wtf')
})
})
})
})
node-tap-11.0.0/test-legacy/test/promise-plan.tap 0000664 0000000 0000000 00000003162 13206406237 0021621 0 ustar 00root root 0000000 0000000 TAP version 13
running one
# Subtest: one
1..1
ok 1 - done one
one end
after plan fulfilled
after one block
one promise was fulfilled
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~
running two
# Subtest: two
1..1
ok 1 - done two
two promise was fulfilled
ok 2 - two ___/# time=[0-9.]+(ms)?/~~~
running three
# Subtest: three
1..0
ok 3 - three ___/# time=[0-9.]+(ms)?/~~~
# Subtest: broken promises
1..2
# Subtest: end()
1..0
ok 1 - end() ___/# time=[0-9.]+(ms)?/~~~
# Subtest: plan
1..1
ok 1 - this is fine
not ok 2 - wtf
---
{"at":{"column":13,"file":"test-legacy/test/promise-plan.js","line":45},"source":"throw new Error('wtf')\n","test":"end()"}
...
# failed 1 of 2 tests
not ok 4 - broken promises ___/# time=[0-9.]+(ms)?/~~~
# Subtest: thrown with timeouts
1..2
# Subtest: end()
1..0
not ok 1 - child test left in queue: t.test plan
not ok 2 - wtf
---
{"at":{"column":15,"file":"test-legacy/test/promise-plan.js","line":63},"source":"throw new Error('wtf')\n","test":"end()"}
...
not ok 3 - test after end() was called
---
{"plan":0,"test":"end()"}
...
# test count(3) != plan(2)
# failed 4 of 3 tests
not ok 5 - thrown with timeouts ___/# time=[0-9.]+(ms)?/~~~
---
{"failures":[{"id":3,"name":"test after end() was called","plan":{"end":2,"start":1},"tapError":"id greater than plan end"},{"id":3,"name":"test after end() was called","plan":{"end":2,"start":1},"tapError":"id greater than plan end"}]}
...
1..5
# failed 2 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-return--bail--buffer.tap 0000664 0000000 0000000 00000000700 13206406237 0024507 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - true is ok
1..1
}
not ok 2 - rejected ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return.js","line":22},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
Bail out! # expected error
}
Bail out! # expected error
node-tap-11.0.0/test-legacy/test/promise-return--bail.tap 0000664 0000000 0000000 00000000673 13206406237 0023174 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: auto-end on resolve
ok 1 - true is ok
1..1
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~
# Subtest: rejected
not ok 1 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return.js","line":22},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
Bail out! # expected error
Bail out! # expected error
node-tap-11.0.0/test-legacy/test/promise-return--buffer.tap 0000664 0000000 0000000 00000000733 13206406237 0023533 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - true is ok
1..1
}
not ok 2 - rejected ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return.js","line":22},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
1..1
# failed 1 test
}
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-return-mocha--bail--buffer.tap 0000664 0000000 0000000 00000001030 13206406237 0025571 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 2 - auto-end on resolve without cb ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 3 - rejected ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 4 - rejected without cb ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 5 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return-mocha.js","line":31},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
Bail out! # expected error
node-tap-11.0.0/test-legacy/test/promise-return-mocha--bail.tap 0000664 0000000 0000000 00000001204 13206406237 0024250 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: auto-end on resolve
1..0
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~
# Subtest: auto-end on resolve without cb
1..0
ok 2 - auto-end on resolve without cb ___/# time=[0-9.]+(ms)?/~~~
# Subtest: rejected
1..0
ok 3 - rejected ___/# time=[0-9.]+(ms)?/~~~
# Subtest: rejected without cb
1..0
ok 4 - rejected without cb ___/# time=[0-9.]+(ms)?/~~~
not ok 5 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return-mocha.js","line":31},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
Bail out! # expected error
node-tap-11.0.0/test-legacy/test/promise-return-mocha--buffer.tap 0000664 0000000 0000000 00000001430 13206406237 0024613 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 2 - auto-end on resolve without cb ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 3 - rejected ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
ok 4 - rejected without cb ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
not ok 5 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return-mocha.js","line":31},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
not ok 6 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return-mocha.js","line":37},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected without cb"}
...
1..6
# failed 2 of 6 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-return-mocha.js 0000664 0000000 0000000 00000001521 13206406237 0023120 0 ustar 00root root 0000000 0000000 /* global describe */
var P
if (typeof Promise === 'undefined') {
// Making sure this is testable in node 0.8/0.10
P = require('bluebird')
} else {
P = Promise
}
var t = require('../..')
t.mochaGlobals()
describe('auto-end on resolve', function (done) {
return new P(function (resolve) {
setTimeout(function () {
resolve()
}, 150)
})
})
describe('auto-end on resolve without cb', function () {
return new P(function (resolve) {
setTimeout(function () {
resolve()
}, 150)
})
})
describe('rejected', function (done) {
return new P(function (resolve, reject) {
setTimeout(reject.bind(null, new Error('expected error'), 150))
})
})
describe('rejected without cb', function () {
return new P(function (resolve, reject) {
setTimeout(reject.bind(null, new Error('expected error'), 150))
})
})
node-tap-11.0.0/test-legacy/test/promise-return-mocha.tap 0000664 0000000 0000000 00000001604 13206406237 0023272 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: auto-end on resolve
1..0
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~
# Subtest: auto-end on resolve without cb
1..0
ok 2 - auto-end on resolve without cb ___/# time=[0-9.]+(ms)?/~~~
# Subtest: rejected
1..0
ok 3 - rejected ___/# time=[0-9.]+(ms)?/~~~
# Subtest: rejected without cb
1..0
ok 4 - rejected without cb ___/# time=[0-9.]+(ms)?/~~~
not ok 5 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return-mocha.js","line":31},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
not ok 6 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return-mocha.js","line":37},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected without cb"}
...
1..6
# failed 2 of 6 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise-return.js 0000664 0000000 0000000 00000000771 13206406237 0022041 0 ustar 00root root 0000000 0000000 var P
if (typeof Promise === 'undefined') {
// Making sure this is testable in node 0.8/0.10
P = require('bluebird')
} else {
P = Promise
}
var t = require('../..')
t.test('auto-end on resolve', function (t) {
return new P(function (resolve) {
setTimeout(function () {
t.ok(true, 'true is ok')
resolve()
}, 150)
})
})
t.test('rejected', function (t) {
return new P(function (resolve, reject) {
setTimeout(reject.bind(null, new Error('expected error'), 150))
})
})
node-tap-11.0.0/test-legacy/test/promise-return.tap 0000664 0000000 0000000 00000001006 13206406237 0022201 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: auto-end on resolve
ok 1 - true is ok
1..1
ok 1 - auto-end on resolve ___/# time=[0-9.]+(ms)?/~~~
# Subtest: rejected
not ok 1 - expected error
---
{"at":{"column":34,"file":"test-legacy/test/promise-return.js","line":22},"source":"setTimeout(reject.bind(null, new Error('expected error'), 150))\n","test":"rejected"}
...
1..1
# failed 1 test
not ok 2 - rejected ___/# time=[0-9.]+(ms)?/~~~
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/promise.js 0000664 0000000 0000000 00000002215 13206406237 0020517 0 ustar 00root root 0000000 0000000 var t = require('../..')
var P = typeof Promise === 'undefined' ? require('bluebird') : Promise
t.test('one', function (t) {
return t.test('two', function (t) {
return t.test('child of 2', function (t) {
return t.test('grandchild of 2', function (t) {
t.pass('this is fine')
t.end()
})
})
}).then(function (t) {
return t.test('second child of 2', function (t) {
t.end()
})
})
}).then(function (t) {
return t.test('three', function (t) {
setTimeout(function () {
t.end()
})
})
}).then(function (t) {
return new P(function (resolve, reject) {
setTimeout(function () {
resolve(1)
})
}).then(function (x) {
return t.test(function some_function_name (t) {
t.equal(x, 1, 'resolved to 1')
t.end()
})
})
}).then(function (t) {
return (process.argv[2] === 'child') ?
t.test(function spawned (t) {
t.pass('in the spawned child')
t.end()
}) :
t.spawn(process.execPath, [__filename, 'child'])
}).then(function (t) {
t.equal(t.name, 'TAP', 'is root tap test')
t.notOk(t._parent, 'has no parent')
t.pass('this is fine')
t.end()
})
node-tap-11.0.0/test-legacy/test/promise.tap 0000664 0000000 0000000 00000004025 13206406237 0020670 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: one
# Subtest: two
# Subtest: child of 2
# Subtest: grandchild of 2
ok 1 - this is fine
1..1
ok 1 - grandchild of 2 ___/# time=[0-9.]+(ms)?/~~~
1..1
ok 1 - child of 2 ___/# time=[0-9.]+(ms)?/~~~
1..1
ok 1 - two ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second child of 2
1..0
ok 2 - second child of 2 ___/# time=[0-9.]+(ms)?/~~~
1..2
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~
# Subtest: three
1..0
ok 2 - three ___/# time=[0-9.]+(ms)?/~~~
# Subtest: some_function_name
ok 1 - resolved to 1
1..1
ok 3 - some_function_name ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~promise.js child
# Subtest: one
# Subtest: two
# Subtest: child of 2
# Subtest: grandchild of 2
ok 1 - this is fine
1..1
ok 1 - grandchild of 2 ___/# time=[0-9.]+(ms)?/~~~
1..1
ok 1 - child of 2 ___/# time=[0-9.]+(ms)?/~~~
1..1
ok 1 - two ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second child of 2
1..0
ok 2 - second child of 2 ___/# time=[0-9.]+(ms)?/~~~
1..2
ok 1 - one ___/# time=[0-9.]+(ms)?/~~~
# Subtest: three
1..0
ok 2 - three ___/# time=[0-9.]+(ms)?/~~~
# Subtest: some_function_name
ok 1 - resolved to 1
1..1
ok 3 - some_function_name ___/# time=[0-9.]+(ms)?/~~~
# Subtest: spawned
ok 1 - in the spawned child
1..1
ok 4 - spawned ___/# time=[0-9.]+(ms)?/~~~
ok 5 - is root tap test
ok 6 - has no parent
ok 7 - this is fine
1..7
___/# time=[0-9.]+(ms)?/~~~
ok 4 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~promise.js child ___/# time=[0-9.]+(ms)?/~~~
ok 5 - is root tap test
ok 6 - has no parent
ok 7 - this is fine
1..7
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/rejects--bail--buffer.tap 0000664 0000000 0000000 00000001274 13206406237 0023162 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
ok 2 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
not ok 3 - owner promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - owner promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":16},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects('owner promise', function () {\n","wanted":{"message":"own","name":"Error"}}
...
Bail out! # owner promise: Error own
}
Bail out! # owner promise: Error own
node-tap-11.0.0/test-legacy/test/rejects--bail.tap 0000664 0000000 0000000 00000001274 13206406237 0021636 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
ok 2 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
not ok 3 - owner promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - owner promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":16},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects('owner promise', function () {\n","wanted":{"message":"own","name":"Error"}}
...
Bail out! # owner promise: Error own
}
Bail out! # owner promise: Error own
node-tap-11.0.0/test-legacy/test/rejects--buffer.tap 0000664 0000000 0000000 00000007552 13206406237 0022205 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
ok 2 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
not ok 3 - owner promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - owner promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":16},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects('owner promise', function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 4 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":22},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 5 - resolved promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - resolved promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":28},"found":10,"source":"t.rejects('resolved promise', function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 6 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":34},"found":10,"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
ok 7 - expect rejected Promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - expect rejected Promise: Error pwn
1..1
}
ok 8 - expect rejected Promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - expect rejected Promise: Error pwn
1..1
}
not ok 9 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":52},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects(function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 10 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":58},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 11 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":64},"found":10,"source":"t.rejects(function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 12 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":70},"found":10,"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
ok 13 - a ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - a
1..1
}
not ok 14 - b ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - b
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":78},"found":{"message":"foo","name":"Error"},"pattern":{"message":"bar"},"source":"t.rejects(prom, { message: 'bar' }, 'b')\n"}
...
1..1
# failed 1 test
}
1..14
# failed 9 of 14 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/rejects.js 0000664 0000000 0000000 00000003151 13206406237 0020500 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.rejects('pwner promise', function () {
return new Promise(function (resolve, reject) {
reject(new Error('pwn'))
})
}, new Error('pwn'))
t.rejects(
'pwner promise',
new Promise(function (resolve, reject) {
reject(new Error('pwn'))
}),
new Error('pwn'))
t.rejects('owner promise', function () {
return new Promise(function (resolve, reject) {
reject(new Error('pwn'))
})
}, new Error('own'))
t.rejects(
new Promise(function (resolve, reject) {
reject(new Error('pwn'))
}),
new Error('own'))
t.rejects('resolved promise', function () {
return new Promise(function (resolve, reject) {
resolve(10)
})
}, new Error('own'))
t.rejects(
new Promise(function (resolve, reject) {
resolve(10)
}),
new Error('own'))
t.rejects(function () {
return new Promise(function (resolve, reject) {
reject(new Error('pwn'))
})
}, new Error('pwn'))
t.rejects(
new Promise(function (resolve, reject) {
reject(new Error('pwn'))
}),
new Error('pwn'))
t.rejects(function () {
return new Promise(function (resolve, reject) {
reject(new Error('pwn'))
})
}, new Error('own'))
t.rejects(
new Promise(function (resolve, reject) {
reject(new Error('pwn'))
}),
new Error('own'))
t.rejects(function () {
return new Promise(function (resolve, reject) {
resolve(10)
})
}, new Error('own'))
t.rejects(
new Promise(function (resolve, reject) {
resolve(10)
}),
new Error('own'))
const prom = new Promise((resolve, reject) => reject(new Error('foo')))
t.rejects(prom, { message: 'foo' }, 'a')
t.rejects(prom, { message: 'bar' }, 'b')
node-tap-11.0.0/test-legacy/test/rejects.tap 0000664 0000000 0000000 00000007552 13206406237 0020661 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
ok 2 - pwner promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - pwner promise: Error pwn
1..1
}
not ok 3 - owner promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - owner promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":16},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects('owner promise', function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 4 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":22},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 5 - resolved promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - resolved promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":28},"found":10,"source":"t.rejects('resolved promise', function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 6 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":34},"found":10,"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
ok 7 - expect rejected Promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - expect rejected Promise: Error pwn
1..1
}
ok 8 - expect rejected Promise: Error pwn ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - expect rejected Promise: Error pwn
1..1
}
not ok 9 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":52},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects(function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 10 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":58},"found":{"message":"pwn","name":"Error"},"pattern":{"message":"own","name":"Error"},"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 11 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":64},"found":10,"source":"t.rejects(function () {\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
not ok 12 - expect rejected Promise: Error own ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - expect rejected Promise: Error own
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":70},"found":10,"source":"t.rejects(\n","wanted":{"message":"own","name":"Error"}}
...
1..1
# failed 1 test
}
ok 13 - a ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - a
1..1
}
not ok 14 - b ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - b
---
{"at":{"column":3,"file":"test-legacy/test/rejects.js","line":78},"found":{"message":"foo","name":"Error"},"pattern":{"message":"bar"},"source":"t.rejects(prom, { message: 'bar' }, 'b')\n"}
...
1..1
# failed 1 test
}
1..14
# failed 9 of 14 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/root-teardown--buffer.tap 0000664 0000000 0000000 00000000311 13206406237 0023334 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is ok
1..1
}
ok 2 - one
ok 3 - two
ok 4 - three
ok 5 - four
ok 6 - five
ok 7 - six
1..7
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/root-teardown.js 0000664 0000000 0000000 00000001125 13206406237 0021644 0 ustar 00root root 0000000 0000000 var tap = require('../..')
var timer = setTimeout(function () {
throw new Error('timer should never ding')
}, 1000)
tap.tearDown(function () {
clearTimeout(timer)
})
tap.test('child test', function (t) {
t.pass('this is ok')
setTimeout(function () {
t.end()
}, 100)
})
tap.pass('one')
setTimeout(function () {
tap.pass('two')
setTimeout(function () {
tap.pass('three')
setTimeout(function () {
tap.pass('four')
setTimeout(function () {
tap.pass('five')
setTimeout(function () {
tap.pass('six')
})
})
})
})
})
node-tap-11.0.0/test-legacy/test/root-teardown.tap 0000664 0000000 0000000 00000000333 13206406237 0022014 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: child test
ok 1 - this is ok
1..1
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~
ok 2 - one
ok 3 - two
ok 4 - three
ok 5 - four
ok 6 - five
ok 7 - six
1..7
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/segv--bail--buffer.tap 0000664 0000000 0000000 00000000450 13206406237 0022462 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - setup ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - compiled seg faulter
1..1
}
not ok 2 - ./segv ___/# time=[0-9.]+(ms)?/~~~
---
{"args":[],"command":"./segv","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGBUS"}
...
{
1..0 # no tests found
}
Bail out! # ./segv
node-tap-11.0.0/test-legacy/test/segv--bail.tap 0000664 0000000 0000000 00000000505 13206406237 0021137 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: setup
ok 1 - compiled seg faulter
1..1
ok 1 - setup ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ./segv
1..0 # no tests found
not ok 2 - ./segv ___/# time=[0-9.]+(ms)?/~~~
---
{"args":[],"command":"./segv","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGBUS"}
...
Bail out! # ./segv
node-tap-11.0.0/test-legacy/test/segv--buffer.tap 0000664 0000000 0000000 00000000515 13206406237 0021502 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - setup ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - compiled seg faulter
1..1
}
not ok 2 - ./segv ___/# time=[0-9.]+(ms)?/~~~
---
{"args":[],"command":"./segv","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGBUS"}
...
{
1..0 # no tests found
}
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/segv.js 0000664 0000000 0000000 00000001344 13206406237 0020007 0 ustar 00root root 0000000 0000000 var t = require('../..')
var fs = require('fs')
var spawn = require('child_process').spawn
require('signal-exit')(function (code, signal) {
try { fs.unlinkSync('segv') } catch (er) {}
try { fs.unlinkSync('segv.c') } catch (er) {}
})
var segv =
'int main (void) {\n' +
' char *s = "hello world";\n' +
" *s = 'H';\n" +
'}\n'
t.test('setup', function (t) {
fs.writeFile('segv.c', segv, 'utf8', function (er) {
if (er) {
throw er
}
var cp = spawn('gcc', ['segv.c', '-o', 'segv'])
cp.on('exit', function (code, sig) {
if (code !== 0) {
t.bailout('failed to compile segv program')
return
}
t.pass('compiled seg faulter')
t.end()
})
})
})
t.spawn('./segv')
node-tap-11.0.0/test-legacy/test/segv.tap 0000664 0000000 0000000 00000000551 13206406237 0020156 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: setup
ok 1 - compiled seg faulter
1..1
ok 1 - setup ___/# time=[0-9.]+(ms)?/~~~
# Subtest: ./segv
1..0 # no tests found
not ok 2 - ./segv ___/# time=[0-9.]+(ms)?/~~~
---
{"args":[],"command":"./segv","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGBUS"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/skip--buffer.tap 0000664 0000000 0000000 00000000143 13206406237 0021501 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - does not count as failure # SKIP
1..1
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/skip-all--buffer.tap 0000664 0000000 0000000 00000000110 13206406237 0022241 0 ustar 00root root 0000000 0000000 TAP version 13
1..0 # Skip all these tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/skip-all.js 0000664 0000000 0000000 00000000061 13206406237 0020552 0 ustar 00root root 0000000 0000000 require('../..').plan(0, 'Skip all these tests')
node-tap-11.0.0/test-legacy/test/skip-all.tap 0000664 0000000 0000000 00000000110 13206406237 0020715 0 ustar 00root root 0000000 0000000 TAP version 13
1..0 # Skip all these tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/skip.js 0000664 0000000 0000000 00000000156 13206406237 0020011 0 ustar 00root root 0000000 0000000 var tap = require('../..')
tap.test('does not count as failure', { skip: true }, function (t) {
t.end()
})
node-tap-11.0.0/test-legacy/test/skip.tap 0000664 0000000 0000000 00000000143 13206406237 0020155 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - does not count as failure # SKIP
1..1
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/source-map-fail--bail--buffer.tap 0000664 0000000 0000000 00000000506 13206406237 0024504 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - gp ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test/test/source-map-fail.coffee","line":7}}
...
Bail out! # fail
}
}
Bail out! # fail
node-tap-11.0.0/test-legacy/test/source-map-fail--bail.tap 0000664 0000000 0000000 00000000402 13206406237 0023153 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: gp
1..1
# Subtest: parent
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test/test/source-map-fail.coffee","line":7}}
...
Bail out! # fail
Bail out! # fail
node-tap-11.0.0/test-legacy/test/source-map-fail--buffer.tap 0000664 0000000 0000000 00000000577 13206406237 0023532 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - gp ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test/test/source-map-fail.coffee","line":7}}
...
# failed 1 test
}
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/source-map-fail-bail.tap 0000664 0000000 0000000 00000000424 13206406237 0023102 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: gp
1..1
# Subtest: parent
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test/test/source-map-fail.coffee","line":7},"source":"t.fail 'fail'\n"}
...
Bail out! # fail
Bail out! # fail
node-tap-11.0.0/test-legacy/test/source-map-fail.coffee 0000664 0000000 0000000 00000000154 13206406237 0022640 0 ustar 00root root 0000000 0000000 t = require '../..'
t.test 'gp', (t) ->
t.plan 1
t.test 'parent', (t) ->
t.plan 1
t.fail 'fail' node-tap-11.0.0/test-legacy/test/source-map-fail.js 0000664 0000000 0000000 00000000444 13206406237 0022027 0 ustar 00root root 0000000 0000000 // Generated by CoffeeScript 1.11.1
(function() {
var t;
t = require('../..');
t.test('gp', function(t) {
t.plan(1);
return t.test('parent', function(t) {
t.plan(1);
return t.fail('fail');
});
});
}).call(this);
//# sourceMappingURL=source-map-fail.js.map
node-tap-11.0.0/test-legacy/test/source-map-fail.js.map 0000664 0000000 0000000 00000000645 13206406237 0022606 0 ustar 00root root 0000000 0000000 {
"version": 3,
"file": "source-map-fail.js",
"sourceRoot": "../..",
"sources": [
"test/test/source-map-fail.coffee"
],
"names": [],
"mappings": ";AAAA;AAAA,MAAA;;EAAA,CAAA,GAAI,OAAA,CAAQ,OAAR;;EAEJ,CAAC,CAAC,IAAF,CAAO,IAAP,EAAa,SAAC,CAAD;IACX,CAAC,CAAC,IAAF,CAAO,CAAP;WACA,CAAC,CAAC,IAAF,CAAO,QAAP,EAAiB,SAAC,CAAD;MACf,CAAC,CAAC,IAAF,CAAO,CAAP;aACA,CAAC,CAAC,IAAF,CAAO,MAAP;IAFe,CAAjB;EAFW,CAAb;AAFA"
} node-tap-11.0.0/test-legacy/test/source-map-fail.tap 0000664 0000000 0000000 00000000627 13206406237 0022202 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: gp
1..1
# Subtest: parent
1..1
not ok 1 - fail
---
{"at":{"column":7,"file":"test/test/source-map-fail.coffee","line":7}}
...
# failed 1 test
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
# failed 1 test
not ok 1 - gp ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/sparse-array--bail--buffer.tap 0000664 0000000 0000000 00000000440 13206406237 0024126 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should match pattern provided
---
{"at":{"column":3,"file":"test-legacy/test/sparse-array.js","line":3},"found":[1,null,3],"pattern":[1,2,3],"source":"t.similar([1,, 3], [1, 2, 3]) // eslint-disable-line\n"}
...
Bail out! # should match pattern provided
node-tap-11.0.0/test-legacy/test/sparse-array--bail.tap 0000664 0000000 0000000 00000000440 13206406237 0022602 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should match pattern provided
---
{"at":{"column":3,"file":"test-legacy/test/sparse-array.js","line":3},"found":[1,null,3],"pattern":[1,2,3],"source":"t.similar([1,, 3], [1, 2, 3]) // eslint-disable-line\n"}
...
Bail out! # should match pattern provided
node-tap-11.0.0/test-legacy/test/sparse-array--buffer.tap 0000664 0000000 0000000 00000001025 13206406237 0023144 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should match pattern provided
---
{"at":{"column":3,"file":"test-legacy/test/sparse-array.js","line":3},"found":[1,null,3],"pattern":[1,2,3],"source":"t.similar([1,, 3], [1, 2, 3]) // eslint-disable-line\n"}
...
not ok 2 - should match pattern provided
---
{"at":{"column":3,"file":"test-legacy/test/sparse-array.js","line":4},"found":[1,null,null],"pattern":[1,2,3],"source":"t.similar([1,,,], [1, 2, 3]) // eslint-disable-line\n"}
...
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/sparse-array.js 0000664 0000000 0000000 00000000203 13206406237 0021445 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.similar([1,, 3], [1, 2, 3]) // eslint-disable-line
t.similar([1,,,], [1, 2, 3]) // eslint-disable-line
node-tap-11.0.0/test-legacy/test/sparse-array.tap 0000664 0000000 0000000 00000001025 13206406237 0021620 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - should match pattern provided
---
{"at":{"column":3,"file":"test-legacy/test/sparse-array.js","line":3},"found":[1,null,3],"pattern":[1,2,3],"source":"t.similar([1,, 3], [1, 2, 3]) // eslint-disable-line\n"}
...
not ok 2 - should match pattern provided
---
{"at":{"column":3,"file":"test-legacy/test/sparse-array.js","line":4},"found":[1,null,null],"pattern":[1,2,3],"source":"t.similar([1,,,], [1, 2, 3]) // eslint-disable-line\n"}
...
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn--bail--buffer.tap 0000664 0000000 0000000 00000001626 13206406237 0022654 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~spawn.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1}
...
{
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/spawn.js","line":18},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
}
}
}
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/spawn--bail.tap 0000664 0000000 0000000 00000001263 13206406237 0021325 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn.js child
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/spawn.js","line":18},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
Bail out! # nested failure
Bail out! # nested failure
node-tap-11.0.0/test-legacy/test/spawn--buffer.tap 0000664 0000000 0000000 00000005342 13206406237 0021671 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~spawn.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1}
...
{
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/spawn.js","line":18},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
1..3
# failed 1 of 3 tests
}
# failed 1 of 2 tests
}
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/spawn.js","line":32},"source":"t.fail('this fails')\n"}
...
not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - second timeout
not ok 2 - first timeout
---
{"at":{"column":7,"file":"test-legacy/test/spawn.js","line":37,"method":"_onTimeout"},"foo":"blz","source":"t.ok(false, 'first timeout', { foo: 'blz' })\n"}
...
# failed 1 of 2 tests
}
ok 5 - pass after async kid
1..5
# failed 3 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
}
not ok 2 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/spawn.js","line":18},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
1..3
# failed 1 of 3 tests
}
# failed 1 of 2 tests
}
ok 3 - this passes
not ok 4 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/spawn.js","line":32},"source":"t.fail('this fails')\n"}
...
not ok 5 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - second timeout
not ok 2 - first timeout
---
{"at":{"column":7,"file":"test-legacy/test/spawn.js","line":37,"method":"_onTimeout"},"foo":"blz","source":"t.ok(false, 'first timeout', { foo: 'blz' })\n"}
...
# failed 1 of 2 tests
}
ok 6 - pass after async kid
1..6
# failed 4 of 6 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn-empty--buffer.tap 0000664 0000000 0000000 00000000257 13206406237 0023025 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn-empty.js child # SKIP no tests found {
1..0 # no tests found
}
1..1
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn-empty.js 0000664 0000000 0000000 00000000163 13206406237 0021325 0 ustar 00root root 0000000 0000000 if (process.argv[2] !== 'child') {
var t = require('../..')
t.spawn(process.execPath, [__filename, 'child'])
}
node-tap-11.0.0/test-legacy/test/spawn-empty.tap 0000664 0000000 0000000 00000000356 13206406237 0021501 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn-empty.js child
1..0 # no tests found
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn-empty.js child # SKIP no tests found
1..1
# skip: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn-failures--bail--buffer.tap 0000664 0000000 0000000 00000001331 13206406237 0024455 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - spawn that throws ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~ok.js"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~"}
...
{
not ok 1 - now is fine
---
{"args":["___/.*/~~~ok.js"],"at":{"column":14,"file":"test-legacy/test/spawn-failures.js","line":25},"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","source":"throwNow = new Error('now is fine')\n","test":"___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js"}
...
Bail out! # now is fine
}
}
Bail out! # now is fine
node-tap-11.0.0/test-legacy/test/spawn-failures--bail.tap 0000664 0000000 0000000 00000001031 13206406237 0023126 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: spawn that throws
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js
not ok 1 - now is fine
---
{"args":["___/.*/~~~ok.js"],"at":{"column":14,"file":"test-legacy/test/spawn-failures.js","line":25},"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","source":"throwNow = new Error('now is fine')\n","test":"___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js"}
...
Bail out! # now is fine
Bail out! # now is fine
node-tap-11.0.0/test-legacy/test/spawn-failures--buffer.tap 0000664 0000000 0000000 00000002777 13206406237 0023512 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - spawn that throws ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~ok.js"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~"}
...
{
not ok 1 - now is fine
---
{"args":["___/.*/~~~ok.js"],"at":{"column":14,"file":"test-legacy/test/spawn-failures.js","line":25},"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","source":"throwNow = new Error('now is fine')\n","test":"___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
not ok 2 - spawn that throws ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~ok.js"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~"}
...
{
not ok 1 - later is fine
---
{"args":["___/.*/~~~ok.js"],"at":{"column":16,"file":"test-legacy/test/spawn-failures.js","line":34},"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","source":"throwLater = new Error('later is fine')\n","test":"___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn-failures.js 0000664 0000000 0000000 00000001446 13206406237 0022006 0 ustar 00root root 0000000 0000000 var cp = require('child_process')
var spawn = cp.spawn
cp.spawn = hijackedSpawn
var throwNow = false
var throwLater = false
function hijackedSpawn (cmd, args, options) {
if (throwNow) {
throw throwNow
}
var child = spawn.apply(this, arguments)
if (throwLater) {
setTimeout(function () {
child.emit('error', throwLater)
})
}
return child
}
var t = require('../..')
var ok = require.resolve('./ok.js')
var node = process.execPath
t.test('spawn that throws', function (t) {
throwNow = new Error('now is fine')
t.tearDown(function () {
throwNow = false
})
t.spawn(node, [ok])
t.end()
})
t.test('spawn that throws', function (t) {
throwLater = new Error('later is fine')
t.tearDown(function () {
throwLater = false
})
t.spawn(node, [ok])
t.end()
})
node-tap-11.0.0/test-legacy/test/spawn-failures.tap 0000664 0000000 0000000 00000003255 13206406237 0022156 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: spawn that throws
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js
not ok 1 - now is fine
---
{"args":["___/.*/~~~ok.js"],"at":{"column":14,"file":"test-legacy/test/spawn-failures.js","line":25},"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","source":"throwNow = new Error('now is fine')\n","test":"___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js"}
...
1..1
# failed 1 test
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~ok.js"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~"}
...
1..1
# failed 1 test
not ok 1 - spawn that throws ___/# time=[0-9.]+(ms)?/~~~
# Subtest: spawn that throws
# Subtest: ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js
not ok 1 - later is fine
---
{"args":["___/.*/~~~ok.js"],"at":{"column":16,"file":"test-legacy/test/spawn-failures.js","line":34},"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","source":"throwLater = new Error('later is fine')\n","test":"___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js"}
...
1..1
# failed 1 test
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?/~~~ ./test-legacy/test/ok.js ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~ok.js"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~"}
...
1..1
# failed 1 test
not ok 2 - spawn that throws ___/# time=[0-9.]+(ms)?/~~~
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn-stderr--buffer.tap 0000664 0000000 0000000 00000000334 13206406237 0023166 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn-stderr.js child ___/# time=[0-9.]+(ms)?/~~~ {
stdout
ok 1 - this is ok
1..1
___/# time=[0-9.]+(ms)?/~~~
}
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn-stderr.js 0000664 0000000 0000000 00000000301 13206406237 0021464 0 ustar 00root root 0000000 0000000 var tap = require('../..')
if (!process.argv[2]) {
tap.spawn(process.execPath, [ __filename, 'child' ])
} else {
console.error('stderr')
console.log('stdout')
tap.pass('this is ok')
}
node-tap-11.0.0/test-legacy/test/spawn-stderr.tap 0000664 0000000 0000000 00000000434 13206406237 0021643 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn-stderr.js child
stdout
ok 1 - this is ok
1..1
___/# time=[0-9.]+(ms)?/~~~
ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn-stderr.js child ___/# time=[0-9.]+(ms)?/~~~
1..1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/spawn.js 0000664 0000000 0000000 00000001535 13206406237 0020175 0 ustar 00root root 0000000 0000000 var t = require('../..')
if (process.argv[2] !== 'child') {
t.spawn(process.execPath, [__filename, 'child'])
}
t.test('nesting', function (t) {
t.plan(2)
t.test('first', function (tt) {
tt.plan(2)
tt.ok(true, 'true is ok')
tt.assert('doeg', 'doag is also okay')
})
t.test('second', function (tt) {
function foo () {
tt.ok('no plan', 'but that is ok')
tt.pass('this passes')
tt.equal(1, '1', 'nested failure')
tt.end()
}
function bar () {
return foo()
}
function baz () {
return bar()
}
baz()
})
})
t.pass('this passes')
t.fail('this fails')
t.test('async kid', function (t) {
t.plan(2)
setTimeout(function () {
t.ok(false, 'first timeout', { foo: 'blz' })
}, 50)
setTimeout(function () {
t.pass('second timeout')
})
})
t.pass('pass after async kid')
node-tap-11.0.0/test-legacy/test/spawn.tap 0000664 0000000 0000000 00000005621 13206406237 0020345 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn.js child
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/spawn.js","line":18},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
1..3
# failed 1 of 3 tests
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
# failed 1 of 2 tests
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/spawn.js","line":32},"source":"t.fail('this fails')\n"}
...
# Subtest: async kid
1..2
ok 1 - second timeout
not ok 2 - first timeout
---
{"at":{"column":7,"file":"test-legacy/test/spawn.js","line":37,"method":"_onTimeout"},"foo":"blz","source":"t.ok(false, 'first timeout', { foo: 'blz' })\n"}
...
# failed 1 of 2 tests
not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~
ok 5 - pass after async kid
1..5
# failed 3 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~spawn.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~spawn.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1}
...
# Subtest: nesting
1..2
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: second
ok 1 - but that is ok
ok 2 - this passes
not ok 3 - nested failure
---
{"at":{"column":10,"file":"test-legacy/test/spawn.js","line":18},"compare":"===","found":1,"source":"tt.equal(1, '1', 'nested failure')\n","wanted":"1"}
...
1..3
# failed 1 of 3 tests
not ok 2 - second ___/# time=[0-9.]+(ms)?/~~~
# failed 1 of 2 tests
not ok 2 - nesting ___/# time=[0-9.]+(ms)?/~~~
ok 3 - this passes
not ok 4 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/spawn.js","line":32},"source":"t.fail('this fails')\n"}
...
# Subtest: async kid
1..2
ok 1 - second timeout
not ok 2 - first timeout
---
{"at":{"column":7,"file":"test-legacy/test/spawn.js","line":37,"method":"_onTimeout"},"foo":"blz","source":"t.ok(false, 'first timeout', { foo: 'blz' })\n"}
...
# failed 1 of 2 tests
not ok 5 - async kid ___/# time=[0-9.]+(ms)?/~~~
ok 6 - pass after async kid
1..6
# failed 4 of 6 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/stdin--bail--buffer.tap 0000664 0000000 0000000 00000001725 13206406237 0022645 0 ustar 00root root 0000000 0000000 TAP version 13
# before
ok 1 - fake stdin ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
}
# between
#### TAP version 13
#### 1..3
#### ok 1 - child {
#### 1..1
#### ok
#### }
#### ok 2 - empty {
####
#### }
#### ok 3
# after
not ok 2 - /dev/stdin ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":17,"file":"test-legacy/test/stdin.js","line":60},"failures":[{"id":4,"name":"expect to throw this","plan":{"end":3,"start":1},"tapError":"id greater than plan end"},{"id":4,"name":"expect to throw this","plan":{"end":3,"start":1},"tapError":"id greater than plan end"}],"source":"p.emit('error', new Error('expect to throw this'))\n","test":"/dev/stdin"}
...
{
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
not ok 4 - expect to throw this
Bail out! # expect to throw this
}
Bail out! # expect to throw this
node-tap-11.0.0/test-legacy/test/stdin--bail.tap 0000664 0000000 0000000 00000001106 13206406237 0021312 0 ustar 00root root 0000000 0000000 TAP version 13
# before
# Subtest: fake stdin
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
ok 1 - fake stdin ___/# time=[0-9.]+(ms)?/~~~
# between
#### TAP version 13
#### 1..3
#### ok 1 - child {
#### 1..1
#### ok
#### }
#### ok 2 - empty {
####
#### }
#### ok 3
# after
# Subtest: /dev/stdin
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
not ok 4 - expect to throw this
Bail out! # expect to throw this
Bail out! # expect to throw this
node-tap-11.0.0/test-legacy/test/stdin--buffer.tap 0000664 0000000 0000000 00000002000 13206406237 0021646 0 ustar 00root root 0000000 0000000 TAP version 13
# before
ok 1 - fake stdin ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
}
# between
#### TAP version 13
#### 1..3
#### ok 1 - child {
#### 1..1
#### ok
#### }
#### ok 2 - empty {
####
#### }
#### ok 3
# after
not ok 2 - /dev/stdin ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":17,"file":"test-legacy/test/stdin.js","line":60},"failures":[{"id":4,"name":"expect to throw this","plan":{"end":3,"start":1},"tapError":"id greater than plan end"},{"id":4,"name":"expect to throw this","plan":{"end":3,"start":1},"tapError":"id greater than plan end"}],"source":"p.emit('error', new Error('expect to throw this'))\n","test":"/dev/stdin"}
...
{
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
not ok 4 - expect to throw this
# test count(4) != plan(3)
# failed 2 of 4 tests
}
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/stdin.js 0000664 0000000 0000000 00000001742 13206406237 0020166 0 ustar 00root root 0000000 0000000 var t = require('../..')
var Stdin = t.Stdin
var PT = require('stream').PassThrough
var p = new PT()
t.stdin({ tapStream: p, name: 'fake stdin' })
console.log('# before')
p.write(
'TAP version 13\n' +
'1..3\n' +
'ok 1 - child {\n' +
' 1..1\n' +
' ok\n' +
'}\n' +
'ok 2 - empty {\n' +
' \n' +
'}\n' +
'ok 3\n'
)
p.emit('end')
console.log('# between')
p = new PT()
var s = new Stdin({ tapStream: p, indent: '#### ' })
s.pipe(process.stdout)
s.main(function (e) { if (e) throw e })
p.write(
'TAP version 13\n' +
'1..3\n' +
'ok 1 - child {\n' +
' 1..1\n' +
' ok\n' +
'}\n' +
'ok 2 - empty {\n' +
' \n' +
'}\n' +
'ok 3\n'
)
p.emit('end')
console.log('# after')
p = new PT()
t.stdin({ tapStream: p })
p.write(
'TAP version 13\n' +
'1..3\n' +
'ok 1 - child {\n' +
' 1..1\n' +
' ok\n' +
'}\n' +
'ok 2 - empty {\n' +
' \n' +
'}\n' +
'ok 3\n'
)
p.emit('error', new Error('expect to throw this'))
p.emit('end')
node-tap-11.0.0/test-legacy/test/stdin.tap 0000664 0000000 0000000 00000002044 13206406237 0020332 0 ustar 00root root 0000000 0000000 TAP version 13
# before
# Subtest: fake stdin
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
ok 1 - fake stdin ___/# time=[0-9.]+(ms)?/~~~
# between
#### TAP version 13
#### 1..3
#### ok 1 - child {
#### 1..1
#### ok
#### }
#### ok 2 - empty {
####
#### }
#### ok 3
# after
# Subtest: /dev/stdin
1..3
ok 1 - child {
1..1
ok
}
ok 2 - empty {
}
ok 3
not ok 4 - expect to throw this
# test count(4) != plan(3)
# failed 2 of 4 tests
not ok 2 - /dev/stdin ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":17,"file":"test-legacy/test/stdin.js","line":60},"failures":[{"id":4,"name":"expect to throw this","plan":{"end":3,"start":1},"tapError":"id greater than plan end"},{"id":4,"name":"expect to throw this","plan":{"end":3,"start":1},"tapError":"id greater than plan end"}],"source":"p.emit('error', new Error('expect to throw this'))\n","test":"/dev/stdin"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/subtest-only-options--buffer.tap 0000664 0000000 0000000 00000000134 13206406237 0024674 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - (unnamed test) # SKIP
---
{"some":"diags"}
...
1..1
# skip: 1
node-tap-11.0.0/test-legacy/test/subtest-only-options.js 0000664 0000000 0000000 00000000213 13206406237 0023176 0 ustar 00root root 0000000 0000000 var Test = require('../..').Test
var t = new Test()
t.pipe(process.stdout)
t.test({ skip: true, some: 'diags', diagnostic: true })
t.end()
node-tap-11.0.0/test-legacy/test/subtest-only-options.tap 0000664 0000000 0000000 00000000134 13206406237 0023350 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - (unnamed test) # SKIP
---
{"some":"diags"}
...
1..1
# skip: 1
node-tap-11.0.0/test-legacy/test/subtest-preplan--buffer.tap 0000664 0000000 0000000 00000000735 13206406237 0023672 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - with timeout ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - this is fine
ok 2 - i am ok with how things are proceeding
}
}
ok 2 - no timeout ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - this is fine
ok 2 - i am ok with how things are proceeding
}
}
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/subtest-preplan.js 0000664 0000000 0000000 00000000674 13206406237 0022200 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('with timeout', function (t) {
t.plan(1)
t.test('child test', function (t) {
t.plan(2)
setTimeout(function () {
t.pass('this is fine')
t.pass('i am ok with how things are proceeding')
})
})
})
t.test('no timeout', function (t) {
t.plan(1)
t.test('child test', function (t) {
t.plan(2)
t.pass('this is fine')
t.pass('i am ok with how things are proceeding')
})
})
node-tap-11.0.0/test-legacy/test/subtest-preplan.tap 0000664 0000000 0000000 00000001061 13206406237 0022337 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: with timeout
1..1
# Subtest: child test
1..2
ok 1 - this is fine
ok 2 - i am ok with how things are proceeding
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~
ok 1 - with timeout ___/# time=[0-9.]+(ms)?/~~~
# Subtest: no timeout
1..1
# Subtest: child test
1..2
ok 1 - this is fine
ok 2 - i am ok with how things are proceeding
ok 1 - child test ___/# time=[0-9.]+(ms)?/~~~
ok 2 - no timeout ___/# time=[0-9.]+(ms)?/~~~
1..2
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/subtest-with-name-and-function--buffer.tap 0000664 0000000 0000000 00000000113 13206406237 0026473 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - name ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..1
node-tap-11.0.0/test-legacy/test/subtest-with-name-and-function.js 0000664 0000000 0000000 00000000171 13206406237 0025003 0 ustar 00root root 0000000 0000000 var Test = require('../..').Test
var t = new Test()
t.pipe(process.stdout)
t.test('name', function (t){t.end()})
t.end()
node-tap-11.0.0/test-legacy/test/subtest-with-name-and-function.tap 0000664 0000000 0000000 00000000127 13206406237 0025154 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: name
1..0
ok 1 - name ___/# time=[0-9.]+(ms)?/~~~
1..1
node-tap-11.0.0/test-legacy/test/subtest-with-name-and-options--buffer.tap 0000664 0000000 0000000 00000000122 13206406237 0026341 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - name # SKIP
---
{"some":"diags"}
...
1..1
# skip: 1
node-tap-11.0.0/test-legacy/test/subtest-with-name-and-options.js 0000664 0000000 0000000 00000000223 13206406237 0024647 0 ustar 00root root 0000000 0000000 var Test = require('../..').Test
var t = new Test()
t.pipe(process.stdout)
t.test('name', { skip: true, some: 'diags', diagnostic: true })
t.end()
node-tap-11.0.0/test-legacy/test/subtest-with-name-and-options.tap 0000664 0000000 0000000 00000000122 13206406237 0025015 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - name # SKIP
---
{"some":"diags"}
...
1..1
# skip: 1
node-tap-11.0.0/test-legacy/test/subtest-with-only-a-function--buffer.tap 0000664 0000000 0000000 00000000104 13206406237 0026212 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
1..1
node-tap-11.0.0/test-legacy/test/subtest-with-only-a-function.js 0000664 0000000 0000000 00000000161 13206406237 0024521 0 ustar 00root root 0000000 0000000 var Test = require('../..').Test
var t = new Test()
t.pipe(process.stdout)
t.test(function (t){t.end()})
t.end()
node-tap-11.0.0/test-legacy/test/subtest-with-only-a-function.tap 0000664 0000000 0000000 00000000112 13206406237 0024665 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest
1..0
ok 1 ___/# time=[0-9.]+(ms)?/~~~
1..1
node-tap-11.0.0/test-legacy/test/subtest-with-only-a-name--buffer.tap 0000664 0000000 0000000 00000000067 13206406237 0025315 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - name only # TODO
1..1
# todo: 1
node-tap-11.0.0/test-legacy/test/subtest-with-only-a-name.js 0000664 0000000 0000000 00000000147 13206406237 0023620 0 ustar 00root root 0000000 0000000 var Test = require('../..').Test
var t = new Test()
t.pipe(process.stdout)
t.test('name only')
t.end()
node-tap-11.0.0/test-legacy/test/subtest-with-only-a-name.tap 0000664 0000000 0000000 00000000067 13206406237 0023771 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - name only # TODO
1..1
# todo: 1
node-tap-11.0.0/test-legacy/test/subtest-with-options-and-function--buffer.tap 0000664 0000000 0000000 00000000143 13206406237 0027251 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 ___/# time=[0-9.]+(ms)?/~~~
---
{"some":"diags"}
...
{
1..0
}
1..1
node-tap-11.0.0/test-legacy/test/subtest-with-options-and-function.js 0000664 0000000 0000000 00000000243 13206406237 0025556 0 ustar 00root root 0000000 0000000 var Test = require('../..').Test
var t = new Test()
t.pipe(process.stdout)
t.test({ skip: false, some: 'diags', diagnostic: true }, function (t){t.end()})
t.end()
node-tap-11.0.0/test-legacy/test/subtest-with-options-and-function.tap 0000664 0000000 0000000 00000000151 13206406237 0025724 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest
1..0
ok 1 ___/# time=[0-9.]+(ms)?/~~~
---
{"some":"diags"}
...
1..1
node-tap-11.0.0/test-legacy/test/subtest-without-arguments--buffer.tap 0000664 0000000 0000000 00000000074 13206406237 0025733 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - (unnamed test) # TODO
1..1
# todo: 1
node-tap-11.0.0/test-legacy/test/subtest-without-arguments.js 0000664 0000000 0000000 00000000134 13206406237 0024234 0 ustar 00root root 0000000 0000000 var Test = require('../..').Test
var t = new Test()
t.pipe(process.stdout)
t.test()
t.end()
node-tap-11.0.0/test-legacy/test/subtest-without-arguments.tap 0000664 0000000 0000000 00000000074 13206406237 0024407 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - (unnamed test) # TODO
1..1
# todo: 1
node-tap-11.0.0/test-legacy/test/sync-timeout--bail--buffer.tap 0000664 0000000 0000000 00000000320 13206406237 0024152 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - t.end() ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - did not timeout
1..1
}
not ok 2 - timeout!
---
{"expired":"t.end()","test":"t.end()","timeout":50}
...
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/sync-timeout--bail.tap 0000664 0000000 0000000 00000000373 13206406237 0022636 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: t.end()
ok 1 - did not timeout
1..1
ok 1 - t.end() ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - timeout! ___/# time=[0-9.]+(ms)?/~~~
---
{"expired":"t.end()","test":"t.end()","timeout":50}
...
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/sync-timeout--buffer.tap 0000664 0000000 0000000 00000000667 13206406237 0023206 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - t.end() ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - did not timeout
1..1
}
not ok 2 - timeout!
---
{"expired":"t.end()","test":"t.end()","timeout":50}
...
ok 3 - plan() ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - did not time out
}
not ok 4 - timeout! ___/# time=[0-9.]+(ms)?/~~~
---
{"expired":"plan()","test":"plan()","timeout":50}
...
1..4
# failed 2 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/sync-timeout.js 0000664 0000000 0000000 00000000563 13206406237 0021505 0 ustar 00root root 0000000 0000000 var t = require('../..')
var short = 50
var long = 100
var opt = { timeout: short }
function sleep () {
var start = Date.now()
while (Date.now() - start < long) {
// (-.-)
}
}
t.test('t.end()', opt, function (t) {
sleep()
t.pass('did not timeout')
t.end()
})
t.test('plan()', opt, function (t) {
t.plan(1)
sleep()
t.pass('did not time out')
})
node-tap-11.0.0/test-legacy/test/sync-timeout.tap 0000664 0000000 0000000 00000000760 13206406237 0021654 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: t.end()
ok 1 - did not timeout
1..1
ok 1 - t.end() ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - timeout! ___/# time=[0-9.]+(ms)?/~~~
---
{"expired":"t.end()","test":"t.end()","timeout":50}
...
# Subtest: plan()
1..1
ok 1 - did not time out
ok 3 - plan() ___/# time=[0-9.]+(ms)?/~~~
not ok 4 - timeout! ___/# time=[0-9.]+(ms)?/~~~
---
{"expired":"plan()","test":"plan()","timeout":50}
...
1..4
# failed 2 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/teardown-throw-autocomplete--bail--buffer.tap 0000664 0000000 0000000 00000000641 13206406237 0027203 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - test unfinished
---
{"at":{"column":3,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":14},"source":"t.test('child', function (t) {\n","test":"child"}
...
Bail out! # test unfinished
}
Bail out! # test unfinished
Error: TAP teardown
>>some stack junk<<
{ name: 'TAP', autoend: true, test: 'TAP' }
node-tap-11.0.0/test-legacy/test/teardown-throw-autocomplete--bail.tap 0000664 0000000 0000000 00000000601 13206406237 0025653 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: child
not ok 1 - test unfinished
---
{"at":{"column":3,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":14},"source":"t.test('child', function (t) {\n","test":"child"}
...
Bail out! # test unfinished
Bail out! # test unfinished
Error: TAP teardown
>>some stack junk<<
{ name: 'TAP', autoend: true, test: 'TAP' }
node-tap-11.0.0/test-legacy/test/teardown-throw-autocomplete--buffer.tap 0000664 0000000 0000000 00000001507 13206406237 0026223 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - test unfinished
---
{"at":{"column":3,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":14},"source":"t.test('child', function (t) {\n","test":"child"}
...
not ok 2 - afterEach
---
{"at":{"column":9,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":11},"source":"throw new Error('afterEach')\n","test":"child"}
...
1..2
# failed 2 of 2 tests
}
not ok 2 - child teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":16},"source":"throw new Error('child teardown')\n","test":"child"}
...
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
Error: TAP teardown
>>some stack junk<<
{ name: 'TAP', autoend: true, test: 'TAP' }
node-tap-11.0.0/test-legacy/test/teardown-throw-autocomplete.js 0000664 0000000 0000000 00000000631 13206406237 0024524 0 ustar 00root root 0000000 0000000 console.error = function (msg) {
return (/^ at /.test(msg))
? console.log('>>some stack junk<<')
: console.log.apply(this, arguments)
}
var t = require('../..')
t.tearDown(function () {
throw new Error('TAP teardown')
})
t.afterEach(function (cb) {
throw new Error('afterEach')
cb()
})
t.test('child', function (t) {
t.tearDown(function () {
throw new Error('child teardown')
})
})
node-tap-11.0.0/test-legacy/test/teardown-throw-autocomplete.tap 0000664 0000000 0000000 00000001524 13206406237 0024676 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: child
not ok 1 - test unfinished
---
{"at":{"column":3,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":14},"source":"t.test('child', function (t) {\n","test":"child"}
...
not ok 2 - afterEach
---
{"at":{"column":9,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":11},"source":"throw new Error('afterEach')\n","test":"child"}
...
1..2
# failed 2 of 2 tests
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - child teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-throw-autocomplete.js","line":16},"source":"throw new Error('child teardown')\n","test":"child"}
...
1..2
# failed 2 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
Error: TAP teardown
>>some stack junk<<
{ name: 'TAP', autoend: true, test: 'TAP' }
node-tap-11.0.0/test-legacy/test/teardown-timing--buffer.tap 0000664 0000000 0000000 00000000771 13206406237 0023652 0 ustar 00root root 0000000 0000000 TAP version 13
############## step1 startup
ok 1 - step1 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step1 teardown
############## step2 startup
ok 2 - step2 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step2 teardown
############## step3 startup
############## step4 startup
ok 3 - step3 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step3 teardown
ok 4 - step4 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step4 teardown
1..4
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/teardown-timing-throws--bail--buffer.tap 0000664 0000000 0000000 00000001331 13206406237 0026151 0 ustar 00root root 0000000 0000000 TAP version 13
############## step1 startup
ok 1 - step1 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step1 teardown
############## step2 startup
ok 2 - step2 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step2 teardown
############## step3 startup
############## step4 startup
ok 3 - step3 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step3 teardown
ok 4 - step4 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step4 teardown
not ok 5 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":7},"source":"throw new Error('############## step1 teardown')\n","test":"step1"}
...
Bail out! # ############## step1 teardown
node-tap-11.0.0/test-legacy/test/teardown-timing-throws--bail.tap 0000664 0000000 0000000 00000001415 13206406237 0024630 0 ustar 00root root 0000000 0000000 TAP version 13
############## step1 startup
# Subtest: step1
1..0
ok 1 - step1 ___/# time=[0-9.]+(ms)?/~~~
############## step1 teardown
############## step2 startup
# Subtest: step2
1..0
ok 2 - step2 ___/# time=[0-9.]+(ms)?/~~~
############## step2 teardown
############## step3 startup
# Subtest: step3
1..0
ok 3 - step3 ___/# time=[0-9.]+(ms)?/~~~
############## step3 teardown
############## step4 startup
# Subtest: step4
1..0
ok 4 - step4 ___/# time=[0-9.]+(ms)?/~~~
############## step4 teardown
not ok 5 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":7},"source":"throw new Error('############## step1 teardown')\n","test":"step1"}
...
Bail out! # ############## step1 teardown
node-tap-11.0.0/test-legacy/test/teardown-timing-throws--buffer.tap 0000664 0000000 0000000 00000002556 13206406237 0025201 0 ustar 00root root 0000000 0000000 TAP version 13
############## step1 startup
ok 1 - step1 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step1 teardown
############## step2 startup
ok 2 - step2 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step2 teardown
############## step3 startup
############## step4 startup
ok 3 - step3 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step3 teardown
ok 4 - step4 ___/# time=[0-9.]+(ms)?/~~~ {
1..0
}
############## step4 teardown
not ok 5 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":7},"source":"throw new Error('############## step1 teardown')\n","test":"step1"}
...
not ok 6 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":16},"source":"throw new Error('############## step1 teardown')\n","test":"step2"}
...
not ok 7 - ############## step3 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":25},"source":"throw new Error('############## step3 teardown')\n","test":"step3"}
...
not ok 8 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":34},"source":"throw new Error('############## step1 teardown')\n","test":"step4"}
...
1..8
# failed 4 of 8 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/teardown-timing-throws.js 0000664 0000000 0000000 00000001705 13206406237 0023500 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('step1', function (t) {
console.log('##############', 'step1 startup')
t.tearDown(function () {
console.log('############## step1 teardown')
throw new Error('############## step1 teardown')
})
setImmediate(t.done)
})
t.test('step2', function (t) {
console.log('##############', 'step2 startup')
t.tearDown(function () {
console.log('############## step2 teardown')
throw new Error('############## step1 teardown')
})
setImmediate(t.done)
})
t.test('step3', function (t) {
console.log('##############', 'step3 startup')
t.tearDown(function () {
console.log('############## step3 teardown')
throw new Error('############## step3 teardown')
})
t.done()
})
t.test('step4', function (t) {
console.log('##############', 'step4 startup')
t.tearDown(function () {
console.log('############## step4 teardown')
throw new Error('############## step1 teardown')
})
t.done()
})
node-tap-11.0.0/test-legacy/test/teardown-timing-throws.tap 0000664 0000000 0000000 00000002642 13206406237 0023651 0 ustar 00root root 0000000 0000000 TAP version 13
############## step1 startup
# Subtest: step1
1..0
ok 1 - step1 ___/# time=[0-9.]+(ms)?/~~~
############## step1 teardown
############## step2 startup
# Subtest: step2
1..0
ok 2 - step2 ___/# time=[0-9.]+(ms)?/~~~
############## step2 teardown
############## step3 startup
# Subtest: step3
1..0
ok 3 - step3 ___/# time=[0-9.]+(ms)?/~~~
############## step3 teardown
############## step4 startup
# Subtest: step4
1..0
ok 4 - step4 ___/# time=[0-9.]+(ms)?/~~~
############## step4 teardown
not ok 5 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":7},"source":"throw new Error('############## step1 teardown')\n","test":"step1"}
...
not ok 6 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":16},"source":"throw new Error('############## step1 teardown')\n","test":"step2"}
...
not ok 7 - ############## step3 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":25},"source":"throw new Error('############## step3 teardown')\n","test":"step3"}
...
not ok 8 - ############## step1 teardown
---
{"at":{"column":11,"file":"test-legacy/test/teardown-timing-throws.js","line":34},"source":"throw new Error('############## step1 teardown')\n","test":"step4"}
...
1..8
# failed 4 of 8 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/teardown-timing.js 0000664 0000000 0000000 00000001375 13206406237 0022157 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('step1', function (t) {
console.log('##############', 'step1 startup')
t.tearDown(function () {
console.log('##############', 'step1 teardown')
})
setImmediate(t.done)
})
t.test('step2', function (t) {
console.log('##############', 'step2 startup')
t.tearDown(function () {
console.log('##############', 'step2 teardown')
})
setImmediate(t.done)
})
t.test('step3', function (t) {
console.log('##############', 'step3 startup')
t.tearDown(function () {
console.log('##############', 'step3 teardown')
})
t.done()
})
t.test('step4', function (t) {
console.log('##############', 'step4 startup')
t.tearDown(function () {
console.log('##############', 'step4 teardown')
})
t.done()
})
node-tap-11.0.0/test-legacy/test/teardown-timing.tap 0000664 0000000 0000000 00000001055 13206406237 0022322 0 ustar 00root root 0000000 0000000 TAP version 13
############## step1 startup
# Subtest: step1
1..0
ok 1 - step1 ___/# time=[0-9.]+(ms)?/~~~
############## step1 teardown
############## step2 startup
# Subtest: step2
1..0
ok 2 - step2 ___/# time=[0-9.]+(ms)?/~~~
############## step2 teardown
############## step3 startup
# Subtest: step3
1..0
ok 3 - step3 ___/# time=[0-9.]+(ms)?/~~~
############## step3 teardown
############## step4 startup
# Subtest: step4
1..0
ok 4 - step4 ___/# time=[0-9.]+(ms)?/~~~
############## step4 teardown
1..4
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throw--bail--buffer.tap 0000664 0000000 0000000 00000001211 13206406237 0022655 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - async thrower ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - THINK FAST! and also lines so many
---
{"at":{"column":16,"file":"test-legacy/test/throw.js","line":12},"jerk":true,"source":"var er = new Error('THINK FAST!\\nand also lines\\nso many')\n","test":"async thrower"}
...
Bail out! # THINK FAST! and also lines so many
}
}
Bail out! # THINK FAST! and also lines so many
node-tap-11.0.0/test-legacy/test/throw--bail.tap 0000664 0000000 0000000 00000001122 13206406237 0021332 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: nesting
1..3
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: async thrower
not ok 1 - THINK FAST! and also lines so many
---
{"at":{"column":16,"file":"test-legacy/test/throw.js","line":12},"jerk":true,"source":"var er = new Error('THINK FAST!\\nand also lines\\nso many')\n","test":"async thrower"}
...
Bail out! # THINK FAST! and also lines so many
Bail out! # THINK FAST! and also lines so many
node-tap-11.0.0/test-legacy/test/throw--buffer.tap 0000664 0000000 0000000 00000002344 13206406237 0021703 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - true is ok
ok 2 - doag is also okay
}
not ok 2 - async thrower ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - THINK FAST! and also lines so many
---
{"at":{"column":16,"file":"test-legacy/test/throw.js","line":12},"jerk":true,"source":"var er = new Error('THINK FAST!\\nand also lines\\nso many')\n","test":"async thrower"}
...
1..1
# failed 1 test
}
not ok 3 - thrower ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - here hold this for a second
---
{"at":{"column":14,"file":"test-legacy/test/throw.js","line":18},"source":"var er = new Error('here hold this for a second')\n","syscall":"ring ring","test":"thrower"}
...
1..1
# failed 1 test
}
# failed 2 of 3 tests
}
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/throw.js","line":25},"source":"t.fail('this fails')\n"}
...
not ok 4 - async kid ___/# time=[0-9.]+(ms)?/~~~ {
1..2
Bail out! cannot continue
}
Bail out! cannot continue
node-tap-11.0.0/test-legacy/test/throw-root--bail--buffer.tap 0000664 0000000 0000000 00000000321 13206406237 0023637 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
not ok 2 - catch!
---
{"at":{"column":7,"file":"test-legacy/test/throw-root.js","line":3},"source":"throw new Error('catch!')\n","test":"TAP"}
...
Bail out! # catch!
node-tap-11.0.0/test-legacy/test/throw-root--bail.tap 0000664 0000000 0000000 00000000321 13206406237 0022313 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
not ok 2 - catch!
---
{"at":{"column":7,"file":"test-legacy/test/throw-root.js","line":3},"source":"throw new Error('catch!')\n","test":"TAP"}
...
Bail out! # catch!
node-tap-11.0.0/test-legacy/test/throw-root--buffer.tap 0000664 0000000 0000000 00000000365 13206406237 0022665 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
not ok 2 - catch!
---
{"at":{"column":7,"file":"test-legacy/test/throw-root.js","line":3},"source":"throw new Error('catch!')\n","test":"TAP"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throw-root.js 0000664 0000000 0000000 00000000112 13206406237 0021157 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.pass('this is fine')
throw new Error('catch!')
node-tap-11.0.0/test-legacy/test/throw-root.tap 0000664 0000000 0000000 00000000365 13206406237 0021341 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - this is fine
not ok 2 - catch!
---
{"at":{"column":7,"file":"test-legacy/test/throw-root.js","line":3},"source":"throw new Error('catch!')\n","test":"TAP"}
...
1..2
# failed 1 of 2 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throw-twice--bail--buffer.tap 0000664 0000000 0000000 00000000507 13206406237 0023775 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - fine ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
1..1
}
not ok 2 - Error: this one ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":20,"file":"test-legacy/test/throw-twice.js","line":7},"source":"throw { stack: new Error('this one').stack }\n","test":"fine"}
...
Bail out! # Error: this one
node-tap-11.0.0/test-legacy/test/throw-twice--bail.tap 0000664 0000000 0000000 00000000523 13206406237 0022447 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: fine
ok 1 - fine
1..1
ok 1 - fine ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - Error: this one ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":20,"file":"test-legacy/test/throw-twice.js","line":7},"source":"throw { stack: new Error('this one').stack }\n","test":"fine"}
...
Bail out! # Error: this one
node-tap-11.0.0/test-legacy/test/throw-twice--buffer.tap 0000664 0000000 0000000 00000001050 13206406237 0023005 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - fine ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - fine
1..1
}
not ok 2 - Error: this one ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":20,"file":"test-legacy/test/throw-twice.js","line":7},"source":"throw { stack: new Error('this one').stack }\n","test":"fine"}
...
not ok 3 - not this one ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":11,"file":"test-legacy/test/throw-twice.js","line":10},"source":"throw new Error('not this one')\n","test":"fine"}
...
1..3
# failed 2 of 3 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throw-twice.js 0000664 0000000 0000000 00000000360 13206406237 0021314 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('fine', function (t) {
t.pass('fine')
t.end()
setTimeout(function () {
throw { stack: new Error('this one').stack }
})
setTimeout(function () {
throw new Error('not this one')
}, 100)
})
node-tap-11.0.0/test-legacy/test/throw-twice.tap 0000664 0000000 0000000 00000001064 13206406237 0021466 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: fine
ok 1 - fine
1..1
ok 1 - fine ___/# time=[0-9.]+(ms)?/~~~
not ok 2 - Error: this one ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":20,"file":"test-legacy/test/throw-twice.js","line":7},"source":"throw { stack: new Error('this one').stack }\n","test":"fine"}
...
not ok 3 - not this one ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":11,"file":"test-legacy/test/throw-twice.js","line":10},"source":"throw new Error('not this one')\n","test":"fine"}
...
1..3
# failed 2 of 3 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throw.js 0000664 0000000 0000000 00000001426 13206406237 0020207 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('nesting', function (t) {
t.plan(3)
t.test('first', function (tt) {
tt.plan(2)
tt.ok(true, 'true is ok')
tt.ok('doeg', 'doag is also okay')
})
t.test('async thrower', function (tt) {
setTimeout(function () {
var er = new Error('THINK FAST!\nand also lines\nso many')
er.jerk = true
throw er
})
})
t.test('thrower', function (tt) {
var er = new Error('here hold this for a second')
er.syscall = 'ring ring'
throw er
})
})
t.pass('this passes')
t.fail('this fails')
t.test('async kid', function (t) {
t.plan(2)
setTimeout(function () {
t.pass('first timeout', { foo: 'blz' })
}, 50)
setTimeout(function () {
t.bailout('cannot continue')
})
})
t.pass('pass after async kid')
node-tap-11.0.0/test-legacy/test/throw.tap 0000664 0000000 0000000 00000002404 13206406237 0020354 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: nesting
1..3
# Subtest: first
1..2
ok 1 - true is ok
ok 2 - doag is also okay
ok 1 - first ___/# time=[0-9.]+(ms)?/~~~
# Subtest: async thrower
not ok 1 - THINK FAST! and also lines so many
---
{"at":{"column":16,"file":"test-legacy/test/throw.js","line":12},"jerk":true,"source":"var er = new Error('THINK FAST!\\nand also lines\\nso many')\n","test":"async thrower"}
...
1..1
# failed 1 test
not ok 2 - async thrower ___/# time=[0-9.]+(ms)?/~~~
# Subtest: thrower
not ok 1 - here hold this for a second
---
{"at":{"column":14,"file":"test-legacy/test/throw.js","line":18},"source":"var er = new Error('here hold this for a second')\n","syscall":"ring ring","test":"thrower"}
...
1..1
# failed 1 test
not ok 3 - thrower ___/# time=[0-9.]+(ms)?/~~~
# failed 2 of 3 tests
not ok 1 - nesting ___/# time=[0-9.]+(ms)?/~~~
ok 2 - this passes
not ok 3 - this fails
---
{"at":{"column":3,"file":"test-legacy/test/throw.js","line":25},"source":"t.fail('this fails')\n"}
...
# Subtest: async kid
1..2
Bail out! cannot continue
Bail out! cannot continue
node-tap-11.0.0/test-legacy/test/throws--bail--buffer.tap 0000664 0000000 0000000 00000000621 13206406237 0023044 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - throws should match a regex ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - passing_thrower
not ok 2 - failing_thrower
---
{"at":{"column":5,"file":"test-legacy/test/throws.js","line":9},"found":"test","pattern":"/fasdfsadf/","source":"t.throws(function failing_thrower () {\n"}
...
Bail out! # failing_thrower
}
Bail out! # failing_thrower
node-tap-11.0.0/test-legacy/test/throws--bail.tap 0000664 0000000 0000000 00000000561 13206406237 0021523 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: throws should match a regex
1..2
ok 1 - passing_thrower
not ok 2 - failing_thrower
---
{"at":{"column":5,"file":"test-legacy/test/throws.js","line":9},"found":"test","pattern":"/fasdfsadf/","source":"t.throws(function failing_thrower () {\n"}
...
Bail out! # failing_thrower
Bail out! # failing_thrower
node-tap-11.0.0/test-legacy/test/throws--buffer.tap 0000664 0000000 0000000 00000000641 13206406237 0022064 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - throws should match a regex ___/# time=[0-9.]+(ms)?/~~~ {
1..2
ok 1 - passing_thrower
not ok 2 - failing_thrower
---
{"at":{"column":5,"file":"test-legacy/test/throws.js","line":9},"found":"test","pattern":"/fasdfsadf/","source":"t.throws(function failing_thrower () {\n"}
...
# failed 1 of 2 tests
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throws-and-plans--bail--buffer.tap 0000664 0000000 0000000 00000000732 13206406237 0024722 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - expect truthy value
not ok 2 - plans of 1 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - before sync thrower
ok 2 - sync thrower ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - before the bomb
}
not ok 3 - pwnSync
---
{"at":{"column":11,"file":"test-legacy/test/throws-and-plans.js","line":10},"source":"throw new Error('pwnSync')\n","test":"sync thrower"}
...
Bail out! # pwnSync
}
Bail out! # pwnSync
node-tap-11.0.0/test-legacy/test/throws-and-plans--bail.tap 0000664 0000000 0000000 00000000716 13206406237 0023400 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - expect truthy value
# Subtest: plans of 1
ok 1 - before sync thrower
# Subtest: sync thrower
1..1
ok 1 - before the bomb
ok 2 - sync thrower ___/# time=[0-9.]+(ms)?/~~~
not ok 3 - pwnSync
---
{"at":{"column":11,"file":"test-legacy/test/throws-and-plans.js","line":10},"source":"throw new Error('pwnSync')\n","test":"sync thrower"}
...
Bail out! # pwnSync
Bail out! # pwnSync
node-tap-11.0.0/test-legacy/test/throws-and-plans--buffer.tap 0000664 0000000 0000000 00000004415 13206406237 0023742 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - expect truthy value
not ok 2 - plans of 1 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - before sync thrower
ok 2 - sync thrower ___/# time=[0-9.]+(ms)?/~~~ {
1..1
ok 1 - before the bomb
}
not ok 3 - pwnSync
---
{"at":{"column":11,"file":"test-legacy/test/throws-and-plans.js","line":10},"source":"throw new Error('pwnSync')\n","test":"sync thrower"}
...
ok 4 - async thrower ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - before set the bomb
ok 2 - after set the bomb
ok 3 - before the bomb
}
ok 5 - after child
1..5
# failed 1 of 5 tests
}
not ok 3 - no assert only throw ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - false is truthy right?
---
{"actual":false,"at":{"column":3,"file":"test-legacy/test/throws-and-plans.js","line":29},"expected":true,"generatedMessage":false,"operator":"==","source":"assert(false, 'false is truthy right?')\n","test":"no assert only throw","type":"AssertionError"}
...
1..1
# failed 1 test
}
not ok 4 - plans of 8 ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - before child
not ok 2 - sync thrower ___/# time=[0-9.]+(ms)?/~~~ {
1..8
ok 1 - before the bomb
not ok 2 - pwnSync
---
{"at":{"column":11,"file":"test-legacy/test/throws-and-plans.js","line":39},"source":"throw new Error('pwnSync')\n","test":"sync thrower"}
...
# test count(2) != plan(8)
# failed 1 of 2 tests
}
not ok 3 - async thrower ___/# time=[0-9.]+(ms)?/~~~ {
1..8
ok 1 - before set the bomb
ok 2 - after set the bomb
ok 3 - before the bomb
not ok 4 - pwn
---
{"at":{"column":13,"file":"test-legacy/test/throws-and-plans.js","line":51},"source":"throw new Error('pwn')\n","test":"async thrower"}
...
# test count(4) != plan(8)
# failed 1 of 4 tests
}
ok 4 - after child
1..4
# failed 2 of 4 tests
}
not ok 5 - pwn ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":13,"file":"test-legacy/test/throws-and-plans.js","line":18},"source":"throw new Error('pwn')\n","test":"async thrower"}
...
1..5
# failed 4 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throws-and-plans.js 0000664 0000000 0000000 00000002460 13206406237 0022244 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.ok('true')
t.test('plans of 1', function (t) {
t.pass('before sync thrower')
t.test('sync thrower', function (tt) {
tt.plan(1)
tt.pass('before the bomb')
throw new Error('pwnSync')
})
t.test('async thrower', function (tt) {
tt.plan(3)
tt.pass('before set the bomb')
setTimeout(function () {
tt.pass('before the bomb')
throw new Error('pwn')
})
tt.pass('after set the bomb')
})
t.pass('after child')
t.end()
})
t.test('no assert only throw', function (t) {
var assert = require('../fixtures/assert.js')
assert(true, 'true is truthy')
assert(false, 'false is truthy right?')
})
t.test('plans of 8', function (t) {
t.pass('before child')
t.test('sync thrower', function (tt) {
tt.plan(8)
tt.pass('before the bomb')
throw new Error('pwnSync')
tt.pass('after the bomb') // eslint-disable-line
tt.end() // eslint-disable-line
})
// return t.end()
t.test('async thrower', function (tt) {
tt.plan(8)
tt.pass('before set the bomb')
setTimeout(function () {
tt.pass('before the bomb')
throw new Error('pwn')
tt.pass('after the bomb') // eslint-disable-line
tt.end() // eslint-disable-line
})
tt.pass('after set the bomb')
})
t.pass('after child')
t.end()
})
node-tap-11.0.0/test-legacy/test/throws-and-plans.tap 0000664 0000000 0000000 00000004637 13206406237 0022424 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - expect truthy value
# Subtest: plans of 1
ok 1 - before sync thrower
# Subtest: sync thrower
1..1
ok 1 - before the bomb
ok 2 - sync thrower ___/# time=[0-9.]+(ms)?/~~~
not ok 3 - pwnSync
---
{"at":{"column":11,"file":"test-legacy/test/throws-and-plans.js","line":10},"source":"throw new Error('pwnSync')\n","test":"sync thrower"}
...
# Subtest: async thrower
1..3
ok 1 - before set the bomb
ok 2 - after set the bomb
ok 3 - before the bomb
ok 4 - async thrower ___/# time=[0-9.]+(ms)?/~~~
ok 5 - after child
1..5
# failed 1 of 5 tests
not ok 2 - plans of 1 ___/# time=[0-9.]+(ms)?/~~~
# Subtest: no assert only throw
not ok 1 - false is truthy right?
---
{"actual":false,"at":{"column":3,"file":"test-legacy/test/throws-and-plans.js","line":29},"expected":true,"generatedMessage":false,"operator":"==","source":"assert(false, 'false is truthy right?')\n","test":"no assert only throw","type":"AssertionError"}
...
1..1
# failed 1 test
not ok 3 - no assert only throw ___/# time=[0-9.]+(ms)?/~~~
# Subtest: plans of 8
ok 1 - before child
# Subtest: sync thrower
1..8
ok 1 - before the bomb
not ok 2 - pwnSync
---
{"at":{"column":11,"file":"test-legacy/test/throws-and-plans.js","line":39},"source":"throw new Error('pwnSync')\n","test":"sync thrower"}
...
# test count(2) != plan(8)
# failed 1 of 2 tests
not ok 2 - sync thrower ___/# time=[0-9.]+(ms)?/~~~
# Subtest: async thrower
1..8
ok 1 - before set the bomb
ok 2 - after set the bomb
ok 3 - before the bomb
not ok 4 - pwn
---
{"at":{"column":13,"file":"test-legacy/test/throws-and-plans.js","line":51},"source":"throw new Error('pwn')\n","test":"async thrower"}
...
# test count(4) != plan(8)
# failed 1 of 4 tests
not ok 3 - async thrower ___/# time=[0-9.]+(ms)?/~~~
ok 4 - after child
1..4
# failed 2 of 4 tests
not ok 4 - plans of 8 ___/# time=[0-9.]+(ms)?/~~~
not ok 5 - pwn ___/# time=[0-9.]+(ms)?/~~~
---
{"at":{"column":13,"file":"test-legacy/test/throws-and-plans.js","line":18},"source":"throw new Error('pwn')\n","test":"async thrower"}
...
1..5
# failed 4 of 5 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/throws.js 0000664 0000000 0000000 00000000410 13206406237 0020362 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('throws should match a regex', function (t) {
t.plan(2)
t.throws(function passing_thrower () {
throw new Error('test')
}, /test/)
t.throws(function failing_thrower () {
throw new Error('test')
}, /fasdfsadf/)
})
node-tap-11.0.0/test-legacy/test/throws.tap 0000664 0000000 0000000 00000000704 13206406237 0020540 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: throws should match a regex
1..2
ok 1 - passing_thrower
not ok 2 - failing_thrower
---
{"at":{"column":5,"file":"test-legacy/test/throws.js","line":9},"found":"test","pattern":"/fasdfsadf/","source":"t.throws(function failing_thrower () {\n"}
...
# failed 1 of 2 tests
not ok 1 - throws should match a regex ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout--bail--buffer.tap 0000664 0000000 0000000 00000001122 13206406237 0023201 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - parent of timeout test ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - timeout test ___/# time=[0-9.]+(ms)?/~~~
---
{"timeout":50}
...
{
not ok 1 - this never completes ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - baby ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - wait a sec...
not ok 2 - timeout!
---
{"expired":"timeout test","test":"baby"}
...
Bail out! # timeout!
}
}
}
}
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout--bail.tap 0000664 0000000 0000000 00000000615 13206406237 0021663 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: parent of timeout test
# Subtest: timeout test
# Subtest: this never completes
# Subtest: baby
ok 1 - wait a sec...
not ok 2 - timeout!
---
{"expired":"timeout test","test":"baby"}
...
Bail out! # timeout!
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout--buffer.tap 0000664 0000000 0000000 00000001551 13206406237 0022225 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - parent of timeout test ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - timeout test ___/# time=[0-9.]+(ms)?/~~~
---
{"timeout":50}
...
{
not ok 1 - this never completes ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - baby ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - wait a sec...
not ok 2 - timeout!
---
{"expired":"timeout test","test":"baby"}
...
1..2
# failed 1 of 2 tests
}
ok 2 - p
ok 3 - a
ok 4 - s
ok 5 - s
1..5
# failed 1 of 5 tests
}
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout-via-runner--bail--buffer.tap 0000664 0000000 0000000 00000001302 13206406237 0025265 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1,"timeout":1000}
...
{
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
not ok 4 - child test ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
Bail out! # timeout!
}
}
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout-via-runner--bail.tap 0000664 0000000 0000000 00000000736 13206406237 0023753 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner.js child
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
# Subtest: child test
1..3
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
Bail out! # timeout!
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout-via-runner--buffer.tap 0000664 0000000 0000000 00000001476 13206406237 0024317 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGTERM","timeout":1000}
...
{
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
not ok 4 - child test ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
# failed 1 of 3 tests
}
1..4
# failed 1 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout-via-runner-ignore-sigterm--bail--buffer.tap 0000664 0000000 0000000 00000001103 13206406237 0030215 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner-ignore-sigterm.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","timeout":1000}
...
{
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
yolo
not ok 4 - timeout!
---
{"expired":"___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child"}
...
Bail out! # timeout!
}
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout-via-runner-ignore-sigterm--bail.tap 0000664 0000000 0000000 00000001032 13206406237 0026672 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
# Subtest: child test
1..3
ok 1 - this is fine 4
ok 2 - this is fine 5
yolo
not ok 3 - timeout!
---
{"expired":"___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child"}
...
# failed 1 of 3 tests
Bail out! # timeout!
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout-via-runner-ignore-sigterm--buffer.tap 0000664 0000000 0000000 00000001152 13206406237 0027237 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner-ignore-sigterm.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","timeout":1000}
...
{
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
yolo
not ok 4 - timeout!
---
{"expired":"___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child"}
...
1..4
# failed 1 of 4 tests
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout-via-runner-ignore-sigterm.js 0000664 0000000 0000000 00000000744 13206406237 0025551 0 ustar 00root root 0000000 0000000 var t = require('../..')
if (process.argv[2] === 'child') {
process.on('SIGTERM', function () {
console.log('yolo')
})
t.pass('this is fine 1')
t.pass('this is fine 2')
t.pass('this is fine 3')
t.test('child test', function (t) {
t.plan(3)
t.pass('this is fine 4')
t.pass('this is fine 5')
setTimeout(function (res) {
t.pass('request complete')
}, 20000)
})
} else {
t.spawn(process.execPath, [__filename, 'child'], { timeout: 1000 })
}
node-tap-11.0.0/test-legacy/test/timeout-via-runner-ignore-sigterm.tap 0000664 0000000 0000000 00000001561 13206406237 0025717 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
# Subtest: child test
1..3
ok 1 - this is fine 4
ok 2 - this is fine 5
yolo
not ok 3 - timeout!
---
{"expired":"___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child"}
...
# failed 1 of 3 tests
not ok 4 - timeout!
1..4
# failed 1 of 4 tests
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-ignore-sigterm.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner-ignore-sigterm.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","timeout":1000}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout-via-runner-no-plan--bail--buffer.tap 0000664 0000000 0000000 00000001305 13206406237 0026632 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-no-plan.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner-no-plan.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":1,"timeout":1000}
...
{
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
not ok 4 - child test ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
Bail out! # timeout!
}
}
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout-via-runner-no-plan--bail.tap 0000664 0000000 0000000 00000000731 13206406237 0025310 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-no-plan.js child
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
# Subtest: child test
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
Bail out! # timeout!
Bail out! # timeout!
node-tap-11.0.0/test-legacy/test/timeout-via-runner-no-plan--buffer.tap 0000664 0000000 0000000 00000001516 13206406237 0025654 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-no-plan.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner-no-plan.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGTERM","timeout":1000}
...
{
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
not ok 4 - child test ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
1..3
# failed 1 of 3 tests
}
1..4
# failed 1 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout-via-runner-no-plan.js 0000664 0000000 0000000 00000000641 13206406237 0024156 0 ustar 00root root 0000000 0000000 var t = require('../..')
if (process.argv[2] === 'child') {
t.pass('this is fine 1')
t.pass('this is fine 2')
t.pass('this is fine 3')
t.test('child test', function (t) {
t.pass('this is fine 4')
t.pass('this is fine 5')
setTimeout(function (res) {
t.pass('request complete')
t.end()
}, 20000)
})
} else {
t.spawn(process.execPath, [__filename, 'child'], { timeout: 1000 })
}
node-tap-11.0.0/test-legacy/test/timeout-via-runner-no-plan.tap 0000664 0000000 0000000 00000001656 13206406237 0024335 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-no-plan.js child
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
# Subtest: child test
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
1..3
# failed 1 of 3 tests
not ok 4 - child test ___/# time=[0-9.]+(ms)?/~~~
1..4
# failed 1 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner-no-plan.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner-no-plan.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGTERM","timeout":1000}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout-via-runner.js 0000664 0000000 0000000 00000000641 13206406237 0022614 0 ustar 00root root 0000000 0000000 var t = require('../..')
if (process.argv[2] === 'child') {
t.pass('this is fine 1')
t.pass('this is fine 2')
t.pass('this is fine 3')
t.test('child test', function (t) {
t.plan(3)
t.pass('this is fine 4')
t.pass('this is fine 5')
setTimeout(function (res) {
t.pass('request complete')
}, 20000)
})
} else {
t.spawn(process.execPath, [__filename, 'child'], { timeout: 1000 })
}
node-tap-11.0.0/test-legacy/test/timeout-via-runner.tap 0000664 0000000 0000000 00000001626 13206406237 0022770 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner.js child
ok 1 - this is fine 1
ok 2 - this is fine 2
ok 3 - this is fine 3
# Subtest: child test
1..3
ok 1 - this is fine 4
ok 2 - this is fine 5
not ok 3 - timeout!
---
{"expired":"TAP","handles":[{"type":"Timer"}],"signal":"SIGTERM","test":"child test"}
...
# failed 1 of 3 tests
not ok 4 - child test ___/# time=[0-9.]+(ms)?/~~~
1..4
# failed 1 of 4 tests
___/# time=[0-9.]+(ms)?/~~~
not ok 1 - ___/.*(node(js)?|iojs)(.exe)?.*/~~~timeout-via-runner.js child ___/# time=[0-9.]+(ms)?/~~~
---
{"args":["___/.*/~~~timeout-via-runner.js","child"],"command":"___/.*(node(js)?|iojs)(.exe)?/~~~","cwd":"___/.*/~~~","exitCode":null,"signal":"SIGTERM","timeout":1000}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/timeout.js 0000664 0000000 0000000 00000001052 13206406237 0020525 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('parent of timeout test', function (t) {
t.test('timeout test', { timeout: 50 }, function (t) {
t.test('this never completes', function (tt) {
tt.test('baby', function (tt) {
tt.pass('wait a sec...')
var timer = setTimeout(function () {
tt.pass('ok done')
tt.end()
}, 10000)
tt.on('end', clearTimeout.bind(null, timer))
})
tt.pass('p')
tt.pass('a')
tt.pass('s')
tt.pass('s')
tt.end()
})
t.end()
})
t.end()
})
node-tap-11.0.0/test-legacy/test/timeout.tap 0000664 0000000 0000000 00000001677 13206406237 0020712 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: parent of timeout test
# Subtest: timeout test
# Subtest: this never completes
# Subtest: baby
ok 1 - wait a sec...
not ok 2 - timeout!
---
{"expired":"timeout test","test":"baby"}
...
1..2
# failed 1 of 2 tests
not ok 1 - baby ___/# time=[0-9.]+(ms)?/~~~
ok 2 - p
ok 3 - a
ok 4 - s
ok 5 - s
1..5
# failed 1 of 5 tests
not ok 1 - this never completes ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
not ok 1 - timeout test ___/# time=[0-9.]+(ms)?/~~~
---
{"timeout":50}
...
1..1
# failed 1 test
not ok 1 - parent of timeout test ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/todo--buffer.tap 0000664 0000000 0000000 00000001741 13206406237 0021505 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - someday this will be a function that throws # TODO
ok 2 - someday this will be a function that knows # TODO
ok 3 - true is truthy
ok 4 - ten is also truthy
1..4
# todo: 2
}
1..3
# todo: 2
}
1..3
# todo: 2
}
ok 2 - (unnamed test) # TODO
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~ {
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
}
1..3
# todo: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/todo.js 0000664 0000000 0000000 00000001375 13206406237 0020014 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('a set of tests to be done later', function (t) {
t.test('should have a thingie')
t.test('should have a second whoosits also')
t.test('the subset', function (t) {
t.test('should be a child thingie')
t.test('should also be a whoosits')
t.test('has some of these things', function (t) {
t.throws('someday this will be a function that throws')
t.doesNotThrow('someday this will be a function that knows')
t.ok(true, 'true is truthy')
t.ok(10, 'ten is also truthy')
t.end()
})
t.end()
})
t.end()
})
// literally nothing
t.test()
t.test('another set of tests', function (t) {
t.test('is a second set')
t.test('looks like english')
t.test('is marked TODO')
t.end()
})
node-tap-11.0.0/test-legacy/test/todo.tap 0000664 0000000 0000000 00000002126 13206406237 0020157 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: a set of tests to be done later
ok 1 - should have a thingie # TODO
ok 2 - should have a second whoosits also # TODO
# Subtest: the subset
ok 1 - should be a child thingie # TODO
ok 2 - should also be a whoosits # TODO
# Subtest: has some of these things
ok 1 - someday this will be a function that throws # TODO
ok 2 - someday this will be a function that knows # TODO
ok 3 - true is truthy
ok 4 - ten is also truthy
1..4
# todo: 2
ok 3 - has some of these things ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 3 - the subset ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 2
ok 1 - a set of tests to be done later ___/# time=[0-9.]+(ms)?/~~~
ok 2 - (unnamed test) # TODO
# Subtest: another set of tests
ok 1 - is a second set # TODO
ok 2 - looks like english # TODO
ok 3 - is marked TODO # TODO
1..3
# todo: 3
ok 3 - another set of tests ___/# time=[0-9.]+(ms)?/~~~
1..3
# todo: 1
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/type-function--bail--buffer.tap 0000664 0000000 0000000 00000000475 13206406237 0024331 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - type is Function
ok 2 - type is Function
ok 3 - type is Function
not ok 4 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":5},"compare":"===","found":"function","source":"t.type(t.type, Object)\n","wanted":"Object"}
...
Bail out! # type is Object
node-tap-11.0.0/test-legacy/test/type-function--bail.tap 0000664 0000000 0000000 00000000475 13206406237 0023005 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - type is Function
ok 2 - type is Function
ok 3 - type is Function
not ok 4 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":5},"compare":"===","found":"function","source":"t.type(t.type, Object)\n","wanted":"Object"}
...
Bail out! # type is Object
node-tap-11.0.0/test-legacy/test/type-function--buffer.tap 0000664 0000000 0000000 00000001375 13206406237 0023347 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - type is Function
ok 2 - type is Function
ok 3 - type is Function
not ok 4 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":5},"compare":"===","found":"function","source":"t.type(t.type, Object)\n","wanted":"Object"}
...
not ok 5 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":6},"compare":"===","found":"function","source":"t.type(function () {}, Object)\n","wanted":"Object"}
...
not ok 6 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":7},"compare":"===","found":"function","source":"t.type(new Function(), Object)\n","wanted":"Object"}
...
1..6
# failed 3 of 6 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/type-function.js 0000664 0000000 0000000 00000000311 13206406237 0021640 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.type(t.type, Function)
t.type(function () {}, Function)
t.type(new Function(), Function)
t.type(t.type, Object)
t.type(function () {}, Object)
t.type(new Function(), Object)
node-tap-11.0.0/test-legacy/test/type-function.tap 0000664 0000000 0000000 00000001375 13206406237 0022023 0 ustar 00root root 0000000 0000000 TAP version 13
ok 1 - type is Function
ok 2 - type is Function
ok 3 - type is Function
not ok 4 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":5},"compare":"===","found":"function","source":"t.type(t.type, Object)\n","wanted":"Object"}
...
not ok 5 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":6},"compare":"===","found":"function","source":"t.type(function () {}, Object)\n","wanted":"Object"}
...
not ok 6 - type is Object
---
{"at":{"column":3,"file":"test-legacy/test/type-function.js","line":7},"compare":"===","found":"function","source":"t.type(new Function(), Object)\n","wanted":"Object"}
...
1..6
# failed 3 of 6 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/unfinished--bail--buffer.tap 0000664 0000000 0000000 00000000620 13206406237 0023651 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - t1 ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - t11 ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished.js","line":4},"source":"t.test('t11', function (t) {\n","test":"t11"}
...
Bail out! # test unfinished
}
}
Bail out! # test unfinished
node-tap-11.0.0/test-legacy/test/unfinished--bail.tap 0000664 0000000 0000000 00000000514 13206406237 0022327 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: t1
# Subtest: t11
1..1
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished.js","line":4},"source":"t.test('t11', function (t) {\n","test":"t11"}
...
Bail out! # test unfinished
Bail out! # test unfinished
node-tap-11.0.0/test-legacy/test/unfinished--buffer.tap 0000664 0000000 0000000 00000001770 13206406237 0022676 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - t1 ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - t11 ___/# time=[0-9.]+(ms)?/~~~ {
1..1
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished.js","line":4},"source":"t.test('t11', function (t) {\n","test":"t11"}
...
# failed 1 test
}
ok 2 - this would be ok if it ever happened
1..2
# failed 1 of 2 tests
}
ok 2 - 1 === 1
ok 3 - expect truthy value
not ok 4 - failsome
---
{"at":{"column":5,"file":"test-legacy/test/unfinished.js","line":23},"hoo":"hah","source":"tap.fail('failsome', { hoo: 'hah' })\n"}
...
not ok 5 - child test left in queue: t.spawn spawny
not ok 6 - child test left in queue: t.spawn ___/.*(node(js)?|iojs)(.exe)?/~~~ --version
not ok 7 - child test left in queue: t.test
not ok 8 - child test left in queue: t.test
not ok 9 - child test left in queue: t.test t2
1..4
# test count(9) != plan(4)
# failed 7 of 9 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/unfinished-empty--bail--buffer.tap 0000664 0000000 0000000 00000000605 13206406237 0025010 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - a ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - b ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished-empty.js","line":6},"source":"t.test('b', function (t) {\n","test":"b"}
...
Bail out! # test unfinished
}
}
Bail out! # test unfinished
ok
node-tap-11.0.0/test-legacy/test/unfinished-empty--bail.tap 0000664 0000000 0000000 00000000501 13206406237 0023457 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: a
# Subtest: b
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished-empty.js","line":6},"source":"t.test('b', function (t) {\n","test":"b"}
...
Bail out! # test unfinished
Bail out! # test unfinished
ok
node-tap-11.0.0/test-legacy/test/unfinished-empty--buffer.tap 0000664 0000000 0000000 00000000676 13206406237 0024036 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - a ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - b ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished-empty.js","line":6},"source":"t.test('b', function (t) {\n","test":"b"}
...
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
ok
node-tap-11.0.0/test-legacy/test/unfinished-empty.js 0000664 0000000 0000000 00000000235 13206406237 0022331 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.teardown(function () { console.log('ok') })
t.test('a', function (t) {
t.test('b', function (t) {
// nothing here
})
})
node-tap-11.0.0/test-legacy/test/unfinished-empty.tap 0000664 0000000 0000000 00000000720 13206406237 0022500 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: a
# Subtest: b
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished-empty.js","line":6},"source":"t.test('b', function (t) {\n","test":"b"}
...
1..1
# failed 1 test
not ok 1 - b ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
not ok 1 - a ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
ok
node-tap-11.0.0/test-legacy/test/unfinished-promise--bail--buffer.tap 0000664 0000000 0000000 00000001054 13206406237 0025327 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - ok
not ok 2 - test unfinished
---
{"at":{"column":14,"file":"test-legacy/test/unfinished-promise.js","line":4},"source":"return t.test('grandchild', function (t) {\n","test":"grandchild"}
...
Bail out! # test unfinished
}
}
}
Bail out! # test unfinished
node-tap-11.0.0/test-legacy/test/unfinished-promise--bail.tap 0000664 0000000 0000000 00000000700 13206406237 0024000 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: parent
# Subtest: child
# Subtest: grandchild
1..3
ok 1 - ok
not ok 2 - test unfinished
---
{"at":{"column":14,"file":"test-legacy/test/unfinished-promise.js","line":4},"source":"return t.test('grandchild', function (t) {\n","test":"grandchild"}
...
Bail out! # test unfinished
Bail out! # test unfinished
node-tap-11.0.0/test-legacy/test/unfinished-promise--buffer.tap 0000664 0000000 0000000 00000001263 13206406237 0024347 0 ustar 00root root 0000000 0000000 TAP version 13
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ {
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~ {
1..3
ok 1 - ok
not ok 2 - test unfinished
---
{"at":{"column":14,"file":"test-legacy/test/unfinished-promise.js","line":4},"source":"return t.test('grandchild', function (t) {\n","test":"grandchild"}
...
# test count(2) != plan(3)
# failed 1 of 2 tests
}
1..1
# failed 1 test
}
1..1
# failed 1 test
}
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/unfinished-promise.js 0000664 0000000 0000000 00000000302 13206406237 0022644 0 ustar 00root root 0000000 0000000 var t = require('../..')
t.test('parent', function (t) {
return t.test('child', function (t) {
return t.test('grandchild', function (t) {
t.plan(3)
t.pass('ok')
})
})
})
node-tap-11.0.0/test-legacy/test/unfinished-promise.tap 0000664 0000000 0000000 00000001340 13206406237 0023017 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: parent
# Subtest: child
# Subtest: grandchild
1..3
ok 1 - ok
not ok 2 - test unfinished
---
{"at":{"column":14,"file":"test-legacy/test/unfinished-promise.js","line":4},"source":"return t.test('grandchild', function (t) {\n","test":"grandchild"}
...
# test count(2) != plan(3)
# failed 1 of 2 tests
not ok 1 - grandchild ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
not ok 1 - child ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
not ok 1 - parent ___/# time=[0-9.]+(ms)?/~~~
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/unfinished.js 0000664 0000000 0000000 00000001650 13206406237 0021177 0 ustar 00root root 0000000 0000000 var tap = require('../..')
tap.test('t1', function (t) {
t.test('t11', function (t) {
t.plan(1)
process.on('some event that never happens', function () {
t.pass('ok')
})
})
// Nothing beyond this point will actually be processed
// Everything will just get stuffed into the queue, because
// the child test above is unfinished. When the process
// ends, because there's no pending IO, it'll emit a bunch of
// failures indicating that they were abandoned in the queue.
t.ok(true, 'this would be ok if it ever happened')
t.end()
})
tap.equal(1, 1, '1 === 1')
tap.ok('this is ok')
tap.fail('failsome', { hoo: 'hah' })
tap.spawn('cat', [__filename], 'spawny', { rar: 'grr' })
tap.spawn('node', ['--version'], { rar: 'grr' })
tap.test(function (t) {
process.nextTick(t.end)
})
tap.test('', function (t) {
process.nextTick(t.end)
})
tap.test('t2', function (t) {
process.nextTick(t.end)
})
node-tap-11.0.0/test-legacy/test/unfinished.tap 0000664 0000000 0000000 00000002015 13206406237 0021343 0 ustar 00root root 0000000 0000000 TAP version 13
# Subtest: t1
# Subtest: t11
1..1
not ok 1 - test unfinished
---
{"at":{"column":5,"file":"test-legacy/test/unfinished.js","line":4},"source":"t.test('t11', function (t) {\n","test":"t11"}
...
# failed 1 test
not ok 1 - t11 ___/# time=[0-9.]+(ms)?/~~~
ok 2 - this would be ok if it ever happened
1..2
# failed 1 of 2 tests
not ok 1 - t1 ___/# time=[0-9.]+(ms)?/~~~
ok 2 - 1 === 1
ok 3 - expect truthy value
not ok 4 - failsome
---
{"at":{"column":5,"file":"test-legacy/test/unfinished.js","line":23},"hoo":"hah","source":"tap.fail('failsome', { hoo: 'hah' })\n"}
...
not ok 5 - child test left in queue: t.spawn spawny
not ok 6 - child test left in queue: t.spawn ___/.*(node(js)?|iojs)(.exe)?/~~~ --version
not ok 7 - child test left in queue: t.test
not ok 8 - child test left in queue: t.test
not ok 9 - child test left in queue: t.test t2
1..4
# test count(9) != plan(4)
# failed 7 of 9 tests
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/unhandled-rejection--bail--buffer.tap 0000664 0000000 0000000 00000000371 13206406237 0025442 0 ustar 00root root 0000000 0000000 TAP version 13
# this is fine
not ok 1 - 💩
---
{"at":{"column":30,"constructor":true,"file":"test-legacy/test/unhandled-rejection.js","line":9},"source":"this.dump = Promise.reject(new Error('💩'))\n","test":"TAP"}
...
Bail out! # 💩
node-tap-11.0.0/test-legacy/test/unhandled-rejection--bail.tap 0000664 0000000 0000000 00000000371 13206406237 0024116 0 ustar 00root root 0000000 0000000 TAP version 13
# this is fine
not ok 1 - 💩
---
{"at":{"column":30,"constructor":true,"file":"test-legacy/test/unhandled-rejection.js","line":9},"source":"this.dump = Promise.reject(new Error('💩'))\n","test":"TAP"}
...
Bail out! # 💩
node-tap-11.0.0/test-legacy/test/unhandled-rejection--buffer.tap 0000664 0000000 0000000 00000000431 13206406237 0024455 0 ustar 00root root 0000000 0000000 TAP version 13
# this is fine
not ok 1 - 💩
---
{"at":{"column":30,"constructor":true,"file":"test-legacy/test/unhandled-rejection.js","line":9},"source":"this.dump = Promise.reject(new Error('💩'))\n","test":"TAP"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/test/unhandled-rejection.js 0000664 0000000 0000000 00000000407 13206406237 0022764 0 ustar 00root root 0000000 0000000 if (typeof Promise === 'undefined')
Promise = require('bluebird')
var tap = require('../..')
tap.comment('this is fine')
function Poo () {
// Initially set the loaded status to a rejected promise
this.dump = Promise.reject(new Error('💩'))
}
new Poo()
node-tap-11.0.0/test-legacy/test/unhandled-rejection.tap 0000664 0000000 0000000 00000000431 13206406237 0023131 0 ustar 00root root 0000000 0000000 TAP version 13
# this is fine
not ok 1 - 💩
---
{"at":{"column":30,"constructor":true,"file":"test-legacy/test/unhandled-rejection.js","line":9},"source":"this.dump = Promise.reject(new Error('💩'))\n","test":"TAP"}
...
1..1
# failed 1 test
___/# time=[0-9.]+(ms)?/~~~
node-tap-11.0.0/test-legacy/throw-after-end.js 0000664 0000000 0000000 00000000574 13206406237 0021076 0 ustar 00root root 0000000 0000000 var t = require('../')
var Test = t.Test
var tt
var out = ''
tt = new Test({ bail: false })
tt.name = 'two'
tt.on('data', function (c) {
out += c
})
tt.test('child', function (tt) {
tt.threw(new Error('whoops'))
tt.end()
})
tt.end()
t.match(out, '\n not ok 1 - whoops\n')
t.match(out, '\n tt.threw(new Error(\'whoops\'))\n')
t.match(out, '\nnot ok 1 - child')
node-tap-11.0.0/test-legacy/throws-arg-ordering.js 0000664 0000000 0000000 00000002441 13206406237 0021767 0 ustar 00root root 0000000 0000000 var t = require('../')
var wanted = [
Error,
{ message: 'hello' },
new Error('hello'),
TypeError,
TypeError('hello'),
new TypeError('hello'),
new Error('hello'),
{ code: 123, syscall: 'hi' },
/[g-i]ell.$/
]
var extra = [
{ skip: false },
{},
null
]
var message = [
'the thing throws',
null,
''
]
function thrower () {
var er = new TypeError('hello')
er.code = 123
er.syscall = 'hi'
throw er
}
wanted.forEach(function (wanted) {
extra.forEach(function (extra) {
message.forEach(function (message) {
// The wanted error object always has to come before the
// 'extra', or else it'll think that you want an error
// matching something like {skip:blah...}
// Any other ordering should work fine tho.
var a = [ thrower, wanted, extra, message ]
t.throws(a[0], a[1], a[2], a[3])
t.throws(a[0], a[1], a[3], a[2])
t.throws(a[0], a[3], a[1], a[2])
t.throws(a[1], a[0], a[2], a[3])
t.throws(a[1], a[0], a[3], a[2])
t.throws(a[1], a[2], a[0], a[3])
t.throws(a[1], a[2], a[3], a[0])
t.throws(a[1], a[3], a[0], a[2])
t.throws(a[1], a[3], a[2], a[0])
t.throws(a[3], a[1], a[2], a[0])
t.throws(a[3], a[1], a[0], a[2])
t.throws(a[3], a[0], a[1], a[2])
})
})
})
t.end()
node-tap-11.0.0/test/ 0000775 0000000 0000000 00000000000 13206406237 0014262 5 ustar 00root root 0000000 0000000 node-tap-11.0.0/test/base.js 0000664 0000000 0000000 00000012607 13206406237 0015540 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const Base = require('../lib/base.js')
t.test('basic base', t => {
const b = new Base()
t.ok(b.passing())
b.parser.end('TAP version 13\nok\n1..1\n')
b.setEncoding('utf8')
t.equal(b.read(), 'TAP version 13\nok\n1..1\n')
t.end()
})
t.test('skip + debug', t => {
const b = new Base({ skip: true, debug: true, name: 'name' })
const error = console.error
t.teardown(() => console.error = error)
let output
console.error = msg => output = msg
t.equal(b.main, Base.prototype.main)
t.notEqual(b.debug, Base.prototype.debug)
b.debug('hello', { world: '420' })
console.error = error
t.match(output.trim(), /^TAP [0-9]+ name: hello \{ world: '420' \}$/)
t.test('call main', t => b.main(t.end))
t.end()
})
t.test('name with carriage return', t => {
const b = new Base({ name: 'foo\nbar', buffered: true })
t.equal(b.name, 'foo bar')
b.parser.write('TAP version 13\nok\n1..1\n')
b.setEncoding('utf8')
t.equal(b.read(), null)
t.equal(b.output, 'TAP version 13\nok\n1..1\n')
t.end()
})
t.test('timeouts', t => {
const b = new Base()
t.equal(b.timer, null)
t.equal(b.time, null)
t.equal(b.hrtime, null)
t.equal(b.start, 0)
b.setTimeout(1)
const hr = b.hrtime
t.ok(b.timer)
b.setTimeout(2)
t.equal(b.hrtime, hr, 'do not reset hrtime on subsequent timeout call')
b.setTimeout(0)
t.equal(b.timer, null)
b.setTimeout(1)
// process will end otherwise, because timer is unrefed
setTimeout(_ => _, 10)
return new Promise(resolve => {
b.on('timeout', _ => {
t.notOk(b.parser.ok)
resolve()
})
})
})
t.test('bailout', t => {
t.plan(4)
const b1 = new Base()
b1.on('bailout', reason => t.equal(reason, 'fire'))
const b2 = new Base()
b2.on('bailout', reason => t.equal(reason, ''))
b1.parser.write('TAP version 13\nBail out! fire\n')
b2.parser.write('TAP version 13\nBail out!\n')
t.equal(b1.bailedOut, 'fire')
t.equal(b2.bailedOut, true)
})
t.test('throwing stuff', t => {
const util = require('util')
const sign = {
name: 'ace',
at: {
line: Number,
column: Number,
file: 'test/base.js'
},
stack: String,
test: 'ace'
}
t.test('domain error', t => {
const b = new Base({ name: 'ace', buffered: true })
b.domain.emit('error', new Error('this is fine'))
t.notOk(b.parser.ok)
t.end()
})
t.test('calling .threw', t => {
const b = new Base({ name: 'ace' })
const result = b.threw(new Error('this is fine'))
t.match(result, sign)
t.notOk(b.parser.ok)
t.end()
})
const c = new Base()
c.parser.end('TAP version 13\nok\n1..1\n')
t.match(c.results, {
ok: true,
count: 1,
pass: 1,
fail: 0,
bailout: false,
todo: 0,
skip: 0,
plan: {
start: 1,
end: 1,
skipAll: false,
skipReason: '',
comment: ''
},
failures: []
})
const ce = console.error
const logs = []
const expect = []
console.error = function () {
const message = util.format.apply(util, arguments)
logs.push(message)
}
expect.push(
'Error: ok c',
/^ at /,
'{}'
)
c.threw(new Error('ok c'))
expect.push('{ not: \'really an error\' }')
c.threw({ not: 'really an error' })
expect.push(
'RangeError:',
/^ at /,
'{ type: \'RangeError\' }'
)
c.threw(new RangeError())
expect.push(
'Error: ',
/^ at /,
'{ foo: \'bar\' }'
)
const namelessOne = new TypeError()
Object.defineProperty(namelessOne, 'name', { value: undefined })
namelessOne.foo = 'bar'
c.threw(namelessOne)
const d = new Base({ name: 'duh' })
d.parent = c
d.parser.end('TAP version 13\nok\n1..1\n')
expect.push(
'ReferenceError: get it?',
/^ at /,
'{ name: \'duh\', type: \'ReferenceError\', test: \'duh\' }'
)
d.threw(new ReferenceError('get it?'))
console.error = ce
t.match(logs, expect)
t.end()
})
t.test('inspect', t => {
const util = require('util')
const b = new Base({ name: 'ace', exitCode: 999 })
const ins = util.inspect(b)
t.match(ins, /^Base ./)
t.match(ins, 'exitCode: 999')
t.match(ins, 'buffered: false')
t.match(ins, 'todo: false')
t.match(ins, 'skip: false')
t.match(ins, 'only: false')
t.match(ins, 'buffered: false')
t.end()
})
t.test('oncomplete', t => {
const cases = [
['TAP version 13\nok\n1..1\n', {}, {
ok: true,
count: 1,
pass: 1,
fail: 0,
bailout: false,
todo: 0,
skip: 0,
plan: {
start: 1,
end: 1
}
}],
['TAP version 13\npragma +strict\nwitaf\nok\n1..1\n', {}, {
ok: false,
count: 1,
pass: 1,
fail: 1,
bailout: false,
todo: 0,
skip: 0,
plan: {
start: 1,
end: 1
},
failures: [
{ tapError: 'Non-TAP data encountered in strict mode',
data: 'witaf\n' }
]
}],
['TAP version 13\n1..0\n', { results: { foo: 'bar' }}, {
foo: 'bar',
plan: {
start: 1,
end: 0
}
}],
['TAP version 13\n1..1\nok\n', { timeout: 999 }, {
time: Number
}]
]
return Promise.all(cases.map(c => t.resolveMatch(new Promise(done => {
const b = new Base(c[1])
b.on('complete', results => results.time = b.time)
b.on('end', _ => done(b.results))
if (c[1].results)
b.results = c[1].results
if (c[1].timeout)
b.setTimeout(c[1].timeout)
b.parser.end(c[0])
}), c[2])))
})
node-tap-11.0.0/test/clean-stacks.js 0000664 0000000 0000000 00000003531 13206406237 0017172 0 ustar 00root root 0000000 0000000 'use strict'
// Just a utility to clean up the snapshots for output tests
const yaml = require('js-yaml')
module.exports = out => out
// sort keys in yaml blocks
.replace(/\n( *)---\n((\1.*\n)*)\1\.\.\.\n/g, ($0, $1, $2) => {
let o
try {
o = yaml.safeLoad($2)
} catch (er) {
return $0
}
const out = Object.keys(o).sort().reduce((s, k) => {
if (k === 'requests' || k === 'handles')
o[k] = o[k].map(r => ({ type: r.type }))
s[k] = o[k]
return s
}, {})
return '\n' + $1 + '---\n' + $1 +
yaml.safeDump(out).trim().split('\n').join('\n' + $1)
+ '\n' + $1 + '...\n'
})
// remove time details
.replace(/ # time=[0-9\.]+m?s( \{.*)?\n/g, ' # {time}$1\n')
.replace(/\n# time=.*/g, '\n# {time}')
// debug output
.replace(/(\n|^)TAP ([0-9]+) /g, '$1TAP {pid} ')
// stacks are always changing
.replace(/\n(( {2})+)stack: \|-?\n((\1 .*).*\n)+/gm,
'\n$1stack: |\n$1 {STACK}\n')
.replace(/\n(( {2})+)stack: \>-?\n((\1 .*).*\n(\1\n)?)+/gm,
'\n$1stack: |\n$1 {STACK}\n')
.replace(/(?:\n|^)([a-zA-Z]*Error): (.*)\n(( at .*\n)*)+/gm,
'\n$1: $2\n {STACK}\n')
.replace(/:[0-9]+:[0-9]+(\)?\n)/g, '#:#$1')
.replace(/(line|column): [0-9]+/g, '$1: #')
// type and function change often between node/v8 versions
.replace(/\n( +)function: .*(\n\1 .*)*\n/g, '\n')
.replace(/\n( +)method: .*(\n\1 .*)*\n/g, '\n')
.replace(/\n( +)type: .*\n/g, '\n')
// timeout values are different when coverage is present
.replace(/\n( *)timeout: (30000|240000)(\n|$)/g, '\n$1timeout: {default}$3')
// fix references to cwd
.split(process.cwd()).join('{CWD}')
.split(require('path').resolve(__dirname, '..')).join('{TAPDIR}')
.split(process.execPath).join('{NODE}')
// nothing to see here
if (module === require.main)
console.log('TAP version 13\n1..1\nok - 1\n')
node-tap-11.0.0/test/clean-yaml-object.js 0000664 0000000 0000000 00000002456 13206406237 0020115 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const cyo = require('../lib/clean-yaml-object.js')
const Domain = require('domain').Domain
const dom = new Domain()
dom.whosagooddomain = 'yes you are a good dog'
const cases = [
[{
domain: { some: 'object' },
stack: 'this\nis\na\nstack\n',
at: {
file: __filename,
line: 2,
column: 4
},
foo: {
domain: dom,
todo: 'maybe',
time: 'hours',
_tapChild: 'blerg'
},
_tapChild: 'asdfasdf'
}, {
stack: 'this\nis\na\nstack\n',
at: {
file: __filename,
line: 2,
column: 4
},
source: 'const t = require(\'../\')\n',
foo: {
domain: { whosagooddomain: null },
todo: 'maybe',
time: 'hours',
_tapChild: 'blerg'
},
_tapChild: null
}],
[{
at: {
file: require.resolve('../lib/clean-yaml-object.js')
}
}, { at: null }],
[{
stack: ' at Foo.bar (/dev/fire/pwn:420:69)\n'
}, {
stack: ' at Foo.bar (/dev/fire/pwn:420:69)\n',
at: {
line: 420,
column: 69,
file: '/dev/fire/pwn',
function: 'Foo.bar'
}
}],
[{
at: {
file: __filename,
line: 696969,
column: 420420
}
}, { source: null }],
[{ stack: '' }, { stack: null }]
]
cases.forEach(c => t.match(cyo(c[0]), c[1]))
node-tap-11.0.0/test/diags.js 0000664 0000000 0000000 00000000252 13206406237 0015706 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const diags = require('../lib/diags.js')
t.match(diags({ todo: true }), '')
t.match(diags({ foo: 1 }), ' ---\n foo: 1\n ...\n')
node-tap-11.0.0/test/extra-from-error.js 0000664 0000000 0000000 00000002064 13206406237 0020035 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const extraFromError = require('../lib/extra-from-error.js')
const cases = [
[new Error('ok'), null, null, {
at: { file: 'test/extra-from-error.js' },
message: null
}],
[new Error('ok'), { foo: 'bar' }, null, {
at: { file: 'test/extra-from-error.js' },
foo: 'bar'
}],
[new Error('ok'), null, { foo: 'bar', tapChild: 1234 }, {
at: { file: 'test/extra-from-error.js' },
foo: 'bar',
tapChild: null
}],
[new Error('ok'), { foo: 'bar' }, { foo: 'XXX', tapChild: 1234 }, {
at: { file: 'test/extra-from-error.js' },
foo: 'bar',
tapChild: null
}],
['not an error', null, null, { error: 'not an error' }],
[new Error(''), null, null, {
at: { file: 'test/extra-from-error.js' },
message: null
}],
[{stack: null, foo: 'baz', message: 'this is fine'}, null, null, {
stack: null,
foo: 'baz',
message: null
}],
[{ name: 'asdf' }, null, null, {
type: 'asdf',
message: null
}]
]
cases.forEach(c => t.match(extraFromError(c[0], c[1], c[2]), c[3]))
node-tap-11.0.0/test/mocha.js 0000664 0000000 0000000 00000006351 13206406237 0015714 0 ustar 00root root 0000000 0000000 'use strict'
const mocha = require('../lib/mocha.js')
const assert = require('assert')
mocha.describe('globals', () => {
let beforeEaches = 0
mocha.beforeEach(() => beforeEaches++)
mocha.beforeEach(cb => setTimeout(cb))
mocha.beforeEach(() => new Promise(r => r()))
let afterEaches = 0
mocha.afterEach(() => afterEaches++)
// test that afterEach is happening correct number
// of times.
let eachExpect = 0
mocha.afterEach(() => new Promise(res => {
eachExpect ++
assert.equal(beforeEaches, eachExpect, 'before')
assert.equal(afterEaches, eachExpect, 'after')
res()
}))
mocha.it('has no describe', () =>
assert.equal(global.describe, undefined))
mocha.it('is ok running deglobal() first', () => {
mocha.deglobal()
assert.equal(global.describe, undefined)
})
mocha.it('has describe after call', () => {
mocha.global()
mocha.global()
assert.equal(global.describe, mocha.describe)
})
mocha.it('has no describe after deglobal', () => {
deglobal()
assert.equal(global.describe, undefined)
})
mocha.it('escape to tap', function () {
const t = this
t.test('should not get a beforeEach', t =>
t.test('or an after each', t => {
t.pass('this is fine')
t.end()
}))
})
// at this point, beforeEach has been called
// 1 more time than afterEach
mocha.it('called beforeEach/afterEach', () =>
new Promise((resolve) => {
assert.equal(beforeEaches, eachExpect + 1)
assert.equal(afterEaches, eachExpect)
resolve()
}))
})
assert.throws(_ => mocha.after(),
'cannot call "after" outside of describe()')
assert.throws(_ => mocha.before(),
'cannot call "before" outside of describe()')
let calledAfter = false
let calledBefore = false
mocha.describe(function after_and_before () {
mocha.before((cb) => {
assert.equal(calledBefore, false)
calledBefore = true
setTimeout(cb)
})
mocha.before('named before', () => new Promise(r => {
assert.equal(calledBefore, true)
r()
}))
mocha.after(() => {
assert.equal(calledAfter, false)
calledAfter = true
})
mocha.after('named after', () => {
assert.equal(calledAfter, true)
})
mocha.after(function named_after () {
assert.equal(calledAfter, true)
})
mocha.it(function this_is_fine () {})
mocha.it(() => {})
mocha.it(cb => cb())
})
mocha.describe('after after', function () {
this.test.plan(1)
mocha.it('should have called after fn', () =>
assert.equal(calledAfter, true))
})
mocha.describe('todo, skip, and failure', () => {
let calledTodoFn = false
let calledSkipFn = false
const it = mocha.it
mocha.describe('expect todo and skip', function () {
/* istanbul ignore next */
it.todo('expected todo', () => calledTodoFn = true)
/* istanbul ignore next */
it.skip('expected skip', () => calledSkipFn = true)
}, { silent: true })
it('expected fail from cb(er)', cb => {
cb(new Error('expected failure'))
}, { expectFail: true })
it('did not call skip/todo functions', () => {
assert.equal(calledTodoFn, false)
assert.equal(calledSkipFn, false)
})
})
mocha.describe('expected before failure', () =>
mocha.before('expect failure', (cb) =>
cb(new Error('expected')), { expectFail : true }))
node-tap-11.0.0/test/obj-to-yaml.js 0000664 0000000 0000000 00000000250 13206406237 0016747 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const oty = require('../lib/obj-to-yaml.js')
t.match(oty({ todo: true }), '')
t.match(oty({ foo: 1 }), ' ---\n foo: 1\n ...')
node-tap-11.0.0/test/parse-test-args.js 0000664 0000000 0000000 00000001716 13206406237 0017646 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const pta = require('../lib/parse-test-args.js')
const fn = _ => _
function named () {}
const todoCb = pta().cb
// call the funcs so that they're covered also
named()
fn()
const cases = [
['foo', {}, fn, null, { name: 'foo', cb: fn }],
[undefined, {}, fn, null, { cb: fn }],
[{}, named, undefined, undefined, { cb: named, name: 'named' }],
[{}, named, false, undefined, { cb: named, name: 'named' }],
[named, false, undefined, null, { cb: named, name: 'named' }],
['foo', undefined, undefined, null, { name: 'foo', todo: true, cb: todoCb }],
[{name: 'foo'}, fn, undefined, null, { name: 'foo', cb: fn }],
[undefined, undefined, undefined, 'def', { name: 'def', todo: true, cb: todoCb }]
]
cases.forEach(c => t.match(pta(c[0], c[1], c[2], c[3]), c[4]))
t.throws(_ => pta(null),
new TypeError('unknown argument passed to parseTestArgs: null'))
t.throws(_ => pta().cb(), new Error('callback called for TODO test'))
node-tap-11.0.0/test/point.js 0000664 0000000 0000000 00000003514 13206406237 0015754 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const TestPoint = require('../lib/point.js')
t.throws(_ => new TestPoint(99),
new TypeError('ok must be boolean'))
t.throws(_ => new TestPoint(true, Math),
new TypeError('message must be a string'))
const cases = [
[true, 'this is fine', null, {
ok: 'ok ',
message: ' - this is fine\n'
}],
[false, 'this is fine', null, {
ok: 'not ok ',
message: ' - this is fine\n'
}],
[true, ' ', null, {
ok: 'ok ',
message: '\n'
}],
[false, '\n\r\t\n', null, {
ok: 'not ok ',
message: '\n'
}],
[true, 'this is fine ', { skip: true }, {
ok: 'ok ',
message: ' - this is fine # SKIP\n'
}],
[true, 'this is fine', { skip: 'nope' }, {
ok: 'ok ',
message: ' - this is fine # SKIP nope\n'
}],
[true, 'this is fine', { todo: true }, {
ok: 'ok ',
message: ' - this is fine # TODO\n'
}],
[true, 'this is fine', { todo: 'later' }, {
ok: 'ok ',
message: ' - this is fine # TODO later\n'
}],
[true, 'time waits for no one', { time: 12345 }, {
ok: 'ok ',
message: 'time waits for no one # time=12345ms\n'
}],
[true, 'fine', { foo: 'bar', diagnostic: true }, {
ok: 'ok ',
message: ' - fine\n ---\n foo: bar\n ...\n\n'
}],
[true, '', { foo: 'bar', diagnostic: true }, {
ok: 'ok ',
message: '\n ---\n foo: bar\n ...\n\n'
}],
[false, 'x\ny\r\nz', {}, {
ok: 'not ok ',
message: 'x y z\n'
}],
[true, '', {
tapChildBuffer: 'child output',
diagnostic: true,
fluffer: 'nutter'
}, {
ok: 'ok ',
message: '\n ---\n fluffer: nutter\n ...\n{\nchild output\n}\n'
}],
[true, '', {
tapChildBuffer: 'child output',
fluffer: 'nutter'
}, {
ok: 'ok ',
message: ' {\nchild output\n}\n'
}],
]
cases.forEach(c => t.match(new TestPoint(c[0], c[1], c[2]), c[3]))
node-tap-11.0.0/test/run.js 0000664 0000000 0000000 00000035163 13206406237 0015434 0 ustar 00root root 0000000 0000000 'use strict'
const fs = require('fs')
const mkdirp = require('mkdirp')
const rimraf = require('rimraf')
// const rimraf = { sync: () => {} }
const path = require('path')
const cp = require('child_process')
const execFile = cp.execFile
const node = process.execPath
const bin = require.resolve('../bin/run.js')
const tap = JSON.stringify(path.join(__dirname, '..') + '/')
const t = require('../')
const dir = path.join(__dirname, 'cli-tests')
mkdirp.sync(dir)
t.teardown(() => rimraf.sync(dir))
// set this forcibly so it doesn't interfere with other tests.
delete process.env.TAP_DIAG
delete process.env.TAP_BAIL
delete process.env.TAP_COLORS
delete process.env.TAP_TIMEOUT
const clean = require('./clean-stacks.js')
const run = (args, options, cb) => {
if (options && options.env)
options.env = Object.keys(process.env).reduce((env, k) => {
if (env[k] === undefined)
env[k] = process.env[k]
return env
}, options.env)
return execFile(node, [bin].concat(args), options, cb)
}
const tmpfile = (t, filename, content) => {
const parts = filename.split('/')
// make any necessary dirs
if (parts.length > 1)
mkdirp.sync(path.join(dir, parts.slice(0, -1).join('/')))
if (t.tmpfiles)
t.tmpfiles.push(path.join(dir, parts[0]))
else {
t.tmpfiles = [path.join(dir, parts[0])]
t.teardown(() => t.tmpfiles.forEach(f => rimraf.sync(f)))
}
filename = path.join(dir, filename)
fs.writeFileSync(filename, content)
return path.relative('', filename)
}
t.test('usage and other basics', t => {
t.test('no args', t => {
run([], { env: { _TAP_IS_TTY: '1' } }, (er, o, e) => {
t.match(er, {
signal: null,
code: 1,
killed: false
})
t.match(e, /^Usage:/)
t.end()
})
})
t.test('--help', t => {
run(['--help'], null, (er, o, e) => {
t.equal(er, null)
t.match(o, /^Usage:/)
t.end()
})
})
t.test('--nyc-help', t => {
run(['--nyc-help'], null, (er, o, e) => {
t.equal(er, null)
t.match(o, /\nOptions:\n/)
t.end()
})
})
t.test('--version', t => {
run(['--version'], null, (er, o, e) => {
t.equal(er, null)
t.equal(o.trim(), require('../package.json').version)
t.end()
})
})
t.test('--nyc-version', t => {
run(['--nyc-version'], null, (er, o, e) => {
t.equal(er, null)
t.equal(o.trim(), require('nyc/package.json').version)
t.end()
})
})
t.end()
})
t.test('basic', t => {
const ok = tmpfile(t, 'ok.js', `require(${tap}).pass('this is fine')`)
run(['-Cbt0', '--', 'doesnt exist', ok], null, (err, stdout, stderr) => {
t.matchSnapshot(clean(stdout), 'ok.js output')
t.end()
})
})
t.test('dump config stuff', t => {
t.test('shotgun a bunch of option parsing junk', t => {
run([
'--dump-config', '-J', '--jobs', '4',
'--no-browser', '--no-coverage-report', '--coverage-report', 'json',
'--coverage-report=html', '--no-cov', '--cov', '--save', 'foo.txt',
'--reporter=spec', '--gc', '--strict', '--debug', '--debug-brk',
'--harmony', '--node-arg=xyz', '--check-coverage', '--test-arg=xyz',
'--test-arg', 'abc', '--100', '--branches=99', '--lines', '100',
'--color', '--no-color', '--output-file=out.txt', '--no-timeout',
'--timeout', '99', '--invert', '--no-invert', '--grep', 'x',
'--grep=/y/i', '--bail', '--no-bail', '--only', '-R', 'spec',
'--node-arg', 'abc', '--nyc-arg', 'abc', '-o', 'out.txt'
], { env: {
TAP: '0',
TAP_BAIL: '0',
_TAP_IS_TTY: '1'
}}, (er, o, e) => {
t.equal(er, null)
t.match(JSON.parse(o), {
nodeArgs:
[ '--expose-gc',
'--use_strict',
'--debug',
'--debug-brk',
'--harmony',
'xyz',
'abc' ],
nycArgs: [ 'abc' ],
testArgs: [ 'xyz', 'abc' ],
timeout: 99,
color: false,
reporter: 'spec',
files: [],
grep: [ Object, Object ],
grepInvert: false,
bail: false,
saveFile: 'foo.txt',
pipeToService: Boolean,
coverageReport: 'lcov',
browser: false,
coverage: true,
checkCoverage: true,
branches: 99,
functions: 100,
lines: 100,
statements: 100,
jobs: 4,
outputFile: 'out.txt',
rcFile: /\.taprc$/,
only: true })
t.end()
})
})
t.test('short options as well as short flags', t => {
run(['--dump-config','-j2','-Cb','-t=0' ], { env: {
TAP: '0'
}}, (er, o, e) => {
t.equal(er, null)
t.match(JSON.parse(o), {
bail: true,
color: false,
reporter: 'tap',
jobs: 2,
timeout: 0
})
t.end()
})
})
t.test('unknown short opt', t => {
run(['-bCx'], null, (er, o, e) => {
t.match(er, { code: 1 })
t.match(e, 'Unknown argument: -x')
t.end()
})
})
t.test('undefined trailing value opts', t => {
const opts = [
'--node-arg',
'--test-arg',
'--nyc-arg',
'--output-file',
'--grep'
]
const expect = {
nodeArgs: [],
testArgs: [],
nycArgs: [],
outputFile: null,
grep: []
}
t.plan(opts.length)
opts.forEach(opt => t.test(opt, t => run([
'--dump-config', opt
], null, (er, o, e) => {
t.equal(er, null)
t.match(JSON.parse(o), expect)
t.end()
})))
})
t.test('good rc file', t => {
const rc = tmpfile(t, 'taprc', `
reporter: spec
jobs: 3
`)
run(['--dump-config'], { env: {
TAP_RCFILE: rc,
TAP: 0
}}, (er, o, e) => {
t.equal(er, null)
t.match(JSON.parse(o), {
reporter: 'spec',
jobs: 3
})
t.end()
})
})
t.test('empty rc file', t => {
const rc = tmpfile(t, 'taprc', '')
run(['--dump-config', '-c'], { env: {
TAP_RCFILE: rc,
TAP: '0',
_TAP_IS_TTY: '1',
TAP_COLORS: '1'
}}, (er, o, e) => {
t.equal(er, null)
t.match(JSON.parse(o), {
reporter: 'classic',
jobs: 1
})
t.end()
})
})
t.end()
})
t.test('stdin', t => {
const tapcode = 'TAP version 13\n1..1\nok\n'
t.test('with output file', t => {
const c = run(['-', '-c', '-Rspec', '-ofoo.txt', '--cov'], { env: {
_TAP_IS_TTY: '1',
TAP: '0'
}}, (er, o, e) => {
t.equal(er, null)
t.equal(e, 'Coverage disabled because stdin cannot be instrumented\n')
t.match(o, '✓')
t.equal(fs.readFileSync('foo.txt', 'utf8'), tapcode)
fs.unlinkSync('foo.txt')
t.end()
})
c.stdin.end(tapcode)
})
t.test('no output file', t => {
const c = run(['--only', '-gx', '-iC', '-Rclassic'], { env: {
_TAP_IS_TTY: '1',
TAP: '0'
}}, (er, o, e) => {
t.equal(er, null)
t.match(e, /^Reading TAP data from stdin \(use "-" argument to suppress\)\n/)
t.match(o, /total \.+ 1\/1/)
t.throws(() => fs.statSync('foo.txt'))
t.end()
})
c.stdin.end(tapcode)
})
t.test('with file', t => {
const foo = tmpfile(t, 'foo.test.js', `
'use strict'
require(${tap}).test('child', t => {
t.pass('this is fine')
t.end()
})
`)
const args = ['-', foo, '-CRclassic', '-ofoo.txt']
const c = run(args, { env: { TAP: 0, TAP_BUFFER: 1 }}, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(fs.readFileSync('foo.txt', 'utf8')))
t.match(o, /foo.test.js \.+ 1\/1.*\n\/dev\/stdin \.+ 1\/1\n/)
fs.unlinkSync('foo.txt')
t.end()
})
c.stdin.end(tapcode)
})
t.end()
})
t.test('epipe on stdout', t => {
const c = run(['-', '-C'], { stdio: 'pipe' }, (er, o, e) => {
t.equal(er, null)
t.equal(o, 'TAP version 13\n1..9\nok\n')
t.end()
})
c.stdin.write('TAP version 13\n1..9\nok\n')
c.stdout.on('data', chunk => {
c.stdout.destroy()
c.stdin.write('ok\nok\nok\nok\n')
c.stdin.write('ok\nok\nok\nok\n')
})
})
t.test('unknown arg throws', t => {
run(['--blerg'], null, (er, o, e) => {
t.match(er, { code: 1 })
t.match(e, 'Unknown argument: --blerg')
t.end()
})
})
t.test('coverage', t => {
const cwd = process.cwd()
process.chdir(dir)
t.teardown(() => process.chdir(cwd))
const ok = tmpfile(t, 'ok.js', `'use strict'
module.exports = (x, y) => {
if (x)
return y || x
else
return y
}`)
tmpfile(t, 'package.json', '{"name":"just a placeholder"}')
const t1 = tmpfile(t, '1.test.js', `'use strict'
const ok = require('./ok.js')
require(${tap}).equal(ok(1), 1)`)
const t2 = tmpfile(t, '2.test.js', `'use strict'
const ok = require('./ok.js')
require(${tap}).equal(ok(1, 2), 2)`)
const t3 = tmpfile(t, '3.test.js', `'use strict'
const ok = require('./ok.js')
require(${tap}).equal(ok(0, 3), 3)`)
// escape from new york
const esc = tmpfile(t, 'runtest.sh',
`"${node}" "${bin}" "\$@" --cov --nyc-arg=--include="${ok}"
`)
const escape = (args, options, cb) => {
options = options || {}
const env = Object.keys(process.env).filter(
k => !/TAP|NYC|SW_ORIG/.test(k)
).reduce((env, k) => {
if (!env.hasOwnProperty(k))
env[k] = process.env[k]
return env
}, options.env || {})
options.env = env
return execFile('bash', [esc].concat(args), options, cb)
}
t.test('--100', t => {
t.test('pass', t => {
escape([t1, t2, t3, '--100'], null, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(o), '100 pass')
t.end()
})
})
t.test('fail', t => {
escape([t1, t2, '--100'], null, (er, o, e) => {
t.match(er, { code: 1 })
t.matchSnapshot(clean(o), '100 fail')
t.end()
})
})
t.end()
})
t.test('report only', t => {
escape(['--coverage-report=text-lcov'], null, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(o), 'lcov output')
t.end()
})
})
t.test('report with checks', t => {
escape(['--100', '--coverage-report=text-lcov'], null, (er, o, e) => {
t.match(er, { code: 1 })
t.matchSnapshot(clean(o), 'lcov output and 100 check')
t.end()
})
})
t.test('pipe to service', t => {
escape(['--coverage-report=text-lcov'], { env: {
COVERAGE_SERVICE_TEST: 'true'
}}, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(o), 'piped to coverage service cat')
t.end()
})
})
t.end()
})
t.test('save file', t => {
const xy1 = tmpfile(t, 'x/y/1.js', `'use strict'
const t = require(${tap})
t.pass('one')
`)
const ab2 = tmpfile(t, 'a/b/2.js', `'use strict'
const t = require(${tap})
t.pass('2')
`)
const abf1 = tmpfile(t, 'a/b/f1.js', `'use strict'
require(${tap}).fail('a/b')
`)
const abf2 = tmpfile(t, 'z.js', `'use strict'
require(${tap}).fail('c/d')
`)
const savefile = path.resolve(tmpfile(t, 'fails.txt', ''))
t.test('with bailout, should save all untested', t => {
run(['a', 'x', 'z.js', '-s', savefile, '-b'], { cwd: dir }, (er, o, e) => {
t.match(er, { code: 1 })
t.matchSnapshot(clean(o), 'stdout')
t.equal(e, '')
t.matchSnapshot(clean(fs.readFileSync(savefile, 'utf8')), 'savefile')
t.end()
})
})
t.test('without bailout, run untested, save failures', t => {
run(['a', 'x', 'z.js', '-s', savefile], { cwd: dir }, (er, o, e) => {
t.match(er, { code: 1 })
t.matchSnapshot(clean(o), 'stdout')
t.equal(e, '')
t.matchSnapshot(clean(fs.readFileSync(savefile, 'utf8')), 'savefile')
t.end()
})
})
t.test('make fails pass', t => {
fs.writeFileSync(abf1, `'use strict'
require(${tap}).pass('fine now')
`)
fs.writeFileSync(abf2, `'use strict'
require(${tap}).pass('fine now too')
`)
t.end()
})
t.test('pass, empty save file', t => {
run(['a', 'x', 'z.js', '-s', savefile], { cwd: dir }, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(o), 'stdout')
t.equal(e, '')
t.throws(() => fs.statSync(savefile), 'save file is gone')
t.end()
})
})
t.test('empty save file, run all tests', t => {
run(['a', 'x', 'z.js', '-s', savefile], { cwd: dir }, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(o), 'stdout')
t.equal(e, '')
t.throws(() => fs.statSync(savefile), 'save file is gone')
t.end()
})
})
t.end()
})
t.test('parallel', t => {
// should see start, start, end, end, in the output
tmpfile(t, 'p/y/1.js', `'use strict'
console.error('start')
setTimeout(() => console.error('end'), 100)
const t = require(${tap})
t.pass('one')
`)
tmpfile(t, 'p/y/2.js', `'use strict'
console.error('start')
setTimeout(() => console.error('end'), 100)
const t = require(${tap})
t.pass('2')
`)
tmpfile(t, 'p/tap-parallel-not-ok', '')
tmpfile(t, 'p/y/tap-parallel-ok', '')
tmpfile(t, 'q/b/f1.js', `'use strict'
require(${tap}).pass('a/b')
setTimeout(() => console.error('f1'), 100)
`)
tmpfile(t, 'q/b/f2.js', `'use strict'
require(${tap}).pass('c/d')
console.error('f2')
`)
tmpfile(t, 'q/tap-parallel-ok', '')
tmpfile(t, 'q/b/tap-parallel-not-ok', '')
tmpfile(t, 'r/y/1.js', `'use strict'
console.error('ry1')
setTimeout(() => console.error('ry1'), 100)
const t = require(${tap})
t.pass('one')
`)
tmpfile(t, 'r/y/2.js', `'use strict'
console.error('ry2')
setTimeout(() => console.error('ry2'), 100)
const t = require(${tap})
t.pass('2')
`)
tmpfile(t, 'r/tap-parallel-not-ok', '')
tmpfile(t, 'z/y/1.js', `'use strict'
console.error('start')
setTimeout(() => console.error('end'), 100)
const t = require(${tap})
t.pass('one')
`)
tmpfile(t, 'z/y/2.js', `'use strict'
console.error('start')
setTimeout(() => console.error('end'), 100)
const t = require(${tap})
t.pass('2')
`)
run(['p/y/*.js', 'q', 'r/y', 'z', '-j2'], { cwd: dir }, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(o), 'output')
t.equal(e,
'start\nstart\nend\nend\n' +
'ry1\nry1\nry2\nry2\n' +
'f1\nf2\n' +
'start\nstart\nend\nend\n'
)
t.end()
})
})
t.test('executables', {
todo: process.platform === 'win32' ?
'port the shell scripts to equivalent CMD files' : false
}, t => {
const ok = tmpfile(t, 'exe/ok.sh', `#!/bin/sh
echo 1..1
echo ok 1 File with executable bit should be executed
`)
fs.chmodSync(ok, 0o755)
const notok = tmpfile(t, 'exe/notok.sh', `!#/bin/sh
echo 1..1
echo not ok 1 File without executable bit should not be run
exit 1
`)
fs.chmodSync(notok, 0o644)
run(['exe', '-C'], { cwd: dir }, (er, o, e) => {
t.equal(er, null)
t.matchSnapshot(clean(o))
t.equal(e, '')
t.end()
})
})
node-tap-11.0.0/test/snapshot.js 0000664 0000000 0000000 00000002464 13206406237 0016465 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const Snapshot = require('../lib/snapshot.js')
const rimraf = require('rimraf')
const mkdirp = require('mkdirp')
const path = require('path')
const dir = path.resolve(__dirname, 'snapshot')
const fs = require('fs')
t.test('cleanup first', t => {
rimraf.sync(dir)
mkdirp.sync(dir)
process.chdir(dir)
t.end()
})
t.test('actual test', t => {
t.comment('not using subtests, because snapshots are per-test')
t.test('checking snapshot without creating throws', t => {
const s = new Snapshot(t)
t.throws(_ => s.read('asdf', 'asdf'))
t.end()
})
const s = new Snapshot(t)
t.comment('create some snapshots')
s.snap(fs.readFileSync(__filename, 'utf8'), 'this file')
s.snap('this is fine', 'a statement of acceptance')
s.save()
t.comment('now check that the snapshots are valid')
const ss = new Snapshot(t)
t.equal(fs.readFileSync(__filename, 'utf8'), ss.read('this file'))
t.equal('this is fine', ss.read('a statement of acceptance'))
t.throws(_ => ss.read('this is not in the file'))
t.comment('saving without snapping anything removes the file')
const sss = new Snapshot(t)
sss.save()
t.throws(_ => fs.statSync(sss.file), 'file is gone')
t.end()
})
t.test('cleanup after', t => {
rimraf.sync(dir)
process.chdir(__dirname)
t.end()
})
node-tap-11.0.0/test/spawn.js 0000664 0000000 0000000 00000010354 13206406237 0015753 0 ustar 00root root 0000000 0000000 const Spawn = require('../lib/spawn.js')
const t = require('../')
const Test = t.Test
const Parser = require('tap-parser')
const node = process.execPath
const file = __filename
process.env.TAP_BAIL = ''
process.env.TAP_BUFFER = ''
const clean = require('./clean-stacks.js')
const main = () => {
t.test('basic child process', t =>
t.spawn(node, [ file, 'ok' ]))
t.test('using a plan', t =>
t.spawn(node, [ file, 'plan-ok' ]))
t.test('hard quit', t =>
t.spawn(node, [ file, 'sigself' ],
{ expectFail: true }))
t.test('failing process', t =>
t.spawn(node, [ file, 'not-ok' ],
{ expectFail: true }))
t.test('timeout', t =>
t.spawn(node, [ file, 'timeout' ], {
expectFail: true,
timeout: 1
}))
t.test('timeout KILL', t => {
const s = new Spawn({
command: node,
args: [ file, 'catch-term' ],
timeout: process.env.CI ? 2000 : 500,
buffered: true,
name: 'killa'
})
s.main(() => {
t.matchSnapshot(clean(s.output))
t.end()
})
})
t.test('skip stuff', t => {
const tt = new Test({ buffered: true, bail: false })
tt.spawn(node, [ file, 'skip' ], {
bail: true,
buffered: true
}, 'skipper')
tt.spawn(node, [ file, 'skip-reason' ])
tt.test('check it', ttt => {
t.matchSnapshot(clean(tt.output))
t.end()
tt.end()
ttt.end()
})
})
t.test('timeout before spawn is no-op', t => {
const s = new Spawn({
command: node,
args: [ file, 'timeout' ]
})
s.timeout()
t.end()
})
t.test('using spawn event', t => {
t.on('spawn', t =>
t.proc.stdin.end('TAP version 13\nok\n1..1\n'))
t.spawn('cat', [], { stdio: [ 'pipe', 'pipe', 'ignore' ] })
t.end()
})
t.test('using proc event', t => {
const s = new Spawn({
command: 'cat',
args: [],
buffered: true,
bail: false,
stdio: [ 'pipe', 'ignore', 'ignore' ]
})
s.on('process', p =>
p.stdin.end('TAP version 13\nok\n1..1\n'))
t.plan(1)
s.main(() => t.matchSnapshot(clean(s.output)))
})
t.test('failure to spawn', t => {
const s = new Spawn({
command: 'something that does not exist',
args: [],
buffered: true,
bail: false,
stdio: [0, 1, 2]
})
t.plan(1)
s.main(() => t.matchSnapshot(clean(s.output)))
})
t.test('failure to spawn even harder', t => {
const cp = require('child_process')
const spawn = cp.spawn
const poop = new Error('poop error')
cp.spawn = () => { throw poop }
t.teardown(_ => cp.spawn = spawn)
const s = new Spawn({
command: 'poop',
args: [],
buffered: true,
bail: false,
stdio: 'inherit'
})
s.main(_ => {
t.match(s.output, 'not ok 1 - poop error\n')
t.match(s.output, 'command: poop\n')
t.end()
})
})
t.throws(_ => new Spawn(),
new TypeError('no command provided'))
t.test('endAll called', t => {
t.test('call proc', t => {
const s = new Spawn({
command: node,
args: [ file, 'timeout' ],
bail: false,
buffered: true
})
s.main(_ => {
t.match(s.output, 'not ok 1 - test unfinished')
t.end()
})
setTimeout(_ => s.endAll())
})
t.test('pre-call', t => {
const s = new Spawn({
command: node,
args: [ file, 'timeout' ],
bail: false,
buffered: true
})
s.endAll()
t.match(s.output, 'not ok 1 - test unfinished')
t.end()
})
t.end()
})
}
// Ignore this because a lot of these cases involve
// using a SIGKILL before nyc can write coverage
/* istanbul ignore next */
switch (process.argv[2]) {
case 'ok':
t.pass('this is fine')
break
case 'plan-ok':
t.plan(1)
t.pass('this is fine')
setTimeout(_ => _, 200)
break
case 'sigself':
setTimeout(_ =>
process.kill(process.pid, 'SIGQUIT'), 300)
break
case 'not-ok':
process.exit(1)
break
case 'skip':
t.plan(0)
break
case 'skip-reason':
t.plan(0, 'for no raisins')
break
case 'catch-term':
process.on('SIGTERM', _ => console.log('SIGTERM'))
case 'timeout':
setTimeout(_ => _, process.env.CI ? 50000 : 5000)
break
default:
main()
}
node-tap-11.0.0/test/stack.js 0000664 0000000 0000000 00000002613 13206406237 0015727 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const path = require('path')
t.test('in tapdir, no envs', t => {
delete require.cache[require.resolve('../lib/stack.js')]
process.chdir(path.resolve(__dirname, '..'))
process.env.TAP_DEV_LONGSTACK = 0
process.env.TAP_DEV_SHORTSTACK = 0
const stack = require('../lib/stack.js').captureString()
t.match(stack, /test[\/\\]stack\.js:\w+:\w+\)\n/)
t.notMatch(stack, '\.node-spawn-wrap')
t.end()
})
t.test('in ~, no envs', t => {
delete require.cache[require.resolve('../lib/stack.js')]
process.chdir(process.env.HOME)
process.env.TAP_DEV_LONGSTACK = 0
process.env.TAP_DEV_SHORTSTACK = 0
const stack = require('../lib/stack.js').captureString()
t.equal(stack, '')
t.end()
})
t.test('in home, longstack', t => {
delete require.cache[require.resolve('../lib/stack.js')]
process.chdir(process.env.HOME)
process.env.TAP_DEV_LONGSTACK = 1
process.env.TAP_DEV_SHORTSTACK = 0
const stack = require('../lib/stack.js').captureString()
t.match(stack, /test[\/\\]stack\.js:\w+:\w+\)\n/)
t.notMatch(stack, '\.node-spawn-wrap')
t.end()
})
t.test('in tapdir, shortstack', t => {
delete require.cache[require.resolve('../lib/stack.js')]
process.chdir(path.resolve(__dirname, '..'))
process.env.TAP_DEV_LONGSTACK = 0
process.env.TAP_DEV_SHORTSTACK = 1
const stack = require('../lib/stack.js').captureString()
t.equal(stack, '')
t.end()
})
node-tap-11.0.0/test/stdin.js 0000664 0000000 0000000 00000002515 13206406237 0015744 0 ustar 00root root 0000000 0000000 const t = require('../')
const Stdin = require('../lib/stdin.js')
const MP = require('minipass')
process.env.TAP_BAIL = ''
process.env.TAP_BUFFER = ''
t.test('uses stdin if no stream provided', t => {
const s = new Stdin()
t.equal(s.stream, process.stdin)
t.equal(s.name, '/dev/stdin')
t.end()
})
t.test('basic test', t => {
const stream = new MP()
const s = new Stdin({
tapStream: stream,
name: 'foo',
buffered: true
})
t.equal(s.stream, stream)
t.equal(s.name, 'foo')
s.main(_ => {
t.match(s.results, {
ok: true,
count: 1,
pass: 1,
fail: 0,
bailout: false,
plan: {
start: 1,
end: 1,
skipAll: false
},
failures: []
})
t.end()
})
s.stream.end(`TAP version 13
1..1
ok 1 - this is fine
`)
})
t.test('failure test', t => {
const stream = new MP()
const s = new Stdin({
tapStream: stream
})
s.main(_ => {
t.match(s.results, {
ok: false,
count: 2,
pass: 1,
fail: 1,
bailout: false,
todo: 0,
skip: 0,
plan: {
start: 1,
end: 2,
skipAll: false
},
failures: [{
ok: false,
id: 2,
name: 'oops'
}]
})
t.end()
})
s.stream.write(`TAP version 13
ok 1 - this is fine
`)
s.threw(new Error('oops'))
})
node-tap-11.0.0/test/synonyms.js 0000664 0000000 0000000 00000000425 13206406237 0016520 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const synonyms = require('../lib/synonyms.js')
t.match(synonyms, {
notOk: [
'notOk',
'notok',
'not_ok',
'false',
'assertNot',
'assertnot',
'assert_not'
],
type: [ 'type', 'isa', 'isA', 'isa', 'is_a' ]
})
node-tap-11.0.0/test/tap.js 0000664 0000000 0000000 00000007521 13206406237 0015411 0 ustar 00root root 0000000 0000000 'use strict'
const node = process.execPath
const clean = require('./clean-stacks.js')
const cases = {
ok: t => t.pass('fine'),
notOk: t => t.fail('expected'),
bail: t => t.bailout('cannot proceed'),
'plan 0': t => t.plan(0, 'skip it all'),
'plan unsatisied': t => t.plan(99),
'too much': t => {
t.plan(1)
t.pass('a little')
t.pass('a lot')
},
'stdout epipe': t => {
t.pass('this is fine')
const er = new Error('fake pipe')
er.code = 'EPIPE'
process.stdout.emit('some other event')
setTimeout(() => process.stdout.emit('error', er))
},
'close even if exiting hard': t => {
process.on('exit', (code) => process.exit(code))
t.pass('make sure, really')
},
'unhandled promise': t => {
t.pass('fine, i promise')
Promise.reject(new Error('broken'))
},
'teardown event loop': t => {
t.pass('fine')
const interval = setInterval(() => {}, 10000)
t.tearDown(() => clearInterval(interval))
},
'teardown throw': t => {
t.on('teardown', () => { throw new Error('poop') })
t.pass('x')
},
'process.exitCode polyfill': t => {
Object.defineProperty(process, 'version', { value: 'v0.10.420' })
t.fail(process.version)
},
'TAP_DEBUG=1': [
() => process.env.TAP_DEBUG = '1',
t => t.comment('this is fine')
],
'NODE_DEBUG=tap': [
() => process.env.NODE_DEBUG = 'tap',
t => t.plan(0)
],
TAP_GREP: [
() => process.env.TAP_GREP = 'x\n/^y$/i',
t => {
t.test('axo', t => {
t.test('yellow', t => Promise.reject(new Error('no')))
t.test('Y', t => t.end())
return t.test('y', t => t.test('this too', t => t.end()))
})
t.test('nope', t => Promise.reject(new Error('no')))
}
],
TAP_GREP_INVERT: [
() => {
process.env.TAP_GREP = 'x\n/^y$/i'
process.env.TAP_GREP_INVERT = 1
},
t => {
t.test('yes this one', t => {
t.test('Y', t => Promise.reject(new Error('no')))
t.test('yellow', t => t.end())
return t.test('apple', t => t.test('this too', t => t.end()))
})
t.test('axo', t => Promise.reject(new Error('no')))
}
],
TAP_ONLY: [
() => process.env.TAP_ONLY = '1',
t => {
t.only('only this one', t => t.end())
t.test('not this one', t => Promise.reject(new Error('no')))
}
],
'timeout sigterm': t => {
t.pass('fine')
process.kill(process.pid, 'SIGTERM')
setTimeout(() => {}, 1000)
},
'timeout sigterm with handle': t => {
setTimeout(() => {}, 10000)
t.pass('fine')
process.kill(process.pid, 'SIGTERM')
},
'timeout sigterm many times': t => {
const fs = require('fs')
fs.readFile(__filename, (er, data) => {})
t.pass('fine')
process.kill(process.pid, 'SIGTERM')
process.kill(process.pid, 'SIGTERM')
process.kill(process.pid, 'SIGTERM')
process.kill(process.pid, 'SIGTERM')
process.kill(process.pid, 'SIGTERM')
process.kill(process.pid, 'SIGTERM')
},
}
const main = t => {
const spawn = require('child_process').spawn
const keys = Object.keys(cases)
t.plan(keys.length)
const env = Object.keys(process.env).reduce((env, k) => {
env[k] = env[k] || process.env[k]
return env
}, { TAP_BAIL: '0', TAP_BUFFER: '0' })
keys.forEach(k => t.test(k, t => {
t.plan(3)
const c = spawn(node, [__filename, k], { env: env })
let out = ''
c.stdout.on('data', c => out += c)
let err = ''
c.stderr.on('data', c => err += c)
c.on('close', (code, signal) => {
t.matchSnapshot({
code: code,
signal: signal
}, 'exit status')
t.matchSnapshot(clean(out), 'stdout')
t.matchSnapshot(clean(err), 'stderr')
})
}))
}
const c = cases[process.argv[2]]
if (Array.isArray(c)) {
c[0]()
c[1](require('../lib/tap.js'))
} else if (typeof c === 'function')
c(require('../lib/tap.js'))
else
main(require('../lib/tap.js'))
node-tap-11.0.0/test/test.js 0000664 0000000 0000000 00000057006 13206406237 0015607 0 ustar 00root root 0000000 0000000 'use strict'
const t = require('../')
const fs = require('fs')
const path = require('path')
const Test = t.Test
const util = require('util')
const assert = require('assert')
const EE = require('events').EventEmitter
const MiniPass = require('minipass')
// set this forcibly so it doesn't interfere with other tests.
process.env.TAP_DIAG = ''
process.env.TAP_BAIL = ''
const clean = require('./clean-stacks.js')
t.test('short output checks', t => {
const env = process.env.TAP_BUFFER
delete process.env.TAP_BUFFER
t.teardown(_ => process.env.TAP_BUFFER = env)
const cases = {
'no plan': tt => {
tt.pass('this is fine')
tt.end()
},
'plan': tt => {
tt.plan(1)
tt.pass('this is fine')
},
'comment': tt => {
tt.comment('this is fine')
tt.end()
},
'pragma': tt => {
tt.pragma({ strict: true })
tt.pragma({ strict: false })
tt.end()
},
'todo': tt => {
tt.notOk(true, 'i will do this later', { todo: true })
tt.notOk(true, { todo: 'later' })
tt.notOk(false)
tt.todo('i will do this later', tt => {
throw 'oh no'
})
tt.ok(false, { message: 'this is fine', skip: true })
tt.skip('i did not do this later', tt => {
throw 'oops'
})
tt.end()
},
'only': tt => {
tt.runOnly = false
tt.only('run this with a comment', tt => tt.end())
tt.test('this is a child test', tt => tt.end())
tt.test('run this with a comment', { only: true },
tt => tt.end())
tt.end()
},
'no plan fail': tt => {
tt.fail('this is fine', { diagnostic: false })
tt.fail({ todo: true })
tt.fail('this is fine')
tt.end()
},
'plan fail': tt => {
tt.plan(1, 'expect some failure here')
tt.fail('this is fine', { diagnostic: false })
},
'fail then end': tt => {
tt.test('child', tt => {
tt.fail('this is not ok')
tt.end()
})
tt.end()
},
'planned skip': tt => {
tt.plan(0, 'skip this one')
},
'multi-plan throws': tt => {
tt.plan(1)
tt.throws(() => tt.plan(1))
},
'negative plan throws': tt => {
tt.throws(() => tt.plan(-1))
tt.end()
},
'expect fail': tt => {
tt.plan(1)
tt.fail('this is fine', { expectFail: true })
},
'sub': tt => {
tt.test('named child', { buffered: true }, tt => {
tt.pass('this is fine')
tt.pass()
tt.pass({ todo: true })
tt.end()
})
tt.test(function named_function (tt) {
tt.plan(1)
tt.pass('also fine')
})
tt.test('promisey', tt => new Promise(resolve => {
tt.pass('i promise, it is fine')
resolve()
}))
tt.end()
},
'parallel sub': tt => {
tt.jobs = 2
tt.plan(2)
let slowGoing = true
tt.test('slow child', tt => setTimeout(_ => {
slowGoing = false
tt.end()
}, 100))
tt.test('fast child', tt => setTimeout(_ => {
tt.ok(slowGoing, 'slow is going')
tt.end()
}))
},
'reasoned bailout': tt => {
tt.test(tt => {
tt.pass('this is fine')
tt.bailout('not fine')
})
tt.end()
},
'unreasonable bailout': tt => {
tt.test(tt => {
tt.pass('this is fine')
tt.bailout()
})
tt.end()
},
'bailout after end': tt => {
tt.test(tt => {
tt.pass('this is fine')
tt.end()
tt.bailout('not fine')
})
tt.end()
},
'diags': tt => {
tt.pass('has diags', { diagnostic: true, foo: 1 })
tt.fail('fails without diag', { diagnostic: false, foo: 1 })
process.env.TAP_DIAG = '1'
tt.pass('has diags', { foo: 1 })
tt.fail('fails without diag', { diagnostic: false, foo: 1 })
process.env.TAP_DIAG = '0'
tt.pass('has diags', { diagnostic: true, foo: 1 })
tt.fail('fails without diag', { foo: 1 })
process.env.TAP_DIAG = ''
tt.end()
},
// _actually_ throwing is only handled by root TAP test
// using a Domain to catch beyond async stack drops
'gentle thrower': tt => tt.threw(new Error('ok')),
'child thrower': tt => tt.test('child test', tt =>
tt.threw(new Error('ok'))).then(tt.end),
'child end event thrower': tt => {
tt.test(tt => {
tt.plan(1)
tt.on('end', function () {
tt.comment('end() event')
throw new Error('beep')
})
tt.equal(3, 3)
})
tt.end()
}
}
const keys = Object.keys(cases)
t.plan(keys.length)
for (let i in cases) {
t.test(i, t => {
const go = (t, tt) => new Promise(resolve => {
let out = ''
tt.on('data', c => out += c)
let didIt = false
const done = reason => {
// make sure we don't test on BOTH bailout and end
// as that is unnecessary
if (didIt)
return
didIt = true
if (tt.output)
out = tt.output
if (reason)
out = out.trim() + '\nBAILOUT: ' + JSON.stringify(reason)
t.matchSnapshot(clean(out), i)
resolve()
}
tt.on('end', done)
tt.on('bailout', done)
cases[i](tt)
})
t.test('no options', t =>
go(t, new Test()))
t.test('buffered', t =>
go(t, new Test({ buffered: true })))
t.test('bailout', t =>
go(t, new Test({ bail: true })))
t.test('runOnly', t =>
go(t, new Test({ runOnly: true })))
t.end()
})
}
})
t.test('assertions and weird stuff', t => {
const env = process.env.TAP_BUFFER
process.env.TAP_BUFFER = '0'
t.teardown(_ => process.env.TAP_BUFFER = env)
const cases = {
'error': tt => {
tt.error(null, 'this is not an error')
tt.error(new Error('fail: poop'), 'this error is poop')
tt.error(new Error('fail: poop'))
tt.error('fail: poop', 'this error is "poop"')
tt.error('fail: poop')
tt.error(null, { todo: true })
tt.error(null)
tt.end()
},
equal: tt => {
tt.equal(1, 2)
tt.equal(1, '1', { skip: true })
tt.equal(1, 1, 'one is one')
// fails, but with the special note
tt.equal({foo: 1}, {foo: 1})
tt.end()
},
not: tt => {
tt.not(1, 2)
tt.not(1, '1', { skip: true })
tt.not(1, 1, 'one is not one')
tt.not({}, {})
tt.end()
},
same: tt => {
const o = { foo: 1 }
tt.same([1, 2, 3], ['1', '2', '3'])
tt.same(o, o)
tt.same({ foo: 1 }, { foo: 1 }, 'object exactness')
tt.same({ foo: 2 }, { foo: 1 }, { skip: true })
tt.notSame({ foo: 2 }, { foo: 1 }, 'this one passes')
tt.notSame({ foo: 2 }, { foo: 1 }, { skip: true })
tt.notSame({ foo: { bar: 2 } }, { foo: { bar: '2' } },
'this one fails')
tt.strictSame({ foo: 2 }, { foo: 1 }, { skip: true })
tt.strictSame([1, 2, 3], ['1', '2', '3'])
tt.strictSame(o, { foo: 1 })
tt.strictSame(o, o)
tt.notStrictSame({ foo: 2 }, { foo: 1 }, { skip: true })
tt.notStrictSame({ foo: 2 }, { foo: 1 }, 'this one passes')
tt.notStrictSame({ foo: { bar: 2 } }, { foo: { bar: '2' } },
'this one passes')
tt.notStrictSame({ foo: { bar: 2 } }, { foo: { bar: 2 } },
'this one fails')
tt.end()
},
match: tt => {
tt.match({ a: 'b', c: /asdf/ }, { a: String, c: RegExp })
tt.match({ a: 'b', c: /asdf/ }, { a: 'asdf', c: 1 })
tt.match({ a: 'b', c: /asdf/ }, { a: String, c: RegExp },
'a message')
tt.match({ a: 'b', c: /asdf/ }, { a: 'asdf', c: 1 },
{ todo: true })
tt.notMatch({ a: 'b', c: /asdf/ }, { a: String, c: RegExp })
tt.notMatch({ a: 'b', c: /asdf/ }, { a: 'asdf', c: 1 })
tt.notMatch({ a: 'b', c: /asdf/ }, { a: String, c: RegExp },
'a message')
tt.notMatch({ a: 'b', c: /asdf/ }, { a: 'asdf', c: 1 },
{ todo: true })
tt.end()
},
type: tt => {
tt.type(null, 'object', 'this fails')
tt.type(null, 'object', { expectFail: true })
tt.type(1234, 'number')
tt.type(tt, Test)
tt.type({}, function () {}, 'fails, anonymously')
const o = {}
tt.type(o, o, 'a thing is a thing')
tt.type(() => {}, 'function', 'arrows are functions')
tt.type(() => {}, Function, 'arrows are functions')
tt.type(() => {}, Object, 'fail: arrows are not objects')
tt.type({}, 'object')
tt.type(tt, 'Test')
tt.type(tt, 'EventEmitter')
tt.end()
},
throws: tt => {
tt.throws(() => { throw new TypeError('x') }, TypeError)
tt.throws(() => { throw new TypeError('x') }, TypeError)
tt.throws(() => { throw new TypeError('x') },
new TypeError('x'))
tt.throws(() => { throw new TypeError('x') },
{ message: 'x' })
const nameless = new Error('x')
Object.defineProperty(nameless, 'name', {
value: undefined
})
nameless.stack = /^.*$/
tt.throws(() => { throw new Error('x') }, nameless)
tt.throws(() => { throw nameless }, { message: 'x' })
tt.throws(() => { throw nameless }, /^.$/)
tt.throws(() => { throw nameless })
const prop = new Error('noent')
prop.code= 'ENOENT'
tt.throws(() => {
const er = new Error('noent')
er.code = 'ENOENT'
er.path = __filename
throw er
}, prop)
tt.throws(() => 'doesnt tho', 'fail: does not throw actually')
tt.throws(() => { throw new Error('x') }, {}, { skip: true })
tt.throws(() => { throw new Error('x') }, {},
{}, {}, 1)
tt.throws(() => { throw new Error('x') },
() => {}, () => {}, () => {},
'extra functions are no-ops for bw comp')
tt.throws('todo')
tt.end()
},
doesNotThrow: tt => {
tt.doesNotThrow(() => {}, 'this is fine')
tt.doesNotThrow(() => {}, { todo: true })
tt.doesNotThrow('reverse args', () => {})
tt.doesNotThrow('this is todo')
tt.doesNotThrow('fail', () => {
throw new Error('ouch')
})
tt.end()
},
rejects: tt => {
tt.rejects('promise', new Promise((_, reject) => {
reject(new Error('expected'))
}))
tt.rejects(() => new Promise((_, reject) => {
reject(new Error('expected'))
}), 'fn returns promise')
tt.rejects(new Promise((_, reject) => {
reject(new Error('expected'))
}))
tt.rejects(() => new Promise((_, reject) => {
reject(new Error('expected'))
}))
tt.rejects('todo because no fn/promise', { foo: 'bar' })
tt.comment('next 2 also todo, no message')
tt.rejects({ x: 1 })
tt.rejects()
tt.rejects(() => new Promise((_, reject) => {
reject(new Error('expected'))
}), new Error('expected'), 'throws expected error')
tt.rejects(() => new Promise((_, reject) => {
reject(new TypeError('expected'))
}), TypeError, 'throws expected error type')
tt.rejects(() => new Promise((_, reject) => {
reject(new TypeError('expected'))
}), TypeError, ()=>{}, _=>_, 'extra functions are no-ops')
tt.rejects(() => new Promise((_, reject) => {
reject(new TypeError('expected'))
}), TypeError, 1, 2, {}, {}, 'extra args are no-ops')
const prop = new Error('noent')
prop.code= 'ENOENT'
tt.rejects(new Promise((_, reject) => {
const er = new Error('noent')
er.code = 'ENOENT'
er.path = __filename
reject(er)
}), prop)
const nameless = new Error('x')
Object.defineProperty(nameless, 'name', {
value: undefined
})
nameless.stack = /^.*$/
tt.rejects(new Promise((_,r) => r(new Error('x'))), nameless)
tt.rejects(new Promise((_,r) => r(nameless)), { message: 'x' })
tt.rejects(new Promise((_,r) => r(nameless)), /^.$/)
tt.rejects(new Promise((_,r) => r(nameless)))
tt.rejects(() => {}, 'fail: no promise')
tt.rejects(() => ({}), 'fail: no promise')
tt.rejects(new Promise(r => r(420)), 'fail: passing promise')
tt.end()
},
resolves: tt => {
tt.resolves(new Promise(r => r(420)))
tt.resolves(new Promise(r => r(420)), { todo: true })
tt.resolves(new Promise(r => r(420)), 'passing promise')
tt.resolves(() => new Promise(r => r(420)), 'passing promise fn')
tt.resolves(() => {}, 'fail: no promise')
tt.end()
},
resolveMatch: tt => {
tt.resolveMatch(new Promise(r => r(420)), Number)
tt.resolveMatch(new Promise(r => r(420)), 'asdf', { todo: true })
tt.resolveMatch(new Promise(r => r(420)), 420, 'promise')
tt.resolveMatch(() => new Promise(r => r(420)), 420, 'promise fn')
tt.resolveMatch(() => {}, {}, 'fail: no promise')
tt.end()
},
'test after end fails': tt => {
tt.end()
tt.pass('failing pass')
},
'plan excess': tt => {
tt.plan(1)
tt.pass('fine')
tt.pass('not fine')
},
'plan excess, ignored when failing': tt => {
tt.plan(1)
tt.fail('expected fail', { diagnostic: false })
tt.pass('not fine')
},
'using the assertAt field': tt => {
const stack = require('../lib/stack.js')
const foo = () => tt.fail('expect fail')
const bar = () => foo()
const baz = () => { tt.assertAt = stack.at(); bar() }
tt.plan(1)
baz()
},
'using the assertStack field': tt => {
const stack = require('../lib/stack.js')
const foo = () => tt.fail('expect fail')
const bar = () => foo()
const baz = () => { tt.assertStack = stack.captureString(80); bar() }
tt.plan(1)
baz()
},
printResult: tt => {
// super low-level
tt.printResult(true, 'this is fine')
tt.end()
},
'printResult after plan end': tt => {
// super low-level
tt.end()
tt.printResult(true, 'this is fine')
},
'plan, child test, explicit end': tt => {
tt.plan(1)
tt.test(tt => Promise.resolve('ok'))
tt.end()
},
'end multiple times': tt => {
tt.plan(1)
tt.pass('yes')
tt.end()
tt.end()
},
'error event with domainEmitter re-throws': tt => {
const er = new Error('fail')
const d = tt.domain
try {
d.run(() => {
const e = new EE
e.emit('error', er)
tt.fail('did not throw')
})
} catch (er) {
tt.pass('the better to this.threw you with')
tt.end()
}
},
'thrower after end': tt => {
tt.test('child', tt => {
tt.plan(1)
tt.pass('this is fine')
tt.threw(new Error('catch it in the parent'))
})
tt.end()
},
'child breaks a promise': tt => {
tt.test('child', () => new Promise((_, r) => r(new Error('poop'))))
tt.end()
},
'child teardown throw': tt => {
tt.test('child', tt => {
tt.teardown(() => { throw new Error('fail') })
tt.end()
})
tt.end()
},
'fullname without main': tt => {
const main = process.argv[1]
process.argv[1] = ''
tt.test('child', tt => {
tt.pass(tt.fullname)
tt.end()
})
tt.pass(tt.fullname)
process.argv[1] = main
tt.end()
},
'comment after end': tt => {
tt.end()
tt.comment('this is fine')
},
grep: tt => {
tt.test('parent', { grep: [ /x$/, /y$/ ] }, tt => {
tt.test('do not run this', tt => tt.threw('no'))
tt.test('but do run this x', tt => {
tt.test('do not run this', tt => tt.threw('stop'))
tt.test('but do run this y', tt => {
tt.test('grand kids', tt => tt.end())
tt.test('get all the', tt => tt.end())
tt.test('goodies', tt => {
tt.pass('this is good')
tt.end()
})
tt.end()
})
tt.end()
})
tt.end()
})
tt.end()
},
grepInvert: tt => {
tt.test('parent', { grepInvert: true, grep: [ /x$/, /y$/ ] }, tt => {
tt.test('do not run this x', tt => tt.threw('no'))
tt.test('but do run this', tt => {
tt.test('do not run this y', tt => tt.threw('stop'))
tt.test('but do run this', tt => {
tt.test('grand kids', tt => tt.end())
tt.test('get all the', tt => tt.end())
tt.test('goodies', tt => {
tt.pass('this is good')
tt.end()
})
tt.end()
})
tt.end()
})
tt.end()
})
tt.end()
},
autoEnd: tt => {
tt.options.autoend = true
tt.test('this should automatically end', { autoend: true }, t => {
t.pass('this is fine')
setTimeout(() => t.pass('also fine'))
})
tt.test('this should also end', t => {
t.pass('this is fine')
setTimeout(() => t.pass('also fine'))
t.autoend()
})
tt.test('autoend async 1', t => {
setTimeout(() =>
t.test('st', t => setTimeout(() => t.end())))
t.autoend()
})
tt.test('autoend async 2', t => {
setTimeout(() => setTimeout(() =>
t.test('st', t => setTimeout(() => t.end()))))
t.autoend()
})
tt.test('autoend async limit', t => {
setTimeout(() => setTimeout(() => setTimeout(() =>
t.test('st', t => setTimeout(() => t.end())))))
t.autoend()
})
},
'endAll with test children': tt => {
tt.test('this is the test that never ends', tt => {
tt.test('it goes on and on my friend', tt => {
tt.pass('this is ok')
tt.test('misbehaving child', () => new Promise(()=>{}))
})
tt.pass('some queue stuff')
})
tt.endAll()
},
'endAll with stdin': tt => {
const s = new MiniPass()
tt.stdin({ tapStream: s })
s.write('TAP version 13\nok - but not ended\n')
tt.endAll()
},
'endAll with bailout': tt => {
tt.on('bailout', reason => tt.endAll())
tt.test('child', { bail: true }, tt => {
tt.fail('not fine')
tt.end()
})
},
'bailout with indented subs': tt => {
tt.test('1', tt => tt.end())
tt.test('2', tt => Promise.resolve(null))
tt.test('3', tt => setTimeout(() => tt.end()))
process.nextTick(() => tt.bailout('whoops'))
tt.end()
},
'bailout with buffered subs': tt => {
const o = { buffered: true }
tt.test('1', o, tt => tt.end())
tt.test('2', o, tt => Promise.resolve(null))
tt.test('3', o, tt => setTimeout(() => tt.end()))
process.nextTick(() => tt.bailout('whoops'))
tt.end()
},
'silent subs': tt => {
tt.test('child', tt => Promise.resolve(null))
tt.test('shhh', { silent: true }, tt => tt.end())
tt.test('child 2', tt => tt.end())
tt.end()
},
'beforeEach afterEach': tt => {
tt.beforeEach(function (cb) {
console.error('parent be', this.name)
cb()
})
tt.afterEach(function (cb) {
console.error('parent ae', this.name)
cb()
})
tt.test('child', tt => {
tt.beforeEach(function (cb) {
console.error('child be', this.name)
cb()
})
tt.afterEach(function (cb) {
console.error('child ae', this.name)
cb()
})
tt.test('grandkid', tt => Promise.resolve(console.error('in test')))
tt.end()
})
tt.end()
},
'timeout expiration': t => {
const buf = [ false, true ]
buf.forEach(buf => {
t.test('get lost buf=' + buf, { buffered: buf, timeout: 50 }, t => {
const timer = setTimeout(() => {}, 10000)
t.on('timeout', () => clearTimeout(timer))
})
})
t.end()
},
'timeout with subs': t => {
const buf = [ false, true ]
buf.forEach(buf => {
t.test('get lost buf=' + buf, { buffered: buf, timeout: 50 }, t => {
const timer = setTimeout(() => {}, 10000)
t.test('carry on', t => t.on('timeout', () => clearTimeout(timer)))
})
})
t.end()
},
'timeout at the last tick': t => {
const buf = [ false, true ]
buf.forEach(buf => {
t.test('work it harder buf=' + buf, { buffered: buf, timeout: 1 }, t => {
t.plan(1)
const start = Date.now()
const finish = start + 10
while (finish > Date.now()) {
fs.readFileSync(__filename)
}
t.pass('this is fine')
})
})
t.end()
},
}
const keys = Object.keys(cases)
t.plan(keys.length)
for (let i in cases) {
t.test(i, t => {
t.plan(1)
const error = console.error
t.teardown(() => console.error = error)
let err = ''
console.error = function () {
err += util.format.apply(util, arguments) + '\n'
}
const tt = new Test()
let out = ''
tt.on('data', c => out += c)
tt.on('end', _ => {
setTimeout(() => {
if (err)
out = out.trim() + '\n' + 'STDERR:\n' + err
t.matchSnapshot(clean(out), i)
})
})
cases[i](tt)
})
}
})
t.test('addAssert', t => {
t.throws(() => t.addAssert(null), new TypeError('name is required'))
t.throws(() => t.addAssert('x'), new TypeError('number of args required'))
t.throws(() => t.addAssert('x', -1),
new TypeError('number of args required'))
t.throws(() => t.addAssert('x', 1),
new TypeError('function required for addAssert'))
t.throws(() => t.addAssert('ok', 1, () => {}),
new TypeError('attempt to re-define `ok` assert'))
const url = require('url')
const tt = new Test({ buffered: true })
tt.addAssert('isUrl', 1, function isUrl (u, message, extra) {
return this.match(url.parse(u), {
protocol: /^https?:$/,
slashes: true,
host: String,
path: /^\/.*$/
}, message || 'expect a valid http/https url', extra)
})
tt.isUrl('hello is not a url')
tt.isUrl('http://x', 'x is a url!')
tt.isUrl('https://skip:420/', { skip: 420 })
tt.end()
t.matchSnapshot(clean(tt.output), 'using the custom isUrl assertion')
return t.end()
})
t.test('spawn', t => {
const okjs = path.resolve(__dirname, '../ok.test.js')
t.teardown(() => fs.unlinkSync(okjs))
fs.writeFileSync(okjs, "require('./').pass('this is fine')\n")
t.spawn(process.execPath, okjs)
t.spawn(process.execPath, okjs, 'a string as options')
t.spawn(process.execPath, okjs, { name: 'a name as an option' })
t.test('kitty pipe', t => {
t.on('spawn', t =>
t.proc.stdin.end('TAP version 13\n1..1\nok\n'))
t.spawn('cat', [], { stdio: 'pipe' })
t.spawn('cat', null, { stdio: 'pipe' }, 'aggreeable kitten')
t.end()
})
t.end()
})
t.test('snapshots', t => {
const Snapshot = require('../lib/snapshot.js')
const snap = [ true, false ]
const outputs = snap.map(snap => {
const tt = new Test({
snapshot: snap,
name: 'deleteme',
buffered: true
})
tt.test('child test', { snapshot: snap }, tt => {
tt.matchSnapshot({ foo: 'bar' }, 'an object')
tt.matchSnapshot('some string \\ \` ${process.env.FOO}', 'string')
tt.matchSnapshot('do this eventually', { todo: 'later' })
tt.end()
})
tt.emit('teardown')
tt.end()
return tt.output
})
t.matchSnapshot(clean(outputs[0]), 'saving the snapshot')
t.matchSnapshot(clean(outputs[1]), 'verifying the snapshot')
fs.unlinkSync(path.resolve(__dirname, '..',
'tap-snapshots', 'test-test.js-deleteme.test.js'))
t.end()
})