node-tap-12.0.1/000077500000000000000000000000001327737073000133135ustar00rootroot00000000000000node-tap-12.0.1/.gitignore000066400000000000000000000000651327737073000153040ustar00rootroot00000000000000/node_modules/ /coverage/ /.nyc_output/ /nyc_output/ node-tap-12.0.1/.travis.yml000066400000000000000000000001211327737073000154160ustar00rootroot00000000000000language: node_js sudo: false node_js: - 8 - 6 notifications: email: false node-tap-12.0.1/CHANGELOG.md000066400000000000000000000001341327737073000151220ustar00rootroot00000000000000Please see [the tap website](http://www.node-tap.org/changelog/) for the curated changelog. node-tap-12.0.1/CONTRIBUTING.md000066400000000000000000000016141327737073000155460ustar00rootroot00000000000000Please 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. node-tap-12.0.1/LICENSE000066400000000000000000000013751327737073000143260ustar00rootroot00000000000000The 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-12.0.1/README.md000066400000000000000000000152211327737073000145730ustar00rootroot00000000000000# node-tap A TAP test framework for Node.js. [![Build Status](https://travis-ci.org/tapjs/node-tap.svg?branch=master)](https://travis-ci.org/tapjs/node-tap) _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-12.0.1/appveyor.yml000066400000000000000000000006401327737073000157030ustar00rootroot00000000000000environment: 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-12.0.1/bin/000077500000000000000000000000001327737073000140635ustar00rootroot00000000000000node-tap-12.0.1/bin/mochatap.js000077500000000000000000000005341327737073000162220ustar00rootroot00000000000000#!/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-12.0.1/bin/run.js000077500000000000000000000473621327737073000152440ustar00rootroot00000000000000#!/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) // 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) if (!args.length && !options.files.length && isTTY) { console.error(usage()) process.exit(1) } // 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) => signal ? null : options.checkCoverage ? runCoverageCheck(options, code, signal) : 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-12.0.1/bin/usage.txt000066400000000000000000000272411327737073000157360ustar00rootroot00000000000000Usage: 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-12.0.1/docs/000077500000000000000000000000001327737073000142435ustar00rootroot00000000000000node-tap-12.0.1/docs/100/000077500000000000000000000000001327737073000145435ustar00rootroot00000000000000node-tap-12.0.1/docs/100/index.md000066400000000000000000000047611327737073000162040ustar00rootroot00000000000000--- layout: layout title: The TAP 100 --- # The TAP 100 These modules use the `--100` flag to run tests with 100% [coverage](/coverage/) of all lines, branches, statements, and functions. To add yours to the list, send a [pull request](https://github.com/tapjs/node-tap/blob/master/docs/100/index.md) to add it to the docs. * [abbrev](https://www.npmjs.com/package/abbrev) * [casern](https://www.npmjs.com/package/casern) * [color-support](https://www.npmjs.com/package/color-support) * [contentfs](https://www.npmjs.com/package/contentfs) * [dotenv](https://www.npmjs.com/package/dotenv) * [events-to-array](https://www.npmjs.com/package/events-to-array) * [express-jwt-permissions](https://www.npmjs.com/package/express-jwt-permissions) * [fs-exists-cached](https://www.npmjs.com/package/fs-exists-cached) * [fs-minipass](https://www.npmjs.com/package/fs-minipass) * [fs-readstream-seek](https://www.npmjs.com/package/fs-readstream-seek) * [function-loop](https://www.npmjs.com/package/function-loop) * [hexagonal-lambda](https://github.com/focusaurus/hexagonal-lambda) * [hoodie](https://www.npmjs.com/package/hoodie) * [icepick](https://www.npmjs.com/package/icepick) * [ignore-walk](https://www.npmjs.com/package/ignore-walk) * [inflight](https://www.npmjs.com/package/inflight) * [ini](https://www.npmjs.com/package/ini) * [isexe](https://www.npmjs.com/package/isexe) * [lru-cache](https://www.npmjs.com/package/lru-cache) * [lucass](https://www.npmjs.com/package/lucass) * [minipass](https://www.npmjs.com/package/minipass) * [minizlib](https://www.npmjs.com/package/minizlib) * [mutate-fs](https://www.npmjs.com/package/mutate-fs) * [natives](https://www.npmjs.com/package/natives) * [npm-bundled](https://www.npmjs.com/package/npm-bundled) * [npm-packlist](https://www.npmjs.com/package/npm-packlist) * [stack-utils](https://www.npmjs.com/package/stack-utils) * [t-up](https://www.npmjs.com/package/t-up) * [tap-parser](https://www.npmjs.com/package/tap-parser) * [tap](/) * [tapromise](https://www.npmjs.com/package/tapromise) * [tapsert](https://www.npmjs.com/package/tapsert) * [tapshot](https://www.npmjs.com/package/tapshot) * [tar](https://www.npmjs.com/package/tar) * [tmatch](https://www.npmjs.com/package/tmatch) * [touch](https://www.npmjs.com/package/touch) * [trivial-deferred](https://www.npmjs.com/package/trivial-deferred) * [tsame](https://www.npmjs.com/package/tsame) * [twing](https://www.npmjs.com/package/twing) * [yallist](https://www.npmjs.com/package/yallist) * [yapool](https://www.npmjs.com/package/yapool) node-tap-12.0.1/docs/CNAME000066400000000000000000000000211327737073000150020ustar00rootroot00000000000000www.node-tap.org node-tap-12.0.1/docs/Gemfile000066400000000000000000000000611327737073000155330ustar00rootroot00000000000000source 'https://rubygems.org' gem 'github-pages' node-tap-12.0.1/docs/Makefile000066400000000000000000000000371327737073000157030ustar00rootroot00000000000000run: bundle exec jekyll serve node-tap-12.0.1/docs/_config.yml000066400000000000000000000020661327737073000163760ustar00rootroot00000000000000title: "Node Tap" description: A Test-Anything-Protocol library for Node.js links: - name: "Index" url: "/" - name: "Getting Started" url: "/basics/" - name: "API" url: "/api/" links: - name: "Asserts" url: "/asserts/" - name: "Promises" url: "/promises/" - name: "Subtests" url: "/subtests/" - name: "Parallel Tests" url: "/parallel/" - name: "Snapshot Testing" url: "/snapshots/" - name: "Filtering Tests: grep" url: "/grep/" - name: "Filtering Tests: only" url: "/only/" - name: "Mocha-like DSL" url: "/mochalike/" - name: "Advanced" url: "/advanced/" - name: "CLI" url: "/cli/" - name: "The Protocol" url: "/tap-format/" - name: "Reporting" url: "/reporting/" - name: "Coverage" url: "/coverage/" - name: "Change Log" url: "/changelog/" - name: "GitHub Repo" url: "https://github.com/tapjs/node-tap" # Build settings markdown: kramdown markdown_ext: md kramdown: input: GFM hard_wrap: false syntax_highlighter: rouge node-tap-12.0.1/docs/_layouts/000077500000000000000000000000001327737073000161025ustar00rootroot00000000000000node-tap-12.0.1/docs/_layouts/layout.html000077500000000000000000000052171327737073000203150ustar00rootroot00000000000000 {% if page.title %} {{ page.title }} | {{ site.title }} {% else %} {{ site.title }} {% endif %}

Test Anything JS

{{ site.description }}

npm install tap
tap test/*.js
{{ content }}
node-tap-12.0.1/docs/advanced/000077500000000000000000000000001327737073000160105ustar00rootroot00000000000000node-tap-12.0.1/docs/advanced/index.md000066400000000000000000000130221327737073000174370ustar00rootroot00000000000000--- layout: layout title: Advanced Usage --- # Advanced Usage These methods are primarily for internal use, but can be handy in some unusual situations. If you find yourself using them frequently, you *may* be Doing It Wrong. However, if you find them useful, you should feel perfectly comfortable using them. Please [let us know](https://github.com/isaacs/node-tap/issues) if you frequently encounter situations requiring advanced usage, because this may indicate a shortcoming in the "non-advanced" [API](/api/). ## Class: t.Spawn() Similar to the `Test` class, but instead of a callback that gets a object with assertion methods, it starts a child process and parses its output. ## Class: t.Stdin() Similar to the `Test` class, but instead of a callback that gets a object with assertion methods, it reads the process standard input, and parses that as [TAP](/tap-format)-formatted data. ## t.stdin() Parse standard input as if it was a child test named `/dev/stdin`. Returns a Promise which resolves with the parent when the input stream is completed. This is primarily for use in the test runner, so that you can do `some-tap-emitting-program | tap other-file.js - -Rnyan`. ## t.spawn(command, arguments, [options], [name]) Sometimes, instead of running a child test directly inline, you might want to run a TAP producting test as a child process, and treat its standard output as the TAP stream. Returns a Promise which resolves with the parent when the child process is completed. That's what this method does. It is primarily used by the executable runner, to run all of the filename arguments provided on the command line. The `options` object is passed to `child_process.spawn`, and can contain stuff like stdio directives and environment vars. It's also where you put the same fields that would be passed to any assertion or child test: * `bail`: Set to `true` to bail out on the first failure. This is done by checking the output and then forcibly killing the process, but also sets the `TAP_BAIL` environment variable, which node-tap uses to set this field internally as well. * `timeout`: The number of ms to allow the child process to continue. If it goes beyond this time, the child process will be forcibly killed. * `todo` Set to boolean `true` or a String to mark this as pending. * `skip` Set to boolean `true` or a String to mark this as skipped. * `bail` Set to boolean `true` to bail out on the first test failure. * `diagnostic` Set to `true` to show a yaml diagnostic block even if the test passes. Set to `false` to never show a yaml diagnostic block. * `buffered` Set to `true` to run as a buffered [subtest](/subtests/). Set to `false` to run as an indented subtest. The default is `false` unless `TAP_BUFFER=1` is set in the environment. ## t.addAssert(name, length, fn) This is used for creating assertion methods on the `Test` class. It's a little bit advanced, but it's also super handy sometimes. All of the assert methods below are created using this function, and it can be used to create application-specific assertions in your tests. The name is the method name that will be created. The length is the number of arguments the assertion operates on. (The `message` and `extra` arguments will always be appended to the end.) For example, you could have a file at `test/setup.js` that does the following: ```javascript var tap = require('tap') // convenience if (module === require.main) { tap.pass('ok') return } // Add an assertion that a string is in Title Case // It takes one argument (the string to be tested) tap.Test.prototype.addAssert('titleCase', 1, function (str, message, extra) { message = message || 'should be in Title Case' // the string in Title Case // A fancier implementation would avoid capitalizing little words // to get `Silence of the Lambs` instead of `Silence Of The Lambs` // But whatever, it's just an example. var tc = str.toLowerCase().replace(/\b./, function (match) { return match.toUpperCase() }) // should always return another assert call, or // this.pass(message) or this.fail(message, extra) return this.equal(str, tc, message, extra) }) ``` Then in your individual tests, you'd do this: ```javascript require('./setup.js') // adds the assert var tap = require('tap') tap.titleCase('This Passes') tap.titleCase('however, tHis tOTaLLy faILS') ``` ## t.endAll() Call the `end()` method on all child tests, and then on this one. ## t.assertAt, t.assertStack, extra.at, extra.stack The Test object will try to work out the most useful `stack` and `at` options to tell you where a failing assertion was made. In very rare and interesting cases, you _may_ wish to override this for some reason. For example, you may be wrapping tap.Test object methods, and wish to show the user where they called your method, rather than showing where your method called into tap. You can do this in two possible ways: 1. Set the `at` and/or `stack` properties on the `extra` object passed to assert methods. 2. Set the `t.assertAt` and/or `t.assertStack` properties on the Test object immediately before calling the assertion method. The values are consumed and deleted when the next assertion is called. The `at` property should be an object with the following properties at minimum: * `file` - The file name where the assertion is called * `line` - The line number where the assertion is called The `stack` property should be a string stack trace similar to those found on `Error` objects. For best results, calculate these values using the [stack-utils](http://npm.im/stack-utils) module. node-tap-12.0.1/docs/api/000077500000000000000000000000001327737073000150145ustar00rootroot00000000000000node-tap-12.0.1/docs/api/index.md000066400000000000000000000203771327737073000164560ustar00rootroot00000000000000--- layout: layout title: API --- # API This is the API that you interact with when writing tests using node-tap. See also: - [Getting Started](/basics/) - [Asserts](/asserts/) - [Snapshot Testing](/snapshots/) - [Promises](/promises/) - [Subtests](/subtests/) - [Parallel Tests](/parallel/) - [Filtering Tests with Grep](/grep/) - [Filtering Tests with Only](/only/) - [Mocha-like DSL](/mochalike/) - [Advanced Usage](/advanced/) ## tap = require('tap') The root `tap` object is an instance of the Test class with a few slight modifications. 1. By default, it pipes to stdout, so running a test directly just dumps the TAP data for inspection. This piping behavior is a _little_ bit magic -- it only pipes when you do something that triggers output, so there's no need to manually unpipe if you never actually use it to run tests. 2. Various other things are hung onto it for convenience, since it is the main package export. 3. The test ends automatically when `process.on('exit')` fires, so there is no need to call `tap.end()` explicitly. 4. Adding a `tearDown` function triggers `autoend` behavior, unless `autoend` was explicitly set to `false`. Otherwise, the `end` would potentially never arrive, if for example `tearDown` is used to close a server or cancel some long-running process, because `process.on('exit')` would never fire of its own accord. If you disable `autoend`, and _also_ use a `teardown()` function on the main tap instance, you need to either set a `t.plan(n)` or explicitly call `t.end()` at some point. ## tap.Test The `Test` class is the main thing you'll be touching when you use this module. The most common way to instantiate a `Test` object by calling the `test` method on the root or any other `Test` object. The callback passed to `test(name, fn)` will receive a child `Test` object as its argument. A `Test` object is a Readable Stream. Child tests automatically send their data to their parent, and the root `require('tap')` object pipes to stdout by default. However, you can instantiate a `Test` object and then pipe it wherever you like. The only limit is your imagination. Whenever you see `t.` in this documentation, it refers to a Test object, but applies equally well in most cases to the root test. ### t.test([name], [options], [function]) Create a subtest. Returns a [Promise](/promises/) which resolves with the parent when the child test is completed. If the function is omitted, then it will be marked as a "todo" or "pending" test. If the function has a name, and no name is provided, then the function name will be used as the test name. If no test name is provided, then the name will be `(unnamed test)`. The function gets a Test object as its only argument. From there, you can call the `t.end()` method on that object to end the test, or use the `t.plan()` method to specify how many child tests or [asserts](/asserts/) the test will have. If the function returns a [Promise](/promises/) object (that is, an object with a `then` method), then when the promise is rejected or fulfilled, the test will be either ended or failed. Note that this means that an `async` function will automatically end when it's done, because of the implicit promise. If the function is not provided, then this will be treated as a `todo` test. The options object is the same as would be passed to [any assert](/asserts/), with some additional fields that are only relevant for child tests: * `todo` Set to boolean `true` or a String to mark this as pending. (Note that this is always the case if no function is provided.) * `skip` Set to boolean `true` or a String to mark this as skipped. * `timeout`: The number of ms to allow the test to run. * `bail`: Set to `true` to bail out on the first test failure. * `autoend`: Automatically `end()` the test on the next turn of the event loop after its internal queue is drained. * `diagnostic` Set to boolean `true` to show a yaml diagnostic block even if the test passes. Set to `false` to never show a yaml diagnostic block. (Failing tests show yaml diagnostics by default.) * `buffered` Set to `true` to run as a buffered [subtest](/subtests/). Set to `false` to run as an indented subtest. The default is `false` unless `TAP_BUFFER=1` is set in the environment. * `jobs` Set to an integer to assign the `t.jobs` property. * `grep` Set to an array of regular expressions to [filter subtests with patterns](/grep/) * `only` Set to `true` to run this test when in `runOnly` mode. See [filtering tests using only](/only/) * `runOnly` Set to `true` to only run tests with `only:true` set. ### t.todo([name], [options], [function]) Exactly the same as `t.test()`, but adds `todo: true` in the options. ### t.skip([name], [options], [function]) Exactly the same as `t.test()`, but adds `skip: true` in the options. ### t.only([name], [options], [function]) Exactly the same as `t.test()`, but adds `only: true` in the options. See [filtering tests using only](/only/) ### t.runOnly Set to `true` to only run child tests that have `only: true` set in their options (or are run with `t.only()`, which is the same thing). ### t.jobs If you set the `t.jobs` property to a number greater than 1, then it will enable [parallel execution](/parallel/) of all of this test's children. ### t.tearDown(function) Run the supplied function when `t.end()` is called, or when the `plan` is met. Note that when called on the root `tap` export, this also triggers `autoend` behavior. ### t.beforeEach(function (done) {}) Call the supplied function before every subsequent descendent test. The `done` callback is a function to call when finished. You can also return a [Promise](/promises/) rather than using the `done` callback. ### t.afterEach(function (done) {}) Call the supplied function after every subsequent descendent test. The `done` callback is a function to call when finished. You can also return a [Promise](/promises/) rather than using the `done` callback. ### t.plan(number) Specify that a given number of tests are going to be run. This may only be called *before* running any [asserts](/asserts/) or child tests. ### t.end() Call when tests are done running. This is not necessary if `t.plan()` was used, or if the test function returns a [Promise](/promises/). If you call `t.end()` explicitly more than once, an error will be raised. ### t.bailout([reason]) Fire the proverbial ejector seat. Use this when things are severely broken, and cannot be reasonably handled. Immediately terminates the entire test run. ### t.passing() Return true if everything so far is ok. Note that all assert methods also return `true` if they pass. ### t.comment(message) Print the supplied message as a TAP comment. Note that you can always use `console.error()` for debugging (or `console.log()` as long as the message doesn't look like TAP formatted data). ### t.fail(message, extra) Emit a failing test point. This method, and `pass()`, are the basic building blocks of all fancier assertions. ### t.pass(message) Emit a passing test point. This method, and `fail()`, are the basic building blocks of all fancier assertions. ### t.pragma(set) Sets a `pragma` switch for a set of boolean keys in the argument. The only pragma currently supported by the TAP parser is `strict`, which tells the parser to treat non-TAP output as a failure. Example: ``` var t = require('tap') console.log('this non-TAP output is ok') t.pragma({ strict: true }) console.log('but this will cause a failure') ``` ### t.threw(error) When an uncaught exception is raised in the context of a test, then this method is used to handle the error. It fails the test, and prints out appropriate information about the stack, message, current test, and so on. Generally, you never need to worry about this directly. However, this method can also be called explicitly in cases where an error would be handled by something else (for example, a default [Promise](/promises/) `.catch(er)` method.) ### t.autoend(value) If `value` is boolean `false`, then it will disable the `autoend` behavior. If `value` is anything other than `false`, then it will cause the test to automatically end when nothing is pending. Note that this is triggered by default on the root `tap` instance when a `teardown()` function is set, unless `autoend` was explicitly disabled. node-tap-12.0.1/docs/asserts/000077500000000000000000000000001327737073000157275ustar00rootroot00000000000000node-tap-12.0.1/docs/asserts/index.md000066400000000000000000000213401327737073000173600ustar00rootroot00000000000000--- layout: layout title: Asserts --- # Asserts The `Test` object has a collection of assertion methods, many of which are given several synonyms for compatibility with other test runners and the vagaries of human expectations and spelling. When a synonym is multi-word in `camelCase` the corresponding lower case and `snake_case` versions are also created as synonyms. All assertion methods take optional `message` and `extra` arguments as the last two params. The `message` is the name of the test. The `extra` argument can contain any arbitrary data about the test, but the following fields are "special". * `todo` Set to boolean `true` or a String to mark this as pending * `skip` Set to boolean `true` or a String to mark this as skipped * `diagnostic` Set to boolean `true` to show a yaml diagnostic block even if the test point passes. (Failing asserts always show yaml diagnostics.) * `at` Generated by the framework. The location where the assertion was called. Do not set this field unless you know what you are doing. * `stack` Generated by the framework. The stack trace to the point where the assertion was called. Do not set this field unless you know what you are doing. **Note**: There's no requirement that you use tap's built-in assertions. You can also use any Error-throwing assertion library, including Node.js's built-in `assert` module. A throw fails a test, so not-throwing passes. That does, however, mean that you won't generate a test point in your output for each assertion run. You do you. ## t.ok(obj, message, extra) Verifies that the object is truthy. Synonyms: `t.true`, `t.assert` ## t.notOk(obj, message, extra) Verifies that the object is not truthy. Synonyms: `t.false`, `t.assertNot` ## t.error(obj, message, extra) If the object is an error, then the assertion fails. Note: if an error is encountered unexpectedly, it's often better to simply throw it. The Test object will handle this as a failure. Synonyms: `t.ifErr`, `t.ifError` ## t.rejects(promise | fn, [expectedError], message, extra) Verifies that the promise (or promise-returning function) rejects. If an expected error is provided, then also verify that the rejection matches the expected error. Note: since promises always reject and resolve asynchronously, this assertion is actually implemented using a subtest. As such, it does not return a boolean to indicate its passing status. Instead, it returns a Promise that resolves when it is completed. ## t.resolves(promise | fn, message, extra) Verifies that the promise (or promise-returning function) resolves, making no expectation about the value that the promise resolves to. Note: since promises always reject and resolve asynchronously, this assertion is actually implemented using a subtest. As such, it does not return a boolean to indicate its passing status. Instead, it returns a Promise that resolves when it is completed. ## t.resolveMatch (promise | fn, wanted, message, extra) Verifies that the promise (or promise-returning function) resolves, and furthermore that the value of the promise matches the `wanted` pattern using `t.match`. Note: since promises always reject and resolve asynchronously, this assertion is actually implemented using a subtest. As such, it does not return a boolean to indicate its passing status. Instead, it returns a Promise that resolves when it is completed. ## t.throws(fn, [expectedError], message, extra) Expect the function to throw an error. If an expected error is provided, then also verify that the thrown error matches the expected error. If the expected error is an object, then it's matched against the thrown error using `t.match(er, expectedError)`. If it's a function, then the error is asserted to be a member of that class. If the function has a name, and the message is not provided, then the function name will be used as the message. If the function is not provided, then this will be treated as a `todo` test. Caveat: if you pass a `extra` object to t.throws, then you MUST also pass in an expected error, or else it will read the diag object as the expected error, and get upset when your thrown error doesn't match `{skip:true}` or whatever. For example, this will not work as expected: ```javascript // anti-example, do not use! t.throws(function() {throw new Error('x')}, { skip: true }) ``` But this is fine: ```javascript // this example is ok to use. // note the empty 'expected error' object. // since it has no fields, it'll only verify that the thrown thing is // an object, not the value of any properties t.throws(function() {throw new Error('x')}, {}, { skip: true }) ``` The expected error is tested against the throw error using `t.match`, so regular expressions and the like are fine. If the expected error is an `Error` object, then the `stack` field is ignored, since that will generally never match. Synonyms: `t.throw` ## t.doesNotThrow(fn, message, extra) Verify that the provided function does not throw. If the function has a name, and the message is not provided, then the function name will be used as the message. If the function is not provided, then this will be treated as a `todo` test. Note: if an error is encountered unexpectedly, it's often better to simply throw it. The Test object will handle this as a failure. Synonyms: `t.notThrow` ## t.equal(found, wanted, message, extra) Verify that the object found is exactly the same (that is, `===`) to the object that is wanted. Synonyms: `t.equals`, `t.isEqual`, `t.is`, `t.strictEqual`, `t.strictEquals`, `t.strictIs`, `t.isStrict`, `t.isStrictly` ## t.notEqual(found, notWanted, message, extra) Inverse of `t.equal()`. Verify that the object found is not exactly the same (that is, `!==`) as the object that is wanted. Synonyms: `t.inequal`, `t.notEqual`, `t.notEquals`, `t.notStrictEqual`, `t.notStrictEquals`, `t.isNotEqual`, `t.isNot`, `t.doesNotEqual`, `t.isInequal` ## t.same(found, wanted, message, extra) Verify that the found object is deeply equivalent to the wanted object. Use non-strict equality for scalars (ie, `==`). See: [tsame](http://npm.im/tsame) Synonyms: `t.equivalent`, `t.looseEqual`, `t.looseEquals`, `t.deepEqual`, `t.deepEquals`, `t.isLoose`, `t.looseIs` ## t.notSame(found, notWanted, message, extra) Inverse of `t.same()`. Verify that the found object is not deeply equivalent to the unwanted object. Uses non-strict inequality (ie, `!=`) for scalars. Synonyms: `t.inequivalent`, `t.looseInequal`, `t.notDeep`, `t.deepInequal`, `t.notLoose`, `t.looseNot` ## t.strictSame(found, wanted, message, extra) Strict version of `t.same()`. Verify that the found object is deeply equivalent to the wanted object. Use strict equality for scalars (ie, `===`). Synonyms: `t.strictEquivalent`, `t.strictDeepEqual`, `t.sameStrict`, `t.deepIs`, `t.isDeeply`, `t.isDeep`, `t.strictDeepEquals` ## t.strictNotSame(found, notWanted, message, extra) Inverse of `t.strictSame()`. Verify that the found object is not deeply equivalent to the unwanted object. Use strict equality for scalars (ie, `===`). Synonyms: `t.strictInequivalent`, `t.strictDeepInequal`, `t.notSameStrict`, `t.deepNot`, `t.notDeeply`, `t.strictDeepInequals`, `t.notStrictSame` ## t.match(found, pattern, message, extra) Verify that the found object matches the pattern provided. If pattern is a regular expression, and found is a string, then verify that the string matches the pattern. If the pattern is a string, and found is a string, then verify that the pattern occurs within the string somewhere. If pattern is an object, then verify that all of the (enumerable) fields in the pattern match the corresponding fields in the object using this same algorithm. For example, the pattern `{x:/a[sdf]{3}/}` would successfully match `{x:'asdf',y:'z'}`. This is useful when you want to verify that an object has a certain set of required fields, but additional fields are ok. See [tmatch](http://npm.im/tmatch) for the full details on how this works. Synonyms: `t.has`, `t.hasFields`, `t.matches`, `t.similar`, `t.like`, `t.isLike`, `t.includes`, `t.include`, `t.contains` ## t.notMatch(found, pattern, message, extra) Inverse of `match()` Verify that the found object does not match the pattern provided. Synonyms: `t.dissimilar`, `t.unsimilar`, `t.notSimilar`, `t.unlike`, `t.isUnlike`, `t.notLike`, `t.isNotLike`, `t.doesNotHave`, `t.isNotSimilar`, `t.isDissimilar` ## t.type(object, type, message, extra) Verify that the object is of the type provided. Type can be a string that matches the `typeof` value of the object, or the string name of any constructor in the object's prototype chain, or a constructor function in the object's prototype chain. For example, all the following will pass: ```javascript t.type(new Date(), 'object') t.type(new Date(), 'Date') t.type(new Date(), Date) ``` Synonyms: `t.isa`, `t.isA` node-tap-12.0.1/docs/basics/000077500000000000000000000000001327737073000155075ustar00rootroot00000000000000node-tap-12.0.1/docs/basics/index.md000066400000000000000000000233101327737073000171370ustar00rootroot00000000000000--- layout: layout title: Getting Started --- # tap basics This tutorial will teach you just enough to get up and running with tap in your Node.js programs. ## install tap Use npm to install tap: ```bash npm install tap --save-dev ``` The `save-dev` part makes it saved to your package.json's `devDependencies` list. Next, update your package.json so that the test script invokes tap: ```json { "name": "my-awesome-module", "version": "1.2.3", "devDependencies": { "tap": "^11.0.0" }, "scripts": { "test": "tap test/*.js" } } ``` ## test files Create a folder for your tests. Call the folder `test` so that people can guess what it's for: ```bash mkdir test/ ``` It's a good practice to break up a big test suite into multiple files. Each file should cover a feature or concept. For small Node modules, often a single test file is enough. I usually call the first one `test/basic.js`, because it covers the basic functionality. ## "hello world" test program The root tap object is a member of tap's `Test` class. That means it has all the same properties as child tests. Here's a very basic test program: ```javascript // test/hello-world.js var tap = require('tap') tap.pass('this is fine') ``` If we run this with node, we'll see the raw TAP output: ```bash $ node test/hello-world.js ``` ```tap TAP version 13 ok 1 - this is fine 1..1 # time=26.792ms ``` You can always run a tap test program directly to see what it is doing. This is especially handy in debugging test failures That output is "TAP" or "Test Anything Protocol". It has a long history in the Perl community, and there are many tools in many languages that can generate and parse this format. Node-tap is one of those tools, so let's have it create something prettier for us. Because we installed tap as a devDependency, and added it as a script in package.json, we can run `npm test` to run all our tests with the `tap` built-in cli. ```bash $ npm test > my-awesome-module@1.2.3 test /home/isaacs/my-awesome-module > tap test/*.js test/hello-world.js ................................... 1/1 total ................................................. 1/1 1 passing (227.745ms) ok ``` ## coverage Test coverage makes it a lot easier to know that we're testing what we think we're testing. So, let's create a module to test. Let's say that we want a function that returns 'even' if the number is even, or 'odd' if it's odd, unless it's greater than 100, in which case it should return 'big', and if it's less than 0, it should return 'negative'. ```javascript // my-awesome-module.js module.exports = function (x) { if (x % 2 === 0) { return 'even' } else if (x % 2 === 1) { return 'odd' } else if (x > 100) { return 'big' } else if (x < 0) { return 'negative' } } ``` Probably no bugs! Now, we can create a test file that pulls it in and verifies the result: ```javascript // test/basic.js var tap = require('tap') var mam = require('../my-awesome-module.js') // Always call as (found, wanted) by convention tap.equal(mam(1), 'odd') tap.equal(mam(2), 'even') ``` Looks good to me! ```bash $ npm test > my-awesome-module@1.2.3 test /home/isaacs/my-awesome-module > tap test/*.js test/basic.js ......................................... 2/2 test/hello-world.js ................................... 1/1 total ................................................. 3/3 3 passing (451.79ms) ok ``` Let's run with test coverage turned on, just to be sure: ```bash $ npm test -- --cov > my-awesome-module@1.2.3 test /home/isaacs/my-awesome-module > tap test/*.js "--cov" test/basic.js ......................................... 2/2 575ms test/hello-world.js ................................... 1/1 total ................................................. 3/3 3 passing (889.135ms) ok -----------------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -----------------------|----------|----------|----------|----------|----------------| __root__/ | 55.56 | 37.5 | 100 | 55.56 | | my-awesome-module.js | 55.56 | 37.5 | 100 | 55.56 | 7,8,9,10 | -----------------------|----------|----------|----------|----------|----------------| All files | 55.56 | 37.5 | 100 | 55.56 | | -----------------------|----------|----------|----------|----------|----------------| ``` Ouch, only 50% coverage. That's not very good. Let's see what lines are covered: ```bash $ npm test -- --cov --coverage-report=lcov ``` This runs the tests and opens a [pretty coverage report](/basics/coverage-example-1/lcov-report/root/index.html) in a web browser. This shows that the second half of our function isn't being called. Ok, add some more tests then: ```js // test/basic.js var tap = require('tap') var mam = require('../my-awesome-module.js') // Always call as (found, wanted) by convention tap.equal(mam(1), 'odd') tap.equal(mam(2), 'even') tap.equal(mam(200), 'big') tap.equal(mam(-10), 'negative') ``` Now the test output gets a lot more interesting: ```bash $ npm t > my-awesome-module@1.2.3 test /home/isaacs/my-awesome-module > tap test/*.js test/basic.js ......................................... 2/4 not ok should be equal +++ found --- wanted -big +even compare: === at: file: test/basic.js line: 8 column: 5 source: | tap.equal(mam(200), 'big') stack: | Object. (test/basic.js:8:5) node.js:951:3 not ok should be equal +++ found --- wanted -negative +even compare: === at: file: test/basic.js line: 9 column: 5 source: | tap.equal(mam(-10), 'negative') stack: | Object. (test/basic.js:9:5) node.js:951:3 test/hello-world.js ................................... 1/1 total ................................................. 3/5 3 passing (440.796ms) 2 failing npm ERR! Test failed. See above for more details. ``` Let's update our code so that it makes our tests pass: ```js // my-awesome-module.js module.exports = function (x) { if (x > 100) { return 'big' } else if (x < 0) { return 'negative' } else if (x % 2 === 0) { return 'even' } else { return 'odd' } } ``` And now our coverage report is much happier: ```bash $ npm t -- --cov > my-awesome-module@1.2.3 test /home/isaacs/my-awesome-module > tap test/*.js "--cov" test/basic.js ......................................... 4/4 test/hello-world.js ................................... 1/1 257ms total ................................................. 5/5 5 passing (886.473ms) ok -----------------------|----------|----------|----------|----------|----------------| File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines | -----------------------|----------|----------|----------|----------|----------------| __root__/ | 100 | 100 | 100 | 100 | | my-awesome-module.js | 100 | 100 | 100 | 100 | | -----------------------|----------|----------|----------|----------|----------------| All files | 100 | 100 | 100 | 100 | | -----------------------|----------|----------|----------|----------|----------------| ``` ## async stuff If your module has some async stuff, you can test that using a child test. (You can also just use child tests to group a bunch of assertions into a block so it's easier to manage.) Create a child test with the `tap.test(...)` function. The child tests look just like the main `tap` object. You can call the `.end()` method on a child test object when it's done. ```javascript // test/async.js // this is a silly test. var tap = require('tap') var fs = require('fs') tap.test('some async stuff', function (childTest) { fs.readdir(__dirname, function (er, files) { if (er) { throw er // tap will handle this } childTest.match(files.join(','), /\basync\.js\b/) childTest.end() }) }) tap.test('this waits until after', function (childTest) { // no asserts? no problem! // the lack of throwing means "success" childTest.end() }) ``` If you run this test with Node, you'll see that the [child tests](/subtests/) are indented: ```bash $ node test/async.js ``` ```tap TAP version 13 # Subtest: some async stuff ok 1 - should match pattern provided 1..1 ok 1 - some async stuff # time=9.647ms # Subtest: this waits until after 1..0 ok 2 - this waits until after # time=6ms 1..2 # time=36.53ms ``` If you run it with tap, it'll look just like the others ```bash $ npm t > my-awesome-module@1.2.3 test /home/isaacs/my-awesome-module > tap test/*.js test/async.js ......................................... 2/2 test/basic.js ......................................... 4/4 test/hello-world.js ................................... 1/1 total ................................................. 7/7 7 passing (658.444ms) ok ``` Tap's [promise](/promises/) support means it plays great with async/await. Stuff like this will Just Work out of the box if you have a JS engine that supports async functions: ```js var tap = require('tap') tap.test(async function (t) { var result = await doSomethingAsync() t.match(result, { ok: true, message: /dogs/ }, 'dogs are ok') // Or you can use any assertion lib you like. as long as this // code doesn't throw an error, it's a pass! }) ``` ## bonus points You can do these things for extra credit. 1. Put `--cov` in your package.json test script to always run tests with [coverage](/coverage/). 2. Install `tap` globally to [run it](/cli/) directly. See the [API reference](/api/) to learn more. node-tap-12.0.1/docs/changelog/000077500000000000000000000000001327737073000161725ustar00rootroot00000000000000node-tap-12.0.1/docs/changelog/index.md000066400000000000000000000275441327737073000176370ustar00rootroot00000000000000--- layout: layout title: Change Log --- ## 12.0 2018-05-16 Breaking change to support deep matching and pattern matching of objects in `Set` collections. (Previously, `Set` contents would only match if they were equal.) ## 11.0 2017-11-26 Significant refactoring and speed improvements. Add [`t.skip()`](/api/#tskipname-options-function) and [`t.todo()`](/api/#tskipname-options-function) methods. Add [`t.resolves(promise)`](/asserts/#tresolvespromise--fn-message-extra) to assert that a Promise object (or function that returns a Promise) will resolve. Add [`t.resolveMatch(promise, pattern)`](/asserts/#tresolvematch-promise--fn-wanted-message-extra) to assert that a Promise object (or function that returns a Promise) will resolve to a value matching the supplied pattern. Add support for [snapshot testing](/snapshots/). Improved implementation of [Mocha-like DSL](/mochalike/) ### BREAKING CHANGES: - Classes are true ECMAScript classes now, so constructors cannot be called without `new`. - Unnamed subtests are not given the name `(unnamed test)` - The `t.current()` method is removed ## 10.7 2017-06-24 Add support for [filtering tests using 'only'](/only/). Don't show grep/only skips in the default reporter output. ## 10.6 2017-06-23 Add support for [filtering tests using regular expressions](/grep/). ## 10.5 2017-06-20 Add support for Maps and Sets in `t.match()`, `t.same()`, and `t.strictSame()`. ## 10.4 2017-06-18 Add [`t.rejects()`](/asserts/#trejectspromise--fn-expectederror-message-extra) assertion. ## 10.3 2017-03-01 * Add `-o` `--output-file` to put the raw TAP to a file. * Never print Domain objects in YAML. They're humongous. * Don't lose error messages in doesNotThrow ## 10.2 2017-02-18 Variety of minor cleanup fixes, and a debug mode. * Respond to TAP_DEBUG and NODE_DEBUG environs * Catch errors thrown in teardown handlers * Improve root-level thrown error reporting * don't let an occupied test slip past endAll * Handle unhandledRejection as a root TAP error * better inspect data * If results are synthetically set, don't clobber when parser ends * monkeypatch exit as well as reallyExit ## 10.1 2017-02-07 Added support for source maps. Stack traces in your jsx and coffeescript files will now be helpful! Added the `-J` option to auto-calculate the number of cores on your system, and run that many parallel jobs. ## 10.0 2017-01-28 Full rewrite to support [parallel tests](/parallel/). Pass `-j4` on [the command-line](/cli/) to run 4 test files at once in parallel. This also refactors a lot of the grimier bits of the codebase, splits the one mega-Test class into a proper OOP hierarchy, and pulls a bunch of reusable stuff out into modules. Somehow, in the process, it also fixed an odd timing bug with `beforeEach` functions that returned promises. It truly is a luxury to have a massive pile of tests when it's time to refactor. The [mocha-like DSL](/mochalike/) is now much more functional, and documented. Now supports passng `-T` or `--timeout=0` to the [CLI](/cli/) to not impose a timeout on tests. ## 9.0 2017-01-07 Buffered subtests! This adds support for outputting subtests in the [buffered](/subtests/) format, where the summary test point _precedes_ the indented subtest output, rather than coming afterwards. This sets the stage for parallel tests, coming in v10. Mostly, it's just an update to [tap-parser](http://npm.im/tap-parser), and a lot of internal clean-up. Update [nyc](http://npm.im/nyc) to v10, which includes some fixes for covering newer JavaScript language features, and support for implicit function names. Also: remove a lot of excess noise and repetitive stack traces in yaml diagnostics. ## 8.0 2016-10-25 Update `tmatch` to version 3. This makes regular expressions test against the stringified versions of the test object in all `t.match()` methods. It's a breaking change because it can cause tests to pass that would have failed previously, or vice versa. However, it is more expected, and strongly recommended. Handle unfinished promise-awaiting tests when the process exits. Show yaml diagnostics for the first "missing test" failure when a plan is not met, so that the plan can be more easily debugged. (Diagnostics are still excluded for the additional "missing test" failures that are generated, to reduce unnecessary noise.) Make coverage MUCH FASTER by turning on nyc caching. ## 7.1 2016-09-06 Remove a race condition in how `Bail out!` messages got printed when setting the "bail on failure" option in child tests. Now, whether it's a child process or just a nested subtest, it'll always print `Bail out!` at the failure level, then again at the top level, with nothing in between. Support `{ diagnostic: false }` in the options object for failing tests to suppress yaml diagnostics. Diagnostics are now shown when a synthetic `timeout` failure is generated for child test processes that ignore `SIGTERM` and must be killed with `SIGKILL`. ## 7.0 2016-08-27 Move `# Subtest` commands to the parent level rather than the child level, more like Perl's `Test2` family of modules. This is more readable for humans. Update to version 2 of the tap parser. (This adds support for putting the `# Subtest` commands at the parent level.) Support use of a `--save` and `--bail` together. Any test files that were skipped due to a bailout are considered "not yet passed", and so get put in the save file. Forcibly kill any spawned child process tests when the root test exits the parent process, preventing zombie test processes. Handle `SIGTERM` signals sent to the main process after the root test has ended. This provides more useful output in the cases where the root test object has explicitly ended or satisfied its plan, but a timeout still occurs because of pending event loop activity. Prevent `for..in` loops from iterating inherited keys in many cases, providing resilience against `Object.prototype` mutations. Add the `--100` flag to set statements, functions, lines, and branches to 100% coverage required. ## 6.3 2016-07-30 Let `t.doesNotThrow` take a string as the first argument. Bump `nyc` up to version 7. The tap `lib/` folder is excluded from all stack traces. ## 6.2 2016-07-15 Add the `--test-arg=` option. ## 6.1 2016-07-01 Add support for `{diagnostic: true}` in test and assert options, to force a YAML diagnostic block after passing child tests and assertions. ## 6.0 2016-06-30 Only produce output on stdout if the root TAP test object is interacted with in some way. Simply doing `require('tap')` no longer prints out the minimum TAP output, which means that you can interact with, for example, `var Test = require('tap').Test` without causing output side effects. Add `~/.taprc` yaml config file support. Add the `--dump-config` command line flag to print out the config options. Document environment variables used. Built-in CodeCov.io support has been removed. If you were relying on this, you can add `codecov` as a devDependency, and then add this to the scripts block in your `package.json` file: { "scripts": { "test": "tap test/*.js --coverage", "posttest": "tap --coverage-report=lcov | codecov" } } ## 5.8 2016-06-24 Make coverage piping errors non-fatal. Clean up argument ordering logic in `t.throws()`. This now works for almost any ordering of arguments, which is unfortunately necessary for historical reasons. Additionally, you can now pass in an `Error` class to verify the type, which would previously not work properly in some cases. ## 5.7 2016-02-22 Report timeout errors in child test scripts much more diligently. On Unix systems, the child process handles `SIGTERM` signals by assuming that things are taking too long, dumping a report of all active handles and requests in process, and exiting in error. On Windows systems (where `SIGTERM` is always uncatchably fatal), or if a Unix child test process doesn't exit within 1 second (causing a fatal `SIGKILL` to be sent), the parent generates more comprehensive output to indicate that the child test exited due to a timeout. ## 5.6 2016-02-17 Update `tmatch` to version 2. You can now test objects by supplying their constructor, so `t.match(x, { foo: Function, name: String })` would verify that the object has a `name` string and a `foo` method. ## 5.5 2016-02-15 Add the `t.assertAt` and `t.assertStack` properties, to override where an assertion was effectively called from. ## 5.4 2016-01-31 Support passing in a class to `t.throws`, rather than an Error sample object. ## 5.3 2016-01-31 Return a `Promise` object from `t.test()`, `t.spawn()`, and `t.stdin()`. ## 5.2 2016-01-26 Adds `t.beforeEach()` and `t.afterEach()`. ## 5.1 2016-01-16 All about the cli flags! Support `--node-arg=...` and `--nyc-arg=...` command line flags. Add support for coverage checking using `--statements=95` etc. Test for executable-ness more consistently across platforms. ## 5.0 2016-01-03 Make it impossible to `try/catch` out of plan/end abuses. Calling `t.end()` more than once, or having a number of tests that doesn't match the `plan()` number, is always a failure. Push thrown errors to the front of the action queue. This means that, even if other things are pending, an uncaught exception or a plan/end bug, will always take the highest priority in what gets output. Many updates to nyc, spawn-wrap, and foreground-child, so that tap now reliably works on Windows (and a [ci to prove it](https://ci.appveyor.com/project/isaacs/node-tap).) Moved into the [tapjs org](https://github.com/tapjs). ## 4.0 2015-12-30 Raise an error if `t.end()` is explicitly called more than once. This is a breaking change, because it can cause previously-passing tests to fail, if they did `t.end()` in multiple places. Support promises returned by mochalike functions. ## 3.1 2015-12-29 Support sending coverage output to both codecov.io and coveralls.io. ## 3.0 2015-12-29 Upgrade to nyc 5. This means that `config.nyc.exclude` arrays in `package.json` now take globs instead of regular expressions. ## 2.3 2015-11-18 Use the name of the function supplied to `t.test(fn)` as the test name if a string name is not provided. Better support for sparse arrays. ## 2.2 2015-10-23 Add support for Codecov.io as well as Coveralls.io. Catch failures that come after an otherwise successful test set. Fix timing of `t.on('end')` so that event fires *before* the next child test is started, instead of immediately after it. `t.throws()` can now be supplied a regexp for the expected Error message. ## 2.1 2015-10-06 Exit in failure on root test bailout. Support promises returned by `t.test(fn)` function. ## 2.0 2015-09-27 Update matching behavior using [tmatch](http://npm.im/tmatch). This is a breaking change to `t.match`, `t.similar`, `t.has`, etc., but brings them more in line with what people epirically seem to expect these functions to do. Deal with pending handles left open when a child process gets a `SIGTERM` on timeout. Remove domains in favor of more reliable and less invasive state and error-catching bookkeeping. ## 1.4 2015-09-02 Add `t.contains()` alias for `t.match()`. Use `deeper` for deep object similarity testing. Treat unfinished tests as failures. Add support for pragmas in TAP output. ## 1.3 2015-06-23 Bind all Test methods to object. Add `t.tearDown()`, `t.autoend()`, so that the root export is Just Another Test Object, which just happens to be piping to stdout. Support getting an error object in bailout() ## 1.2 2015-05-26 Better support for exit status codes. ## 1.1 2015-05-20 Add coverage using nyc. If a `COVERALLS_REPO_TOKEN` is provided, then run tests with coverage, and pipe to coveralls. ## 1.0 2015-05-06 Complete rewrite from 0.x. Child tests implemented as nested TAP output, similar to Perl's `Test::More`. ## 0.x The 0.x versions used a "flattened" approach to child tests, which requires some bookkeeping. It worked, mostly, but its primary success was inspiring [tape](http://npm.im/tape) and tap v1 and beyond. node-tap-12.0.1/docs/cli/000077500000000000000000000000001327737073000150125ustar00rootroot00000000000000node-tap-12.0.1/docs/cli/index.md000066400000000000000000000277111327737073000164530ustar00rootroot00000000000000--- layout: layout title: CLI --- # CLI You can get help on tap's command line interface by running `tap -h`. ``` 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: classic doc dot dump json jsonstream landing list markdown min nyan progress silent spec tap xunit -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-12.0.1/docs/coverage/000077500000000000000000000000001327737073000160365ustar00rootroot00000000000000node-tap-12.0.1/docs/coverage/index.md000066400000000000000000000061711327737073000174740ustar00rootroot00000000000000--- layout: layout title: Coverage --- # Coverage This module uses [nyc](http://npm.im/nyc) to track code coverage, even across subprocess boundaries. It is included by default, and there's nothing you need to do but enable it. Adding coverage *will* make your tests run slightly slower, but that's to be expected. Nyc in turn uses [istanbul](http://npm.im/istanbul) to do the actual coverage code transformation and reporting. To generate coverage information, run your tests with the `--cov` argument. If you use this a lot, you may want to add `coverage` and `.nyc_output` to your `.gitignore` and/or `.npmignore` files. ## Maximal Coverage 💯 As of version 7, node-tap lets you easily enforce 100% coverage of all lines, branches, functions, and statements with one easy flag, if that's your thing: ```json { "scripts": { "test": "tap test/*.js --100" } } ``` If you do this in an open source module, please [join the exclusive 100 club](/100/). ## Travis-CI and Coveralls.io Integration You can very easily take advantage of continuous test coverage reports by using [Travis-CI](https://travis-ci.org) and [Coveralls](https://coveralls.io). 1. Enable Travis-CI by signing up, enabling tests on your repo, and adding a `.travis.yml` file to your repo. You can use [this module's .travis.yml file as an example](https://github.com/tapjs/node-tap/blob/master/.travis.yml) 2. Enable Coveralls.io by signing up, and adding the repo. Note the repo API token. 3. Back at Travis-CI, add a private environment variable. The name of the environment variable is `COVERALLS_REPO_TOKEN`, and the value is the token you got from Coveralls. 4. When that token is set in the environment variable, `tap` will automatically generate coverage information and send it to the appropriate place. ## Uploading Coverage to Other Services There's no requirement that you use Coveralls! Any coverage service that understands `lcov` can be used as well. For example, using [CodeCov](https://codecov.io), you can do the following: 1. Add `codecov` as a devDependency in your project with this command: npm install codecov --save-dev 2. Add a `test` script that generates coverage information, and a `posttest` that uploads it to codecov: { "scripts": { "test": "tap test/*.js --coverage", "posttest": "tap --coverage-report=text-lcov && codecov" } } ## Local Coverage Reporting Printing out a coverage report can be done along with tests, or after any covered test run, using the `--coverage-report=` argument. The most popular types are `text` and `html`, but any report style supported by istanbul is available, including: - clover - cobertura - html - json - json-summary - teamcity - text - text-lcov - text-summary To specify a report format, you can use `--coverage-report=`. The default type is `text`, which produces a pretty text-only table on the terminal. If you specify `--coverage-report=html`, then tap will attempt to launch a web browser to view the report after the test run. You can prevent launching a browser by specifying the flag `--no-browser`. node-tap-12.0.1/docs/grep/000077500000000000000000000000001327737073000152005ustar00rootroot00000000000000node-tap-12.0.1/docs/grep/index.md000066400000000000000000000143141327737073000166340ustar00rootroot00000000000000--- layout: layout title: Filtering Tests: Grep --- # Filtering Tests with Grep Options Child tests can be filtered using regular expressions with the `grep` option. Note: this is for filtering test functions within a test file. If you want to filter which _files_ get run, just pass the appropriate argument to the `tap` executable. That is, instead of `tap test/*.js`, do `tap test/foo.js` to just run a single file. ## Command Line Usage On the [command-line](/cli/), specify one or more patterns with `--grep=` (or `-g` for short). You can provide multiple patterns by providing multiple `--grep` options. The first pattern will filter tests at the top level of your test files. The next pattern will filter child tests of that test, and so on. Patterns can be either a simple string, or a JavaScript RegExp literal like `/[asdf]/i`. Use the RegExp literal format if you need to use regular expression flags such as `i` for case insensitive matching. To invert the matches (that is, run all tests that _don't_ match), use the `--invert` or `-i` flag. For example, consider this test file: ```javascript // mytest.js const t = require('tap') t.test('first', async t => { t.test('apple', async t => { t.pass('apples are tasty') }) t.test('banana', async t => { t.pass('bananas are yellow') }) }) t.test('second', async t => { t.test('this is fine', async t => { t.pass('i think') }) t.test('i am ok with how things are proceeding', async t => { t.pass('therefor I am') }) }) ``` To only run the first test branch, you could do this: ``` tap --grep=first mytest.js ``` Using the default classic reporter, we see this output: ``` $ tap --grep=first mytest.js mytest.js ............................................. 2/3 Skipped: 1 total ................................................. 2/3 2 passing (230.078ms) 1 pending ``` Looking at the underlying TAP output by specifying the `tap` reporter, here's what's being generated: ``` tap --grep=first mytest.js -Rtap ``` ```tap TAP version 13 # Subtest: mytest.js # Subtest: first # Subtest: apple ok 1 - apples are tasty 1..1 ok 1 - apple # time=8.892ms # Subtest: banana ok 1 - bananas are yellow 1..1 ok 2 - banana # time=1.297ms 1..2 ok 1 - first # time=18.544ms ok 2 - second # SKIP filter: /first/ 1..2 # skip: 1 # time=28.242ms ok 1 - mytest.js # time=300.676ms 1..1 # time=320.615ms ``` We can get more granular by specifying multiple greps. Let's say that we want to run all second-level tests with a `p` or `P` in the name. Here's how to do that: ``` # +-- first grep, allow anything matching . # | # | +-- second grep, filter matching /p/, case-insensitive # | | # v v $ tap -g. -g/p/i mytest.js -Rtap ``` Result: ```tap TAP version 13 # Subtest: mytest.js # Subtest: first # Subtest: apple ok 1 - apples are tasty 1..1 ok 1 - apple # time=7.449ms ok 2 - banana # SKIP filter: /p/ 1..2 # skip: 1 ok 1 - first # time=16.035ms # Subtest: second ok 1 - this is fine # SKIP filter: /p/ # Subtest: i am ok with how things are proceeding ok 1 - therefor I am 1..1 ok 2 - i am ok with how things are proceeding # time=0.982ms 1..2 # skip: 1 ok 2 - second # time=4.339ms 1..2 # time=28.875ms ok 1 - mytest.js # time=255.454ms 1..1 # time=267.758ms ``` ## API Programmatic Usage While it's rare, you can also specify greps programmatically within tests, either in child tests or at the top level, by providing an array of regular expressions. Just like on the command line, the first pattern is matched against the first level of child tests, and so on through subsequent levels. When all the patterns are exhausted, the entire test is run. The array of regular expressions can be specified on the `t` object, or in the `options` object passed to the `t.test()` method. For example: ```js // mytest.js const t = require('tap') // set on a test object directly, after creation t.grep = [/./, /p/i] t.test('first', async t => { t.test('apple', async t => { t.pass('apples are tasty') }) t.test('banana', async t => { t.pass('bananas are yellow') }) }) // new greps override what's inherited from the parent t.test('second', { grep: [ /fi[ln]e/ ] }, async t => { t.test('this is fine', async t => { t.pass('i think') }) t.test('i am ok with how things are proceeding', async t => { t.pass('therefor I am') }) }) ``` Output: ```tap TAP version 13 # Subtest: first # Subtest: apple ok 1 - apples are tasty 1..1 ok 1 - apple # time=5.166ms ok 2 - banana # SKIP filter: /p/i 1..2 # skip: 1 ok 1 - first # time=11.805ms # Subtest: second # Subtest: this is fine ok 1 - i think 1..1 ok 1 - this is fine # time=0.86ms ok 2 - i am ok with how things are proceeding # SKIP filter: /fi[ln]e/ 1..2 # skip: 1 ok 2 - second # time=3.277ms 1..2 # time=21.632ms ``` ## Setting in the Environment To set greps on the root level test object, you can set the `TAP_GREP` and `TAP_GREP_INVERT` environment variables. `TAP_GREP` is a `\n`-delimited list of patterns. `TAP_GREP_INVERT` can be set to `'1'` to invert the meaning of grep matches. For example: ``` $ TAP_GREP=$'first\napple' node mytest.js ``` Output: ```tap TAP version 13 # Subtest: first # Subtest: apple ok 1 - apples are tasty 1..1 ok 1 - apple # time=4.35ms ok 2 - banana # SKIP filter: /apple/ 1..2 # skip: 1 ok 1 - first # time=10.378ms ok 2 - second # SKIP filter: /first/ 1..2 # skip: 1 # time=15.818ms ``` To invert the matches: ``` $ TAP_GREP_INVERT=1 TAP_GREP=$'first\nfine' node mytest.js | pbcopy ``` ```tap TAP version 13 ok 1 - first # SKIP filter out: /first/ # Subtest: second ok 1 - this is fine # SKIP filter out: /fine/ # Subtest: i am ok with how things are proceeding ok 1 - therefor I am 1..1 ok 2 - i am ok with how things are proceeding # time=3.117ms 1..2 # skip: 1 ok 2 - second # time=9.441ms 1..2 # skip: 1 # time=21.761ms ``` node-tap-12.0.1/docs/index.md000066400000000000000000000142421327737073000156770ustar00rootroot00000000000000--- layout: layout --- # node-tap A full-featured mature TAP-based test framework for Node.js. Install it by running: ``` npm install --save-dev tap ``` _Just wanna see some code? [Get started!](/basics/)_ `tap` includes out of the box: 1. [A test framework](/api/) for writing tests in Node.js. 2. [A command-line interface](/cli/) for running tests and reporting on their success or failure. 3. [Support for test-coverage](/coverage/), including coverage of child processes, and integration with Coveralls.io and Codecov.io. 4. [Support for parallel tests](/parallel/), including running the some tests in parallel, and others serially. See [the changelog](/changelog/) for recent updates, or just get started with [the basics](/basics/). [![Build Status](https://travis-ci.org/tapjs/node-tap.svg?branch=master)](https://travis-ci.org/tapjs/node-tap) ## 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 in a way 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](/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](/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](/coverage/). Just throw [`--cov`](/coverage/) onto your test invocation (or [`--100`](/100/) if you're up to the challenge). 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](/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](/promises/). 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](/basics/). node-tap-12.0.1/docs/mochalike/000077500000000000000000000000001327737073000161775ustar00rootroot00000000000000node-tap-12.0.1/docs/mochalike/index.md000066400000000000000000000051601327737073000176320ustar00rootroot00000000000000--- layout: layout title: Mocha-like DSL --- # Mocha-like DSL If you prefer to use a BDD-style DSL like [mocha](http://mochajs.org/) instead of the traditional `t.whatever()`, tap lets you do that! You can do this by using the methods on the `tap.mocha` object, or dump them into the global namespace using `tap.mochaGlobals()`. So, instead of this: ```javascript // tap.js var t = require('tap') t.test('Array.indexOf', function (t) { var array = [1, 2, 3] t.test('when item is not found', function (t) { t.test('does not throw an error', function (t) { array.indexOf(4) t.end() }) t.equal(array.indexOf(4), -1, 'returns -1') t.end() }) t.end() }) ``` You can do this: ```javascript // bdd.js require('tap').mochaGlobals() var should = require('should') describe('Array.indexOf', function () { var array = [1, 2, 3] context('when item is not found', function () { it('does not throw an error', function () { array.indexOf(4) }) it('returns -1', function () { array.indexOf(4).should.equal(-1) }) }) }) ``` Running these with the `spec` reporter results in this output: ``` $ tap -Rspec tap.js bdd.js tap.js Array.indexOf when item is not found ✓ does not throw an error ✓ returns -1 bdd.js Array.indexOf when item is not found ✓ does not throw an error ✓ returns -1 4 passing (527.355ms) ``` The following functions are provided: * `describe(function () {})` Defines a test suite. Runs synchronously. * `context(function () {})` Alias for `describe`. * `it(function ([done]) {})` Defines a test block. As long as nothing throws, it is considered passing. If a `Promise` is returned, then it'll wait for the Promise to resolve before continuing to the next test block. If the function takes an argument, then it'll get a callback which must be called to signal that the test block is complete. If the function does not take an argument, and does not return a Promise, then it is assumed to be done immediately. * `before(function ([done]) {})` Similar to `it`, but doesn't get reported. Run immediately. * `after(function ([done]) {})` Similar to `it`, but doesn't get reported. Run after all test blocks are completed. * `beforeEach(function ([done]) {})` Run before each test block. * `afterEach(function ([done]) {})` Run after each test block. Using the mocha-like BDD interface defines tests hanging off of the root `tap` object, so tests defined in this way will always start at the "top level", even if they are defined within a `t.test(...)` function. node-tap-12.0.1/docs/only/000077500000000000000000000000001327737073000152245ustar00rootroot00000000000000node-tap-12.0.1/docs/only/index.md000066400000000000000000000103441327737073000166570ustar00rootroot00000000000000--- layout: layout title: Filtering Tests: Only --- # Filtering Tests with Only Option Child tests can be filtered by setting the `only` flag in the options object, or by using the `t.only` method. Because tests are run top-to-bottom synchronously, there's no way to know at the start of a test file if a `t.only()` call is coming. To activate this filtering, use the `--only` flag to the tap [command-line interface](/cli/), or set `TAP_ONLY=1` in the environment, or set the `t.runOnly = true` in a test file. Setting the `TAP_ONLY=1` environment variable or using `tap --only` will restrict the root tap object from running tests that aren't flagged as "only". To filter deeper in a test suite, set `t.runOnly = true` at the appropriate level. Note: this is for filtering test functions within a test file. If you want to run only one _file_, just pass the appropriate argument to the `tap` executable. That is, instead of `tap test/*.js`, do `tap test/foo.js` to just run a single file. Also, this only filters _subtests_. Individual assertions will always be emitted if they are encountered. ## Example Consider this test file: ```js const t = require('tap') t.only('only run this test', function (t) { // all tests in here will be run t.pass('this is fine') t.test('first child', function (t) { t.pass('got here') t.end() }) t.test('second child', function (t) { t.pass('got here, too') t.end() }) t.end() }) t.test('a second top level test', function (t) { t.pass('second top level test assertion') t.end() }) ``` If run with `node mytest.js`, it'll produce this output: ```tap TAP version 13 # "only run this test" has `only` set but all tests run # Subtest: only run this test ok 1 - this is fine # Subtest: first child ok 1 - got here 1..1 ok 2 - first child # time=2.352ms # Subtest: second child ok 1 - got here, too 1..1 ok 3 - second child # time=0.48ms 1..3 ok 1 - only run this test # time=11.58ms # Subtest: a second top level test ok 1 - second top level test assertion 1..1 ok 2 - a second top level test # time=0.337ms 1..2 # time=26.044ms ``` If run with `TAP_ONLY=1 node mytest.js`, then we see this instead: ```tap TAP version 13 # Subtest: only run this test ok 1 - this is fine # Subtest: first child ok 1 - got here 1..1 ok 2 - first child # time=3.062ms # Subtest: second child ok 1 - got here, too 1..1 ok 3 - second child # time=0.577ms 1..3 ok 1 - only run this test # time=15.972ms ok 2 - a second top level test # SKIP filter: only 1..2 # skip: 1 # time=24.457ms ``` Note that the second test was skipped. To only show the first child in the first test block, we could do this: ```js const t = require('../tap') t.only('only run this test', function (t) { // only run tests here with t.only() t.runOnly = true t.pass('this is fine') t.only('first child', function (t) { t.pass('got here') t.end() }) t.test('second child', function (t) { t.pass('got here, too') t.end() }) t.end() }) t.test('a second top level test', function (t) { t.pass('second top level test assertion') t.end() }) ``` Now when we run the test, we see this: ```tap TAP version 13 # Subtest: only run this test ok 1 - this is fine # Subtest: first child ok 1 - got here 1..1 ok 2 - first child # time=1.609ms ok 3 - second child # SKIP filter: only 1..3 # skip: 1 ok 1 - only run this test # time=8.585ms ok 2 - a second top level test # SKIP filter: only 1..2 # skip: 1 # time=14.176ms ``` Note that the second child test was skipped along with the second top level test. To get the same results with the tap command line, you can do this: ``` $ tap --only mytest.js mytest.js ............................................. 2/4 Skipped: 2 total ................................................. 2/4 2 passing (277.134ms) 2 pending ``` Using the `spec` reporter will show more detail about the tests being skipped and run: ``` $ tap --only mytest.js -Rspec mytest.js only run this test ✓ this is fine first child ✓ got here - second child - a second top level test 2 passing (231.681ms) 2 pending ``` node-tap-12.0.1/docs/parallel/000077500000000000000000000000001327737073000160375ustar00rootroot00000000000000node-tap-12.0.1/docs/parallel/index.md000066400000000000000000000114141327737073000174710ustar00rootroot00000000000000--- layout: layout title: Parallel Tests --- # Parallel Tests Node-tap includes the ability to run buffered child tests in parallel. There are two ways that this can be done: either via the command line interface, or within a single test program. In both cases, you set a number of `jobs` that you want to allow it to run in parallel, and then any buffered tests are run in a pool which will execute that many test functions in parallel. (The default `jobs` value is 1, which means that nothing is parallel by default.) ## Parallel tests from the CLI This is the simplest way to run parallel tests. Just add `--jobs=` to your test command (or `-j` if you prefer shorthands). You'll note that if you do this, it seems like the output from each test file happens "all at once", when the test completes. That's because parallel tests are always buffered, so the command-line harness doesn't parse their output until they're fully complete. (Since many of them may be running at once, it would be very confusing otherwise.) ### Enabling/Disabling Parallelism in the test runner If you set the `--jobs` option, then tests will be run in parallel by default. However, you may want to have _some_ tests run in parallel, and make others run serially. To prevent any tests in a given folder from running in parallel, add a file to that directory named `tap-parallel-not-ok`. This will prevent tests from being run in parallel in that folder or any sub-folders. To re-enable parallel tests in a given folder and its subfolders, create a file named `tap-parallel-ok`. This is only required if parallel tests had been disabled in a parent directory. For example, if you had this folder structure: ``` test ├── parallel/ │   ├── all-my-ports-are-private-and-unique.js │   ├── isolated.js │   ├── no-external-deps.js │   └── tap-parallel-ok ├── bar.js ├── foo.js └── tap-parallel-not-ok ``` then running `tap -j4 test/` would cause it to run `bar.js` and `foo.js` serially, and the contents of the `test/parallel/` folder would be run in parallel. As test files are updated to be parallel-friendly (ie, not listening on the same ports as any other tests, not depending on external filesystem stuff, and so on), then they can be moved into the `parallel` subfolder. ## Parallel tests from the API To run child tests in parallel, set `t.jobs = ` in your test program. This can be set either on the root tap object, or on any child test. If `t.jobs` is set to a number greater than 1, then tests will be run in `buffered` mode by default. To force a test to be serialized, set `{ buffered: false }` in its options. You may also set `TAP_BUFFER=0` in the environment to make tests non-buffered by default. For example, imagine that you had some slow function that makes a network request or processes a file or something, and you want to call this function three times in your test program. ```javascript var t = require('tap') t.test(function one (t) { someSlowFunction(function () { t.pass('one worked') t.end() }) }) t.test(function two (t) { someSlowFunction(function () { t.pass('two worked') t.end() }) }) t.test(function three (t) { someSlowFunction(function () { t.pass('three worked') t.end() }) }) ``` That produces this output: ```tap TAP version 13 # Subtest: one ok 1 - one worked 1..1 ok 1 - one # time=283.987ms # Subtest: two ok 1 - two worked 1..1 ok 2 - two # time=352.492ms # Subtest: three ok 1 - three worked 1..1 ok 3 - three # time=313.015ms 1..3 # time=957.096ms ``` If we update our test function to add `t.jobs = 3`, then the output looks like this instead: ```tap TAP version 13 ok 1 - one # time=215.87ms { ok 1 - one worked 1..1 } ok 2 - two # time=97.694ms { ok 1 - two worked 1..1 } ok 3 - three # time=374.099ms { ok 1 - three worked 1..1 } 1..3 # time=382.468ms ``` Each test still takes a few hundred ms, but the overall time is way down. Also, they're using the more streamlined `buffered` subtest style, so that they can run in parallel. ## Caveats about Parallel Tests Parallelism is not a magic sauce that makes everything go fast. It's a good fit when your test spends a lot of time waiting in sleep mode (for example, waiting for I/O to complete), or if you have lots of CPUs on your computer. But if your tests are on-CPU most of the time, then there's often little benefit to running more of them than you have CPUs available. Parallel testing also means that your tests have to be written in an independent way. They can't depend on being run in a given order, which means it's a bad idea to have them share pretty much _any_ state at all. Experiment with where in your test suite it makes sense to throw a little bit of parallelism. node-tap-12.0.1/docs/promises/000077500000000000000000000000001327737073000161045ustar00rootroot00000000000000node-tap-12.0.1/docs/promises/index.md000066400000000000000000000071121327737073000175360ustar00rootroot00000000000000--- layout: layout title: Promises --- # Promises The `t.test()`, `t.spawn()` and `t.stdin()` methods all return a Promise which resolves to the `t` object once the child test, process, or input stream is done. (Note that the returned Promise does *not* resolve to the *child* object, because the child is already ended when control returns to the parent.) Additionally, if the function passed to `t.test()` *returns* a Promise, then the child test will be ended when the Promise resolves, or failed when it is rejected. These two features together mean that you can string together Promise chains in your tests, if that's a thing you're into. If you do use a lot of Promises to chain your tests in a long declarative list, it's a good idea to put `.catch(t.threw)` at the end, so that any unhandled rejections will be bubbled up to the top level handler rather than being ignored or reported in a less helpful manner. Here is an example: ```javascript var t = require('tap') t.test('get thing', function (t) { return getSomeThing().then(function (result) { return t.test('check result', function (t) { t.equal(result.foo, 'bar') t.end() }) }) }).then(function (t) { return getTwoThings().then(function (things) { return t.test('the things', function (t) { t.equal(things.length, 2) return makeSomeOtherPromise() }) }).then(function (otherPromiseResult) { return t.test('check other promise thing', function (t) { t.equal(otherPromiseResult, 7, 'it should be seven') t.end() }) }) }).catch(t.threw) ``` If this sort of style offends you, you are welcome to ignore it. It's not mandatory. If you want to pass Promises to [assertions](/asserts/) and have them auto-resolve, then check out [tapromise](http://npm.im/tapromise). ## Rejected promise To verify that a promise is rejected, you can use the [`t.rejects()`](/asserts/#trejectspromise--fn-expectederror-message-extra) function. ## `async`/`await` Because `async` functions return a Promise, you can use them out of the box with node-tap. If you pass an `async` function as the `t.test()` callback, then tap will detect the promise return and move onto the next test once the async function has completely resolved. The above example could be written like this: ```js var t = require('tap') t.test('get thing', async function (t) { var result = await getSomeThing() await t.test('check result', function (t) { t.equal(result.foo, 'bar') t.end() }) }).then(async function (t) { var things = await getTwoThings() var otherPromiseResult = await t.test('the things', function (t) { t.equal(things.length, 2) return makeSomeOtherPromise() }) await t.test('check other promise thing', function (t) { t.equal(otherPromiseResult, 7, 'it should be seven') t.end() }) }).catch(t.threw) ``` Because subtests return promises, you can also `await` them to do things in between subtests. However, this requires a top-level async function. For example: ```js var t = require('tap') async function main () { await t.test('get thing', function (t) { return getSomeThing().then(function (result) { return t.test('check result', function (t) { t.equal(result.foo, 'bar') t.end() }) }) }) var things = await getTwoThings() var otherPromiseResult = await t.test('got two things', function (t) { t.equal(things.length, 2) return makeSomeOtherPromise() }) await t.test('check other promise thing', function (t) { t.equal(otherPromiseResult, 7, 'it should be seven') t.end() }) console.log('tests are all done!') } main() ``` node-tap-12.0.1/docs/reporting/000077500000000000000000000000001327737073000162545ustar00rootroot00000000000000node-tap-12.0.1/docs/reporting/index.md000066400000000000000000000032271327737073000177110ustar00rootroot00000000000000--- layout: layout title: Reporting --- # Reporting Tests can be reported in a variety of different ways. When you run a test script directly, it'll always output [TAP](/tap-format/). The tap runner will interpret this output, and can format it in a variety of different ways. These are done programmatically using the [tap-mocha-reporter](http://npm.im/tap-mocha-reporter) module, which ports many of the report styles built into [mocha](http://mochajs.org/#reporters). You can specify a reporter using the `--reporter` or `-R` argument. The following options are available: - classic The default when stdout is a terminal. Show a summary of each test file being run, along with reporting each failure and pending test. - tap Just the raw TAP. Default when stdout is not a terminal. - doc Output hierarchical HTML. - dot Output a dot for each pass and failure. - dump Mostly for debugging tap-mocha-reporter, dumping out the TAP output and the way that its being interpreted. - json Output results in one big JSON object. - jsonstream Output results as a stream of `\n`-delimited JSON. - landing A unicode airplane that lands on your terminal. - list List out each test as it's run. - markdown Hierarchical markdown output with a table of contents. - min Just the post-test summary of failures and test count. - nyan A magical cat who is also a toaster pastry. - progress A progress bar. - silent Output absolutely nothing - spec Output based on rspec, with hierarchical indentation and unicode red and green checks and X's. - xunit XML output popular in .NET land. node-tap-12.0.1/docs/snapshots/000077500000000000000000000000001327737073000162655ustar00rootroot00000000000000node-tap-12.0.1/docs/snapshots/index.md000066400000000000000000000105761327737073000177270ustar00rootroot00000000000000--- layout: layout title: Testing with Snapshots --- # Testing with Snapshots As of version 11, tap supports saving and then comparing against "snapshot" strings. This is a powerful technique for testing programs that generate output, but it comes with some caveats. ## Basics of Output Testing Consider a test program like this: ```javascript module.exports = function (tag, contents) { return '<' + tag + '>' + contents + '' } ``` We might have a test like this: ```javascript const t = require('tap') const tagger = require('./index.js') t.equal(tagger('tagName', 'content'), 'content') ``` This is good for a couple of reasons: 1. It's clear reading our test what the expected output is. 2. We're unlikely to create a test without thinking carefully about what _exactly_ it's testing. However, managing strings like this can become extremely tedious, especially in cases where the output is long, or there are many cases to test. If we make an _intentional_ change to the output, then we need to manually update a large number of large strings, scattered throughout the test suite. The inevitable result is that we either make the tests less comprehensive, or even worse, treat some as "known failures". ## Testing Output with Snapshots We could also write our test file like this: ```javascript const t = require('tap') const tagger = require('./index.js') t.matchSnapshot(tagger('tagName', 'content'), 'output') ``` But wait, where is the expected output? To create the snapshot file, we run this command: ``` $ TAP_SNAPSHOT=1 tap test.js test.js ............................................... 1/1 total ................................................. 1/1 1 passing (207.826ms) ok ``` By setting `TAP_SNAPSHOT` in the environment, we tell tap to write the output to a special file, and treat the assertion as automatically passing. The generated file is designed to be human-readable, but you should not edit it directly. $ cat tap-snapshots/test.js-TAP.test.js /* 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.js TAP > output 1`] = ` content The filename is derived from the name of the test file. The headings of each string output are based on the names of your tests and assertions, and given a numeric index to handle collisions. ## Snapshotting non-Strings If the argument passed to `t.matchSnapshot()` isn't a string, then it will be converted to a string using Node.js's `util.inspect`. This is typically pretty easy for humans to understand, but of course if you prefer to use `JSON.stringify` or something else, you can do so easily enough. ## Caveats ### Track Changes **Important: you should check the snapshot file into source control!** When there are changes to it, inspect the diff and make sure that nothing unexpected happened to change your output. If you don't check this file into source control, then a significant part of your test is not checked in. This prevents people from collaborating on your project. If you accept changes to it without care, then you can obscure unintended changes. (Though, even if this happens, `git bisect` can track down the source of the change quite quickly, so it's not the end of the world if there are occasional mistakes.) ### Strip Variables from Output If your output includes data that is known to change from one run to the next, then these changes should be stripped before matching against a snapshot. This includes process IDs, time stamps, and many other system details. Consider this function: ```javascript function msgTime (msg) { return msg + ' time=' + Date.now() } ``` Since the output will obviously be slightly different every time the function is tested, we need to strip out the time value. ```javascript const t = require('tap') function clean (output) { return output.replace(/ time=[0-9]+$/g, ' time={time}') } const output = msgTime('this is a test') t.matchSnapshot(clean(output), 'add timestamp to message') ``` When run with `TAP_SNAPSHOT=1`, it generates this snapshot file: ```javascript exports[`test.js TAP > add timestamp to message 1`] = ` this is a test time={time} ` ``` node-tap-12.0.1/docs/static/000077500000000000000000000000001327737073000155325ustar00rootroot00000000000000node-tap-12.0.1/docs/static/tapjs.png000066400000000000000000001576221327737073000173760ustar00rootroot00000000000000PNG  IHDRXsRGB pHYs  &iTXtXML:com.adobe.xmp 2 5 72 1 72 200 1 200 2016-01-03T10:01:27 Pixelmator 3.4.2 ML@IDATxܝ]Wu-hHVln\ћ) %$!$pBHyB C %` rdu4)n{ߞYѝ;-9ګrR'^f/>5u_O{'\yy{^W2>$#3N'yw~i&.>ΛxdYqd,Ŕu2zʥӖ8zy]I끾x^kJqTol~3%C._.o?WrzH[i]z*mW߸JC\2W.O܎r߯Ҕ)*|!)7iTEx['UJ=TJ) 3ŗjf*+luc/MVx{.b͟Pu-+-o(pzJT.fGͭߪ尥g@F`3o/LYDcelB0eB*N3{kkrkgRB|:{ՊUYߗnN=S~`n =/9,E.ӝ]Yh[~›,?56HTUz(QD;R҂L)Q RZ]J([RFZ)\۾ox26^ޤHL}Ș اNݫr٣Up6h:f[?v$U_gy̓k2Yfy*gdfGQ7uYy~} Y>yS?=yҜ (bN%]A!+E?7G>-}w[oWhg,=}Cs:6g#gox?$x}^V|:PO~xz\ BN40Cw]w _fz{~Pdsr⸋o6z?{ ӥ/Erx!g1bhSTmcc\y\k}b'}جVRޡSQSP?1 /@π?HT_62.]_.N{gS`fd%j/ 7FN$7lq?@|ВWo^\{q Փ[(A #u,cǮ o+Jw~I$jʪ!Yn%JU2QpwUڬ"5"p?B R5*lYbچוͶ#8:|ަ8NEYgZi%.׸ݥ^>^jy?xqg*@tS6\*p\ q:|_yU~m3fLh̪Vm)/ċ/}y;i:zq6 a.P>8pWUUt6[W8on/lИ]TȹP1qG(_x%*"qH_# iD 5}  Cp---`[~Pon9לPg8j!R ?ncc^?lkZ9zom555yf{okmXDuΨUK֍CCNǭ R\$8_A݇YA@|+_i;:z|bduG+f0XšJ*_:lRFs/ . 5-Dq[Lq7CńJˈٿή8ֆ:H7_H 'uuI3 kؚ˃Jy1:}&4mmm&8n~#'NEH ~~:-Z;>hGi7l|3m֭v7ۥ/sopҼ3h&򐟚;t.n{|NIxͫ^eMM*`__o;_k[Ė66G*up=yҞx᠊E(|5(ŠHg9a6S^\W-poAJxa.I f3i'ڑR@Gj\ K!+ ʋt ܨ2 Uq1o}V%Ú4GRH 큲F]*B؞':Ҳk!Q1Oۿv창{5_~EIɽ"O|Svr+yGuUO/,@'Հ1I AK:sjtF\im"]؉Çmxۺu낛2 cEW~ \* N Cp 85>n"l=u* ]jp['rv맗d9>S嗫c2k%ٗ}V+ĥ;i$Pv,3XKZ WP*G)?Cfri% <&|NH´p[&aHgمUY,@2M۵k$a]]]Ƕɟ5P7i{g/yKBzjl(6 `̶1\<`r_I@Ȏ=?A!re$}+H20<$yޯ^uQ6~WOWXzuп/>ґ;/Bpn$=G91 ,H)lR~X; x7ۛ&۴iS<oV{skۿT|nK_Ҡw( :ԠGEk/n߾=4{{'lwHZȏ 6$ݷxąq{溧\ UVӟU/i$)v|Hߛo,&+Li-75ɴZ\i L}7Wv k| cT~Inz{4R>6ٵd(__llPE*+2 ),_@ R꫃Gf ҼE/*P >܃i %s||AJ *K| x=O-~v!t0򲼾^NtHv s!{^hHƜ'C]yyc r q@0́ _$ xKrmJ-@_jXP&{sc??x{AW//_8b t@z\|qɎzV+ H q?sPp?97Y?{=~xM2-te So|W̸?8:wqhAz}w#0UsvOO5\~,^/| X|mi{ g<Az(^q~\_zb_˷@rW.ʻ{Jzt Ձ1]Ϗz=Y6RΌC`\+,fÏ"1!CrJ($(.Z$x/UH!E|ӟ{׾,p$/xdْZo+׾t/L>3~Y־+onͶm5z4y ct⡢98 *F7DEa >!4cpQܣO>vG"#p ^~2𼞞yre;O P`ί^_!&PQ<0,x8oƾ/ /Ӟ-F 4]3:΍T"')~3fr~闂7nI e !l ڟ*T1lmo gַ:!CuuKՈ[ht.ypK;bx9< 99bb`cQ%c$.mzt DF$=}`@?| { v%N?Wq dg>c_ׂj)f q  88ofy䐳g#+Gi?&=GυT!h&lD vZRǏ Ukì^z{NLJ[l * |pO>/ axx`I׭e)d _̴ : >\ټ IY+Ox!-eHR.˕xâ{}Q!..+~{^O3:LH \ˁ8i3{O⠏K Vpu˥S$ā>y RZ΁]0>{r1@s3-Dq.=fCi166.{BB #ţnÅCp-!`P~Hϴw H@\2W< ^Di>B9˽yZ|0 O^@@>q@FrIuS/-W8]{OmZ7%mAMg-NG T-F[%ݾ/Pn=c>뭖mEQ|CCANfu;'8$߬((`TAb04o=J?'G6 EtvvNaCP<i۷o$<!$&@&tZ'{GÑZeF!8] -sWf XF8/}Nxۃsvc!L/r1&7gƄC<#N|L,QFs c~렆1ۍ݀d*86,Hϴ^Vm7tS'7>P`{GgQT8l스z$RY-P\:B@|'x@g?W`0*D0G20=$a\AJ#}j /\ /AM|)HĆ9c)@=Dsgoy;7'?mA^'8LL=Q :F+VXgy Z @̔v. dnYO^ bW\yEJOI,Pa2|Ƅ 03Q$_bI2*o}k@vwq[Ǖ&_|90S$T i2`0yG߽^v%*LzqA/@m8ߗzGvi; a; կ%xW0CPH.!T/.iuW_g}kgPbi[qˠsĪVIbmrFU3H  k@`- Hhe 7{2 "28_@g|*V4p$<xW5e3ДSIp䠝0 M^%^`6yݮb9i Tƌp0n._.0~ &c 3#?mOŢr)rQ&NByf7gQG>O'?2Vk@@{S8PGgf].3%OX1!$*/. 4ujH*P+>!@eP23Hgggx ѕbB` '_?k@H[,q8k{LSIZ !A|  DL3=K&ӓ]ca,ߟ1&Pfrv -#ة0 YzV > 6 x#a,Qρjx\+ H&~]I@%QBu`|)Rf Ŷ]%Hp4xA$:Ac+?{[nց<*V$C^R!FJOH$G̼b`Ap$@VD'7"Q &T ĕr@1#!$y.n@.4G%s/gI*VR!ݔO= 0Õ  l }z*V8}>pfw8N6#m@dDd㳟lp_)iلaR88jɌ?y'?`α"  0gPvܥxVƎ}cH2rMZ^tY/V(bqFuH֋+ "i(N [ @nyAʠ b ,K(ZH2A:$ - >~w1C 0 /"h1A 9e}"_%!]jH9{Ow1׸,+ïOT H`PU`F']L@^7}%} -L{oc!5 7Hug"iQ(pG ? g.x-ցG "=8Z 7e2H.^-iHdA@Hk+,3Nԡ#R'Ex刖EჂ: UW(G,ЌϏ~D._"BPe/{YA@~0&\@`+ |s0WA< >B*vpdZ;Љ*&ow0(bJ=.1@>\CH$UN>H&#&J}&`" Ў ={Q>,\Eɲ |b'y璅>kR^ ɁT@҃@Y|q' Z(FURH4Z < nK[iVS.W-V $SZ 3e2:&c8`R`=gx 0@ ^)@G D+AtB<7Miآ ) -T2 {.W8Av^u \W# ODrN'R'C\{:B8Bp0^5wh8VD/>˜c30l0-Π3Hz2In'O54fM?sxµ zʼIض \puTp ~H~94Ee$p 8 Ȁ !2n`K4F=$H  .eP ӈn8->  r$%$h\4b/rW:8iKry*-Hc8|p^,+YC\}HaEaTf~S+*Ɠb1+^'T!/C]ԃ: 0LZC@|xVe?q+YΪ6Wo @.ʋ%؜-%L-3H &[4`P6΀%p tkpNC$8Pxnҡz!mhr).6P' 3#%CCӾ-߯rt$Z &T00B$!*_#ےP`,Lw2*t(h#3E gţq[҈Xg: ycȳ Ao p\vp:Gd !C-CGHE Q~~,`LW@ ^' ~M6Cli b2J=q`< 2  %*6Z00H00B=p SƟ%H&0gAyf_ng E >g 7-03?R9! 7F1\0] pB aGl"Z.HҰGMM!2 bBaB8Bz<"wS?\G; &noH a#)yxw)!쟸/WOaLó .i/' 5 fZ vT2 nܶ~# +'0PW7,9o" tH#LLƑS.KkR,]dch8;RA@5,7)HEEmK>)8G\OD4i%D`q;|kl[zL;s\\iIԕLRZ@vB:t ->ncmĦ05I08X83@zq[A[ /\ r%Hj'SIP?^R< Ҟ#'L;R9S  pED&ыZH391IA- a0Psk$B\rqp3q'Bil fr 8߹TDs\Gߓ1G7HIܭYP~?AʰDjQʄ#&͔Zθ #6!?`ϤsMP'| v)ܿ4z(yAˀde$n5T?KKri(}^_I璃^~ 8A^L^~.Ӂ0 ,`xHmNF78dAzh;_~oSq] /FO9PAbLqPqT-5X䀰X7(1\!neAHd/ӯ C$~8exZsR.1'D{Oi=i=nW`$D&n|@͏uojjWX""x5i/{OG_zIП |' .큇 r$0 yM\ =x|2=Y!|~x_###~xoI^8>'Mvy'騟b{atL 2HT'lƖ4E'? b.@U D{i8 &t%>̐2фڅ$U1?\Is1I^Iޓw{s2 .&,@h?qP.ZȁGGx5ϸ<]\:_H.~.we@bq"yԑ9pE`;pO+iLG|o3\Y$.O2;yN:ăE?M.0'؇5.w8oņEZ|]l+\Ax\qaKŝrx/wˋy#9W. 1~- |bK b3àBpYBp,Etdsm_O1^IH:A>0Xbzs_|+~E `]l{p !6 |Ph܇uŶ0|xM MLodRN(w,>;sh.7 } [:HVBv/[vn€@?oK IX:L9u~b "+A}75>W\/~ ńHQd9}>]p aF> ` 1H%u񫤌y ,u@dujttD>S4vs*}uujԣAKKBR Vȧr֪}r rLTN mВLAknT֖-\GGMMmV,ؠ9dC\jq;9[*aG`9/* dQi3DGi?u!Q5>%Xi9"/^+Ym5r./ZJx0!בR`x00m` tr]8),@=n5kVk$BeT7XC>Vjcy:omT\u&`\.]%<Ҏmr_:g +ox}J)PJtJ1<2`96=!#[x{7e9s˟zg/%GGVADz~{ez2,hff"p'~DY=gDPGtmpۼqZn-M?0d#Btz͡=Z=m!ikʉpoL*:'Q_RL_YGΝBܨN$a&l@GNMZЈ|:m-wZS*>Oi'-GS\8Ŵ)SFut聩+]L+,O_NXSm6Y#JMRzޯyLbF@GP&:r\O2?e #c=I^{xQ)D:DAߔh]Rs&kklLq"65b$d)59Ni;USQq5V`ICड़e9HU!U-O-UVI#r hlZgnI NҌẾ#w0BD#A0(RC\S ޞZ1s}`jP3OՙG5?4 s67HZQsE#`)5x¯̽L~66M}G4{>kTejەOF=!nIVc6&jrDOndY*ki$2l$%F!SzN[-%&uk0OX댸YSlF}ˣ-:eu׬|i:sIGa _v}U-IKYlX >z.d<3QݰaC}vGźzw6ly-XfKE OltydsP⨖X{ܓmRp/ʶ+ʾ()ݩ~} 47iC"xO7L[{cF_A|JceS Rf::Ƴ vRD5VKOkpZykmb:%^g-mE_{'䊾[ Dٛ`۾}{#X /&,oNa(1yi,Pe+ S>3^Lt5@HłzO~oAC#z|w>xȑ#!cwN2Ul%b~U㣖rX J[J*& O[M^; VG3=NɥS;ۀK ʦdO5UX->#u,;|XN5)ž8'iچI2DXm-՗8#BONr 1C Eo{"eˏSN\l %of@hʤ Qu!Οm0\G{eJ|2z]_ڤڴWdlb^}#,=)15aimA@t2Z7飨grv\dO&ҚljOm˗Y~\SX˪5c4'sql:R6Tjl;HUAkXX_?G2uﴗӸ7INAt k߀OHON4rC9Ue<+Aʼ 5_xyTzkG~@|ގr=Հ?ւ kC=딵6-׽G Ϭ#e BM-P 7MZՐNfZ?HDƹ8dPh)})#mMZ,8xzGe8/O[cʵD'D˰"I\AZ,-P/uA/faҞi@gܥ5Ko+37DD՛zPd<`ǏӾ~3Cn%#B0ak\&_lq^8Gy}(n@ ߫OYd̗8p5qϒ1!}2xG\"6.kqK( UW iSB&ɒNT<[*b>YTiY&6 M[lt 5J7A-=DZ5RF&uT Ai}ViBZTw4RצsCMm׺4686"t[Z:&AwN<ir}]J9&8z'~ܽû%]r T\CCrӆFӶujۨ%[|R-e8'+7mr|>6& iJ=5;IҐn\Kǥ.R MVJI)jdj&{TT !iRf (=i,U/P@j* s(%ǃUՆڬ5U$rRJbm@RS9Y&}\n\">-Gb^8$}#|(C @IDAT\>b+$sEk.!$R..yKq\!0 mrdX?9em^h\ޖMi>W/ΦZ)MK+ssB - 'H*L٘UvZ64e"(-+xG7Y:uZ(ըJ.v-u*}DtuSaF^ړ$MɎHBQWKvR!|^cU!b҇yZkqLRj\KaZZ,V%KNj.MmRйd_'v?j7?ق0_5W>f1.9^I>{|\<d!.VWE`1sxn =U]8\=-zVԚ1-h:. 2!A:$G q77 Z/Ve}RdOj}vC `˿zv9: >q=sWs!Mc tp(.!A7Zr$وLUT{z9+Z*0CΕ~`mO=iKW]o^i@{ᔈB^(MM &1TFML)CRm!bdB$-fESJۖM)֡i83UԲ6h%q}MJFTVF}.; iTű0Ӯ)@@D#H*I?%`I%L|ŜVguU7'h4/ vPW5?`+8&RA,N; pN524(OF.\<+7jf֧DT뵈;( zZ{![!Y@jlzT_?RA!mZ(͹LUGfւݏہӲwZIcA2"#jVF֩]%_Y]1'ƃC +icϐ]s&[]?$h?ʆ_d?ruk9~nXjyUL8Kx.vgq/l63K"dV.V(\=_a+1OtۓZ}wm%O!iఐO{]G Y'sZ.Dݸ 6շKO \R:MjT@䴤Ckr7=%5k@D0HJihvdB 7lV%Դ`7v9#Ei cyy1KhiՒgB.h\Ѩ|&(EhR"i#-tA'4oixUT[JTmѾfo}lZHX$:+0.Iw~M9rKzW` 9SY,β# l(2.C`0)}6Ɏ}7̮\B+ogDs "&'OoY&@3DCrQ>yL-61Uyqhg_Db@{8e$+qa*mמtsOړqJybtf=X8@ zZv׉ۮGvkBm]JO֮2y[jJv w?z@CܹIr [LjFg[3h 2!䐖|o-YrMy9]#!pIxy8x.f }ͤb=ΜA.&8@{(x<.T2(B 9'VՖWKUAV˲6'HFh3RTrVivW5|vIte1y4QkFU[۠q|'ȡ˷\T~\Kr37{dD$Ꝗ12.ɂJRyX~eEԜpҮi.;N7!Wq]+=m[nVjuàvO >SE%SaLvؤTJ0@cyɴ;R DzI[.Hgߖ 5K P a!vR>rul$q`8fZۨɫ%jN34 H:_׷!er.ˍi- FFuA)[TV]yӯڶF!ܩ`8@(Î 8r )}fGOvoٔ9(H*8]۹T|B+d߼Y`S5aW%z[^,0edp_ R^XCs`8m7X{;\H5CTؚuv˭i+I 횩.4gaG}5CR vx+TԱqB" yt ~jQqbŢ6=}۬%:=I꠻mەk!iY$cM=ߜ=6 7dkڒֵ6w i6 >hbC|47]ly/'؎K=Us{Ԇc%R[ _N&8r*j+2WMMM__y~ybXM9z;U9@SOh7BR9VjJj4JݨwG.UV̎}uVjK'Vin底|dg,Sa(3whx$L5J͑irm`R#Aڗ)'qֶvm_[7K=͒w:#bAӶJmRu܏T"g=u0v% j?f$ԗDMA!k5=cLgJHQ U+$M2"'ũS][,ܸ0ӎm̶C Qc|d/k&8q1ey~eg\imjZuP`5>r%Jƽ%1] pɴ>DC. hiLxtN֬q!{ȫR3/_ EӯFknb/irn@s@RV(`uVHb~Ud kd@/C 9CFa!:HKHPŪW<SvVuuv6폗`J\$` mi[}C2C6Ak?Vٝd3L N q\J]F~Z32m:t|HREħIZ/LX6va6o@a"magӲM}/hzN_Ll'dY|లj@*sP '*r=HN* 8OGHU:|]fgNkii۶ifQǠy+HMeFMYG؛_%kZkᏉg5w9bpzgI6>mRVm|OKQ͝H˯yU6ʺ=$S1ޠC5w2IC ʶ)dgn>F9kաɣv}ث_BuFǖ곭ؑ%rBi9NEjy-+iz֪%aΆSTNcʖ}sM Lp$r).[IR2<~7|QsP<cIBN  T/](XaX "ih/#~q\ ~$,DHw|h`Ukj ϖ>նyCXhnAwVr0۔NuZ08)5 OgjfF*YuZ4bbh]h"ȺkẌpgMܹ{ѹRX.F]f'Eͭ:Ilu4 K6$[vKԞn3-RرZƢ%54ρLHar/_mA"iMEkNnQ{{̨>&^j9hCjbNsBRd K9K?8|q1M TŪXn's\6t( fA"ޏa@СjI/Ԇ6ȶ+V Q#T4Y.PaǙ>JEL-MB|}ar!koq<_!4`kIjي+tڈfȵ,eD)Ȧأ֯]jAU"ZeRV۾Rme\%CRO.aslDDc@Dq=iP;ZQ4A&WY֣:ŒW$5Xj2o`7&=FiIO$`VnN<)fr*|9Cl|x|y|%e#.*\ܢ $n$U0Wy2r啋#6Ng_◭qm-LgDmaܶHnq!:}D.VSXX4@m,r}c o%b~߫}tos@Z-.G;W+0mZR.Q+Wi}FܸNnX@ B;4hG?,iRk|MɫsZ!}wu!yo;v1-{ZWbXT Rڃ{栕cՕb Oh#Tq^߱ OI6F *(e8%[j~IPz?\Wsz|&_%->h+0oӈd\]~x/4~~nx <8^ǎjkf5wiz JeJ)6,`GJ\,l$ưeM}Cad^ Lѵ/եN7-#Tv}rdH۰ g&IGb^~TmEvwIj:}O,, L #g L!IH?υ齜J&r_qwk8q^x܎c'4-G@v͉K!$VdK(H,\ܵ*]Zctl6MdHL'k}~M% ?!lP-DdDkA(Os5yXs1(9bAʩB}( Vl|^GJ9=,g&a"Sͭh/2c0Bf35x '>g*_H$Vf更]mdWNzdFr,[Fjgkw+o2>e_u⍽ʒy0<^=qpt6r=h}khۢY浚Kк1dwTBڤSwܿ3|ǃ{9!OC\Zֲ:M2vB~IIB¶ຕl컖bh>H@*5۠k^~-s^%"z젼e}" qv "/m.l~Qk-4akndXGNH *`^R:fk ;`nEI.BuRZ$%J:0"ҨtfEX=_įYqoڕvPUV;| bIHVJ_;yǃ;ήo=;g.&0bz*.@/XȃJ .aϞ=a,ZF a#9ʇ8u֬\uS'Vڗ:F 3<5H2sZTGY-cnF{@3s9gC-Zܸa2H jށ>lB)lzq"x$]岵R Dtb. .3!G?bSRݘkko ]')h[[DIJ;:Ak$ CD6d/Hw֦^= [5amu,m AKV6m\*8PNHbp~nHgz aHV,–$;v SN"Y-Yؗh$H @Ŀ0 70AJĄ5r{4`l |SIjUuN2q Du:6!BgYF<ځL֋+T_fi. ?yY4}jͩ/Y$#^C{Bd)I>]0䜖U*]HZA Bj[.ggTZաVĮCB*1)2 rBTPϴ˽5!kVyN=I rgӦᘭ^*ԣ>!"9`:ex^Y+;$cϼW#q|:.6,@Pڥ3\ZN18jpXjI;_@HqD>%ufL.ivؠ}`^k䝑"&֜Gof嫓ꁗJ.\辣ȣ%ͨaմVuZdjʧ> ]_6Li V0aƲ3_]C^;?*դǦ։zc DH{Vb#lXiڤN َ{e#U}Z+FoJqӷAw8ubQ, L' ɆI^-ߠY=K9"nm 6I9XR j?:-bjzn{߶|#ؐ7?rfNǢ P&6Z,es!p8T! gN5& gV_zf39rGzbޑ3<8Oǵ\gzHÇQg4Z-U^6!Ckn͑dŁi#@ UBQM?ңrJ:u\PmN'<SyttTcʝl=AsżeF_KMvߎZo62>D#;OUYvEX+2(x 1۹W; cQӚ%} .l#IsڶmaLZ6H1}?G- &}$|B2hb:lz-v:wڎA?F6#̓mf-wKb;G).X ZLج1' [;ݼ~--uY|!qC'}.;ʻd^= ..ۥ]Nh_vNҰ@IVؿd0]/C68W)! #D ~ r)M,jn^dDyqlarTyyJ:vk$R_"oZ`7<]!"{xR*xP'׭gpzP43F6;yfC-NBҧݤ21vC2)˜u.e7o>iWhqzzpV>3vA )q!gJmQ~9H5Ҷsʶ^m2?$?i㟶Q}R[g<8 cg FR#n90AR#Ք{xO,hN$mu64yϽ78riMba }B^)-5?~Tc:k؝|>b0M|͵OꆖE Útrp-*Dk9y<@ºeKìtZ^Zf2$GT-dnE^wJgϋhlP\C#%{KjyϮO}鈖/SjܧSD)ED\.`tjG;%2`\pق(sRY`:WD0i1d`yǵN}OdݨT`޾,{WD2)[@  QxP/ aN!f_AIن{5YUv惶OI.?GImOP5#eG G;*<)~Q ^.ǬCSSvu@1Ns?yoD Lm-SZ k'(X/6wt& dcujZ`R;Fd!8bT[6TYBĒ$I^r8eϒ ˎ+}4g߼gJZZ0/*1߅Txt'i=X>)ꬽ i}vܤ<3\lf8q}3#w6 Dq҃b1Ie:|Ar"<d=>z4q^IqD@;],if9Kz-˲۱)R@%BB? e]Xڲa$w'Nu8MbɖdIvvOϝ;sGyڞX]`+?.'1GuR[@{GR.":ZDݢO$ K49CNrOȜ8IbbR@EbV ؜TGd5#3C3۲-bVZc/B:()U8l gI !$dߢQ5Ӌ7!zC7;y_ut( b$&WAx``ԋi ER{.{.;gQD6YVv̐0!hm3:[w*O=D+K&~p˖}ˡCї~xėNό||6HX=@ !,Yj1>O@K݊0"~\f_h8b]o[6s` Hݐ*q0%Pϒ]Oj ST%ɩW43D$$()< 9*V.)oԅ'ٞOLl3(lU1ǥi}FR$~NW\XXg )wkUqX:_NIԷc ̙mzGȸ^vۼCZhCg3 .M&,Uٗ4vk{ߍr.6j<ƿ`id3*mmO*LyFFoʩ]]Q!M(%  jp"mƟ|) ه|FYʂEs0oj( €T2kM.*)ĵR.ۅg;= zĘ(sLKlVi\Vj*SU6d(ӳ˘fI۝4b;k%ȑ~A0ܪ,;Mߪ ӸaRBd)E]="/0]c?m~؎)|? JpU@ƃ>)E5~x/|.9מ^7*kC!dG i[h)tq @vP8[uIH@ . 7S41\SM^S}vޢm'mAPCmd+2H]+gFg0DcW_ 6$r6za) *^룒p v'S'#ϻF `3=O_:Bq?.Ooٙ7(DH ,r(V1N> IʠM5nUTegr̝_d_¶mޫ<y** e$>I1Rvx&AhU&SG -DHhI 2*QX'#E|aEpvmZK?1d*%i¦65HUU?|]8sVVA|E) RmE:+n씧bH&9}u^[w72~y_;2%d(pa^ahVt_tw\T\{ޕZTgfuLArQ[MMM 3z*Il-r(qOhbyv pۄ](BI䘽>i;eѡ3.IIrn^+GD(څE@37ە\&9UuH)/4˞ޖI4ʱm7\OU{l鋢.Aݑ :`kVuVVnkW}Z=ID!ò!lr P%`1o~GϏr ÊD\mD5UJ x^ D"**Yޥ?TE1d[[NҼb@ե3 :ZRJ:_R:*ͱhGI'}UFj1IbSe--bQ~B^Vw@Iz_V(-uUhlR+ DE!;c~s_kĦ [k{;7b׬Bmq%lD{緶ƔjY<e$f/S] HvrLr x!":3=+_]"<ˏ$Nt#/(1Bo!ogUVV ^9H*hu1: r%ج{}n2,4ZE"gxnHrF$%y#&#v%qc# yҰC&7 y"Uۢ3?av(TQHZ*ƓUjh/K [f'JwK_ }lߒZ'beyg_5F!*j&d;SH㋋v#@N!A +&$|r<-e4==b5'J|+CB?@ cpD6qșTO9Qjd#rL]f ۴J R<e!4э6sJw"uZeea>MlY3)!-:aVR QbhER{4+%JYKNSNTPz|]8x-}?aoR;P3q{ޤ'ԉS8p]-"uON`;Y9_Qyy2=S2RfH&V w Po$m7&H[ Ɯ%C~hmƄ](qT&YbFu +s;o=8.#",A-U:ɪ6SDXW(w?As7cxeMM}~V]ƋCQ7j~p;OO\=5VàgԤ(D )3J+TOt܂H&ݲgB+!9hZ%TO"#QP^H.ȩݐD^2ob'^ֽ}Qu'{a$(_ȫ=@LR>8_H삳i(NGi^$ $ p iKx BҫoQIѶbI-#|r lm[w9Qjȅvx+E?;Ɋ ɗ D'" j*=}Vyoۯ ˀ{ 筗j/zz4AwOqm"6ZW^3c|³̚=^^z墚1Ot5XZp ϴښFY8J>DbiB֊ҦlReJ-Pf\&(O*+dJjT_Bم h$i1o:lzm߲7_ooBWfʜhSstJN?Hڜ]Zl$&j H3% ,' {nH:^Hª"| d]}_{a )T9ZbD5ɞY7v >ہ"`X( %>pӹ!uM=F] qf_ ~bioït#Ug`~?wbq !qzŨkwB& )Fc#ܽsOMR,4@02G b?''N+t}*C=݀Rs#>d{UͶk4VV~LV$Ĝf;oy5~vivH$/7 3:!Ňޙ(۸#׶) ^Aczuc-]pIss_@E#Qx0]+1V0) CZ͐t$1 ˱]~DI_4f%Jz{ꑵ֨ /$_B0!UF͉O kP]jQBF;54VItRLG"iL+Lv+x*h2':^k-.2+ӓ7dl8ꑨH̩o9_RV`XY@BzVIC.S, k&,4;"_S3'~b+^ust 2o9DjKfFgK'(_E"Q*]l4g*r(r] bڮUK ѻLQ<1Xȕ GnmSʸFeRwhVlr)NrL+ y'+kL60rv`g-zEf+PvT2)Pb DnTP]/,,Wbd(yN8A`K@|ϗkor4{y\drtgI ~P+buMdVk=I9v a8I2Gev p|\B `Wbr҅(<GH$99es "uvS3 6BE)37췒9 ,]$͸J™! ӄ'WX*3 쏙<>( EjQNjD`6#* !IZ{eI+*OH@(.v1{L^`Y0{1(OԱ ?H!R(MJ6# x9eE1V<_K @ЄiԐq(\yzZz(KM,1D8ۼ+6,VHo>)W:/JkʉRݣ ( 3Xv-gd`޼٭ HVw,p$50]'N׸wH.$T0Il]vBdxV' 9AA{e(KUZu~vi_٦0W 9)VR)raV1ncK&U* y ^E o7R?Ii9ʅ(ZKɔ&6􎵀d=Y6w&i$gf%YT)1Hte[ZI_rV^d۶Uݖľ(+ǶJThζ!kYkrlNy=*+M}֦;vx&mIYMP:f~D1擟Ah2AYjtȲc#!F-u sm j{:%Pȴ U&* M>.MKa Bw. š$oUt h;B@ dw-Aɰ?,2{Q0V41G6XwNGRRPͺI2KACDT9HNf6`klĉVRl3{*+PzOQ:IĴvQV=ON.)w鱞@AD_ Z)R4'MTJ*f.;rJw|[Ӕw}UpK%E(:S飫 d+GxV9sXuEN%0q,L/}HTT !eYd ˻RTyy[1F :'{p w~<8Y1#|?fe~?:Ͼ{㟋  L[&-ZCAzJc-=.9$ dRkşIBXiU_ӃVTk/Ys$ K),ZJQR LT` ʏ0`)3B - } V7T a|Ų,ʑrx%IC*+ʦaf,Cҧ"P_۝I ,)9 0w<$rv1!ft8(p!'{Iu! G4ί*<3N:Z_l/8Kۼo Ф{L%r:C<($79ҔHO]®6W0=G(oĨjs*CTő̅uX~Qv8lI%V]\ $dȬS|S$jԹ{(u\Fuҝ6]S6Y$[`K󬳷dԟၱGQa S$ɓ-?&+ UhEXׯwElޙE6)(e^ (Ab%҄BM{qꓑc< rѝZ0$! ..) 13IO"Y_h(O_g/^jR!(*{5MkCu3^=# &F;g)Ҏ :.'> 2u:;qPuWY\jIG(4& (OG?4: AX5PȑYX_ OI-l0}<A#\r3ܪt/(\L-Ux}ien&`<J#2|ec#UK=m"Ǻe֑";D4W:˦(=C%NY* sӢټ|;7?;99WrT8Y4AK$(jY H@JNKeEK>LOQc@l?G1tU5w5V=eMm,yWx1tx@*Br6^xo++>v,"?CF3rcyQF`@۷i ҹXhqA2w% ::ʶnł2ųE4L ;MꣶggÙ/X:6^&MA_*<[Z4'-o͘JfSDHWlb$Jֺ!A"ҐfEɆ S^d47yQ6VVn%V2;԰^&Smi$= L5z$pvy +-B#=T[}D3]E^:]Ig`;;I$}g1VYCpo'{ɯ e׺l./sqޟe3m_U,zOc<1^0,U,P(2'˪+Z~bm FS A1{tkwXbETaBVّ҇xaAr:i,?O}t [f̜ir=~j)y6qrٖi[wy55-k]sپ^umzqKP&%^JƎBrq˵Z0Zjhr穲RN0Rsڶ= (! dFtڣW 2QQ,G$i-MB`yK0?eg_PCZ82&M]64. ޹._gάOGvCĄ8zx63n $ƦZUM_l`A]wW͹=6DAb?A~4]1M6?Z8=H[߁]GO.^DQ=fUlj3<[:E~)cEEN5w~4YNX2[Q?ȱJ/ G PirKh{Y~Ǥ(W^\I*TU$I !>S+.(r$fVVҲeawmzū ZIO +s'QMj{Ugmc6s?>l;loEk VƓwf?x?q9r*}^fUwU\'@]B d^av4iUD(47a <<_W m9򪤤*̝3ö<ʪ&IdOrK.Sv[-S39T6F!w>&^1%kBT ҞK䞎aLKI{-'$AD=MeT9qA^W-?lVj56h\{Ƴ>/A}pD˿xSֺv%}v e:\'a?}W7Ï1*LQ{!{Q a3$m\ADxs\F<Ŗ%4-9sĴavnK!"OtzcjMĖ%%k#aX}ҶoRJOXZV2sCAh%)D٦5y\39P-ݏߏdI?f1*M~f `K8+f(n>@Py 4)#>xxAA"?4{R1{Θ.DY\jY={=.ӤUtxv^s2?pdL,zH#~'XopyLPnH doxŗC>ky"C2s ^2|Id'7Ve^h͜>M"N^t!Ҥt^ː_-N"[ pK:/4rD=xJqAb"tKL( ^"Xl"V4 B ;w~"cɼdnsUtuW܀OؕB+WZq,uMʜjۢN01|n˂~|Z` o?~?g=u}.H,DEbnPXXh+WtדOZuӂzGZ ~'(}c%vFd+,/ELzuA l;0&osyH&'7#'o$jy¡v؛.W2[4sInk Noc$ΘT-\0\Qo*xmh^ t7>sh uy Hꫯ:3[1-AyWp6k;~Y}Փm٥RgezDl:j7nMSR/kO 1@%}# 㘨v[VS4Gl!)@#qLFZHi[KX:!},+}#PWo( Y }"A*{Ҧɶ`(UFJ{ƃsx+H z&ptT0'x`}os\ އϛÿr]V)ن;)lLSet "'Ӑ }HZ~G)pH0]Ur$OҪx~ YaD߉cΐ{mir_GWuWnۿ*OJ cЌO!8D"xWqf[mۢTЅZ9&Tֿ# 1nB 7CӰ "]~`p?XOY]Lf`ާM+?.kIqVoRJ(E 8I\r˓#GV9 *]T?XtSS[+(dMYHd]K?L<~12'8GxYI6mKE"ٿ|6Y+!Jq|^}¿(EQN+WS j?ہ-\' 2P]ĝNs7?> ]^x‹\~NWTlC\ē,싞d~"bS\#=&gyщd-Eʐ©Ar(N(h5G)XiqNXdۥɓB@mkQ 9lwޑfb}-v@{  ~6%V˾G#VplbMHd.s ۚ^מ5[ҪLlWRi?aeB"sTuhܝC a|z$%d*KNbRAP%QGl[y] q;P2֊WXMs\þ՝mWdЈ)k ;ͷ9I6뵯gz}VEt/ JD0aoGN cɪ|f}w )&'\rK\[-qHLxxɸQO8)qqA>\o@atz7Ū!h"e\AJĮP^.A iMʡ-~lXfzݯnLg6G aԂאptV;?y.[iO\bG.Axp 8ì ܭ;(GnЫ44Y<ZK3gn϶ Kq'mm'C2+Qo޼_l+<28pN2x{i5(H8?oCw:/{&yQoA ҥK _]i&[ ;ҳ6TiiB1(#ΌgL,3H!%©!ֺeS+DФCϦ֐[TfSJc]}ë>y; {,\ ?[K6ɖϯF o2! |TVg\&k5VC)K#Cb*vF#4)=t *hhi@2crè^ ea5A*vgo=]6]'NwfEES"paَ|=HT&v[jPE > )W|^Re.g5q0i3B?ZБ Z(83pe8@ =zYx#c)vQ '82@I'(-+`drΟ {`3 LH }g|Q|10!xWNQAe`woÒ|啘mуɿtl^<|XqpM(JO݅x\Yfٹ2 Rx%%%Μiŷo<? ^k6ؓO? qJ5\ 8ſ )Ȉ`gYsz[+oT_ wrˬk">ԃ8a 9x ڕ?@J3] e {f*=q*~xQ S&E7TDTĬmzU.Ⳍ4\?Sb3ygh%}V>Exǹc$ \TT>ޢhO>}~2V.e b%9󐇞ʲX٭p!-t6#_ S5*n{IC̎@ӟ5A?13S` uRRx嗻ٙxݠ{ ~ox HA0F~,>VZmmw=-W]~M*y&\N|?{et> JOϸ,?}@30a&$LďSWᅢ=T+>E+vځ*R$*QT垥=^m'(k43^ьnW^xܞyͳ<.33ga>-{glO|)XIz, G2wBxs ؃>V ?[r 9x k* Wt'aVǎqߌ }ߍ%nChH\NzjGr{ Vp̮OzzeEt9w@D }aխX믙tLI'ٜ9;SSӾ{_XZ>u!Hkt)KmQHy*NG)8pvm=A\@`>"=2\g9~ = J~O}sș V;}Q׼˭ *H Ï+os%{'~*L $۾/SO3Jj죷ڕ!BW:?V+PQPp`Ga ~$Rr½rN/-#m/Y_~嚟H;R]t٘?'7Mn6̒ 'e@5'XǑ7?,| f)%B8+>_@wq7 I}=x~\=p\w$N;Eqşt۬*ǎ*e۔iǴdÿq3R\::e/uz6׆y{R AF]tooG۱$ŒIvmqF{uŦeldbɴH%8}m/<| ?wR!Gґowׇ/_s-ϲB-gOY"ҳ\+ޣvlzQZɵ]$q^#)N-'Cyq64~Dp;pޤ뾃|c?1\xhv& #0ꫯv$2zc&!@bp>}}8؎3ÏGz>c:6HP[~[Y"џ{>ce@i _ܱ5~XUMMJ¾M-FԐMput^ ^1=2,j6&TY;/}G1!B kGnћ>}}vHq; ~䳟C`a'oo~!u/>@Ͽg-_~>d_t r@v1صz,^|gS|$6;ix-/Q8ؘvtoő)!HEgK/ԑU ry@ZAwNċ?jr뭷T $V섞$(,m[o9 HφdHՆT_owp|HY9@7iQ!K=l7\`OrJ> Px &Ʒ伣BI=9% HE<*: fvݺuTA!YvZ{GdŶ} Mxs·<~fk cVu&Xxqkow?l"u"J';:·y΁ ~api>[b*W[Sf;or- <}adTxRN FWKSB ;cP; ] 5Dy}Y *{]A2V hXr fu ͷ`m n{7P?VW H3p<O]lŸp` e)=*IѤ~uoMMiG%w:=pƈ(2Y﷟46g%3Z2\vj_>W.s-e6՞;' ~vd3 K'VC裏7Mב8,H@{^{yZR / ro*eИ`b6GĨP6&E+Io}q] 2Ȉ$e{.O>~z$- m n(1 NNoX61  _L.$ }y_vKlNq~~iq.wؼ9l{=G_MsUz(7b@^}_u~{jSe_4yiB:S`(]Nie<:nj  g)sKGAB!Zf¼Ysd6|q^OPal he!={ Z8.f6i9Kc./hTXE*hF >A4M=ؾ)C= rd6wݥqIyjW=6B_/ 5~*[_*dJM@.gfdy?d!  Vv$u!HNefdXUժ򄼴 ?srtMLy2[Y]}W>a>6[.3F93b=7l::Ely4"}b>XY#E~iڹIf#`(}ˣ#&jPu45A@4ΣSϔqxIXگJ?:7wa~ (?;2{("\s-oq4,uB00&~) 6x?leseg}t& GH0oUohjs 3|0ATy'hss3CBot1kx M+ʼnɐ~> M += "C)p,V/~n2|v#vVvDFë̅oWQx֙kmlQeK%)8~!&n\ a\U 9 u `B kn r$\fVy9Z%+<Ky[XaAbX 1{ ?{gͮs=~jHg?}]8kmڛ-M c‚"X<"VPoS&S>gFz8:>lnf7WaT{d&BJ;) Jȗuo }?)(;HO*9.YVUs&geNq11%c38ܹ/ XMw&b(y{JRK&؟TWEzgL@uVAL֤hWx_ۼjo4j햓7Ofӝ&Dg@ϩ*t/,)[BpfxÙq<)s0.@̌LU cX5lkt22Nf0Q0~eL`.V-J,D55C2~/D[I:{u;ۡr >mafE VN+)fLg/(eDw;>6|brUŽt;Oa`,8B-;:x%PTkǑ^̿]w$)ꐢZbKxYE3.g?s$ r|C~vK٤}MVA|# {^}RYc]vQ00[P۝}-@  $Vf- <$tmQQ3uIup V75kHѡt"'(~g JCJ%ZYɓSa_9| &nMt+9f %]`NSZ4_9`p\a:ilt"OƊdP%cG̷d؏n},~eg7R"A BWۥ[oNW~Ļ-.j-hS3V(a;^u`vZ"{k|SK!Svf,,ZXB*f`_uA}5;5k8ȯ H) E@V *.t( (]w#@nh[*xr mia05#)ȩAv@v`g/(i~Bc*׬ܢr+vZ=p&ψC iVS'3zǟu@ IkAQm vw#AǃqAa_O#塚lHhQ8Rk^ܡ]G(턌^rfM,,nM>OXGxG}~W8R&UU7" d %P$R0^H3!ZrHVʑGzկYl)&!0R.jqOV@ tYˬZҥIBl%(4=TV)=ٿMLryOlUuY}╃naDT k4J-F$_9xUV.WP6Y$>Ba&>.rDYVPwJ?#ҽw4d/>YAb:|ŒXGU+ZVtA.u(K?0s.TltJ r/i&A*pBR|CZEݞދ$Q3Rlż(8Wp4 `TEó4)EY}HX|o>떑 )bR"!9B9)JPM$ҩ l5E vX *! }㿝~ sjhtn1iB<ں 4F-!߰ ~ (2==XҖNs 1 >g^஻rL;_&HUַ"n+nfge[DCZ@V!ɂl|P>g3&' w8x6AL;qK*[S\h^/ϓ!I5bÏÙIv9œ%ڿ$:iTZ5Y('@Ep.{:ɿҜaWYTYߤ!e:bu G6 TU,q B"hcMߑ>) w]x!1b0?d8A QqADfi<+ Thb1@Iu@Zj#h, H#Ɏ\eFmݘhg̈f UdTunb6laVM V0YRN^\\x1YaoS'٢y.$ klVI䷕;8D0!;XB !*_GG3O~'>A'?cA̛A"RO ͢\tEϑU +G>r 11CЦ`Dlx66Lri@|TjdT+;|sN[X!;%\⤃L>(fAʣRK-7;$Ag(:WJг; e%DK0؄s9vEu f*2B'Bȝ#\4>a}d\V]ng'4jqEIDAT,wr,QBӎxUdb^[:㉧W9o>30@DK—?4Z_y{Y=KVWuVVVc|YA"mRjM Cܺ>'2iD#HDˎ}&&ζwAqT&T&9֞n}B2x~uYfWD[tV*N|~bw*Qnxĸ`&Qid9L̆8z G̀Q.3Y8 r 'X.ݒtA*Hpu >ɳQ$H n-IVTغb.r$AF(VRV]x>uL# }D'.g7VlXTH4)>91wI[jQ8řٖ3qgl3W׽j6Un@gX\(Af'-.i03aW<H`[@RS`1E@ԧ>eV!&0 ̔~`~m5Z%-S99:qĝ^zy6H[%yb"w;P3#V`V\DH`}߰죪y'/c(larD~Ad"RgrLFsVKѠtمMH20َg!`# E/VJ"x.ґoM](ӽOȼAz?I+*)LP ۯI7kdu!TfiB 5l30Uu*a*+# ]}V&VYP'+ڷb7ɾ/;Kbg㞝{bO+F09љb^uE>MړU0AUV/>%SCtkhYid op 0 Gͪu : od 3_ɶd3Z쇿iw _@4.4ٖ.9ۯSŷ6PPLP/ec/#?j&}ƌ8KI29 Ʉ}vR~ _pS ' ;@ < =@L+c ʂ{+tV>(?L'=B8H :{2qǮӦN`W(1;?] SV7>vKE%,l¤EEt /ـ 3A HPfKx#6< ,܇)-ev:[|av兡̵{:y[ @M`Hr[b]E[ѫ2 LL+dSAܖf{m/!r'b5l@CsD#p~ц?)?<+ n1dGf 3}MR!KT;w!寈SSI:K7_;3+tu-j|UXv:fn $Nb |>Xɤ˘`켥vʏ6{D;i'>GH?)D?Xb{?s>pi؝,ާx: Iya\ĵH d `9`ٍgb" "9O^::bm%Vq8ΜQ#v3nܰ'3Q iN0tB z_E&3뻋-5 #Dꂄ5eNIg!_9*{XE ᨃ/N7eK[}mmjΝ"aR i-xd9]#>}sf:ˈ/9<{iK<I tH~| JgeL (t{mHQċl_-8X@*: 1dտ:109 EfHH$P+k=Tiir :lr2{&#!l9C^P-0ؾ @ lp.Gύ+WY۾76l1 gƬq7xǬ&'9Ϗr?C g5IؙJxsc}.D2c,oSN?ó~;GB& NtҐe;-6[Z F jr&`F/"X{=.^$|90]T8!,%HRв'kfَk,SxAx("q;A]s⁽>^T*^ szgL=R]㺿?s`sguYBl%Li]۵SV=jHIת-9GF`iI}4E.M5TxuMe=`YO('+x/LLL)..vM֊VVUw=L~aTz11( YAK\Y̊!Z7c@ P×U\e1H`b)bo[ms}l}ww2+=l1.앻*OfP4P<=rIb4&%F;$ b10Zz)@MHlW'8U}l}~ߟ|>g~>,ȱql&K*ڻ82|fvvKqsIE5NK"AJERVo !(< *H< HM1&u'q\k6|ߙz|Q'Yss?sϙGT0[|ry |r %Id#>Fv%7-7/xi;8i7fv(lz/ԚP-o%S<ޖcI$:!K^vb56ޗNyo@r&ZuC,_%ə0-Kjez*&!`CSu.ǬFd] ҆9-/Zfb()ShRЂ>Ӎo&x6Ab1RKZ5i2)? ;S\9ǿv>h!o2d!7^$q1pFAR.fd!mFӜd :*Z[\nwI)Y'՚īX 0%c$\hj;CûUhZ868@ݿGWvЛr5N)thVdчi^R码tte o~*m s X:l|+DI|!,۱S‚e5q}'(j]Ҭ mtyנhEɅZVbt*mFM`qIb$c^ E+v8Ǹ[q5 5p 5at@;Qt[ KXpinQ"|8.#.ǮT u'@ ƕEdHVJw`)j}yKtd1h0#L+a]qh_'sE?mBWGJd[ڡBghQ hW XxdU'3?`+ؐ 7m.}=|;NؕP}|΃=)aȽK78(3p\á׽<#=LQ'6Q#VF {xl9K0S\ 'l[ 4R Ə bZVv|xwu8ٙ6P-J21t1l9T5sh֌XU*,P.ە#r/gr62V&K RXܢ`WhzH1ScLq>y'3D"ƍd lцε֡4( ]ߘfۮ5BrA!*yK7 X.. 7YƜ~YDGDZ7gbWk-V@@(*5p:{s##a q '+6dF~Ȱ! DoWbgtz$vE7OowFwgهHe$ѽM-8ŋBRa4=ytS)mŲ BQJ':'x{`%HFΰϝ,Oœv;iP? 2+nn}D5 _.ͥ?@ts: +A_.ᓠ:ZYSL^a@~|k"9S6oG#i`?*fR[9DvkW9N"& VBTN"urò|D{>ʳo+sllh0@@߂`@Vϻ4DAMpEuq3 FՎ0n?ɟs1坪b~@u Ma`4yدu].4h6I]HtGhp5rF]T7L pk?]j,`W189r,U0!bɽzփA}`4].2k炐 9dSe鈯i 0nCg#k| 1 8!.p Tе&^B (iQ*w" XqH5m愫#JO/(~ӗ<~X$H9_$ӂj ܚf%.cRo 0D@i"4X B> &r);+utJެ6*jy_q++iB s9Lk٘x@Gt^!̋KՇ&C:ή[55.ݬT*p4IQ=ɥntr^Yn9rޏaȼ^ѽ{~ތyJE$ggNb.hRBofa sp}R/:Gasx.U!a U@m PҰ:aU@2 rn*k:<ǟ)Y#'uvc8QHy)/-ڜTQzҲ#aay夌tI GwKz/ΤڰgJa/j=]ԏ+.]O/˙W9LCwϏ'*g#w5qU٨r#[HS/72d _6D|p GbYӎF>*$>j6}_ˢ7ZQ1Eg-?Woȵ>s,ug3{zPaCpQ- UĒA|x,_U$< .٫+W+_v9&՘` comment, followed by the child TAP stream indented by 4 spaces, and finished with a test point that indicates the passing status of the stream as a whole. "Buffered" subtest start with a test point indicating the status of the group, and the indented child stream is wrapped in `{}` braces. It's called "buffered" because the entire child stream has to be parsed before the summary test point can be generated. The summary test point ensures that TAP consumers that ignore indented lines will at least report on the passing status based on the summary. ```tap 1..2 # Subtest: not buffered ok 1 - each line just printed as it comes ok 2 - no time to wait! 1..2 ok 1 - not buffered ok 2 - buffered { 1..3 ok 1 - this test is buffered ok 2 - so all the test points had to be parsed ok 3 - before success could be reported } ``` Directives on buffered subtests can go either before or after the `{` character. When a buffered subtest has diagnostics, the `{` goes on the line by itself after the yaml block. ```tap 1..2 ok 1 - usually would not even run this # TODO { ok 1 - but here we are anyway ok 2 - todo'ing away 1..2 } ok 2 - a very diagnostic subtest # time=33ms --- this: is fine i: am ok with the way things are proceeding ... { 1..1 ok 1 - whatever } ``` The most common way to run subtests is via `t.test(...)`. See [Subtests](/subtests/) for more info. ## Pragma Pragmas are a way to set arbitrary switches on the parser. The only switch that is treated specially is `strict`. When in strict mode, any non-TAP data is treated as an error. ```tap TAP version 13 pragma +strict ok 1 - this is very strict so this line here is an error not ok 2 - that line failed pragma -strict but this line here is fine ok 3 - because garbage data is allowed in non-strict mode 1..3 ``` Set pragms in `tap` by doing `t.pragma({ keys: values, ... })`. The object can contain any number of keys, but only `strict` has any meaning to `tap` itself. ## Bail out! Sometimes a set of tests hits a state where there's no point continuing. Or, perhaps you just wish to stop on the first failure to work on errors one at a time with a faster turnover. In this case, TAP allows a "bail out". A bail out is much more extreme than a test point failure. It means that everything should come to a halt, all the way up to the highest level test harness. Nothing should come after a bailout. Any plan is dropped, test points ignored, and so on. ```tap TAP version 13 # Subtest: child # Subtest: grandchild 1..2999 ok 1 - here we go Bail out! Nope. Bail out! Nope. ``` Bail outs in buffered tests should still print the closing `}` braces, but no other output. ```tap TAP version 13 not ok 1 - child { not ok 2 - grandchild { 1..2999 ok 1 - here we go Bail out! Nope. } } Bail out! Nope. ``` You can generate a bailout explicitly by doing `t.bailout(reason)`. You can also have `tap` bail out on any test failure by setting `TAP_BAIL=1` in the environment, or by setting `{ bail: true }` in a child test options, or by running with the `tap` [command-line interface](/cli/) and passing the `--bail` flag. ## Comments and Other Stuff Anything that starts with a `#` and is not a directive or subtest prefix is treated as a comment, and ignored. Anything that isn't parseable as one of the above types of lines is considered "extra" non-TAP data. In strict mode, extra output is an error. In non-strict mode, it's ignored. The `tap` runner ignores comments. Non-TAP data is passed through the reporting engine and printed to the top-level process standard output. This means that `console.log('foo')` will make its way to the top level, instead of being swallowed by a reporter. You can output comments by doing `t.comment('foo')`. This function takes any arguments that can be passed to `console.log()`. For example, `t.comment('number %d and\nobj =', 1, { foo: 'bar' })` would output: ```tap # number 1 and # obj = { foo: 'bar' } ``` node-tap-12.0.1/example/000077500000000000000000000000001327737073000147465ustar00rootroot00000000000000node-tap-12.0.1/example/lib/000077500000000000000000000000001327737073000155145ustar00rootroot00000000000000node-tap-12.0.1/example/lib/math.js000066400000000000000000000000261327737073000170010ustar00rootroot00000000000000module.exports = Math node-tap-12.0.1/example/long-slow-many.js000066400000000000000000000013421327737073000201670ustar00rootroot00000000000000var 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-12.0.1/example/mocha-example.js000066400000000000000000000033601327737073000200260ustar00rootroot00000000000000/* 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-12.0.1/lib/000077500000000000000000000000001327737073000140615ustar00rootroot00000000000000node-tap-12.0.1/lib/base.js000066400000000000000000000137221327737073000153360ustar00rootroot00000000000000'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') /* istanbul ignore next */ const INSPECT = util.inspect.custom || 'inspect' 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-12.0.1/lib/clean-yaml-object.js000066400000000000000000000040621327737073000177070ustar00rootroot00000000000000'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-12.0.1/lib/diags.js000066400000000000000000000002021327737073000155000ustar00rootroot00000000000000'use strict' const objToYaml = require('./obj-to-yaml.js') module.exports = extra => (y => y ? '\n' + y : '')(objToYaml(extra)) node-tap-12.0.1/lib/extra-from-error.js000066400000000000000000000020671327737073000176370ustar00rootroot00000000000000'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-12.0.1/lib/mocha.js000066400000000000000000000073151327737073000155140ustar00rootroot00000000000000'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-12.0.1/lib/obj-to-yaml.js000066400000000000000000000005611327737073000165530ustar00rootroot00000000000000'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-12.0.1/lib/parse-test-args.js000066400000000000000000000026431327737073000174450ustar00rootroot00000000000000'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-12.0.1/lib/point.js000066400000000000000000000025071327737073000155540ustar00rootroot00000000000000'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-12.0.1/lib/snapshot.js000066400000000000000000000045071327737073000162640ustar00rootroot00000000000000'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-12.0.1/lib/spawn.js000066400000000000000000000067631327737073000155630ustar00rootroot00000000000000'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 && 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-12.0.1/lib/stack.js000066400000000000000000000020121327737073000155170ustar00rootroot00000000000000'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-12.0.1/lib/stdin.js000066400000000000000000000014201327737073000155350ustar00rootroot00000000000000'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-12.0.1/lib/synonyms.js000066400000000000000000000042061327737073000163200ustar00rootroot00000000000000'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-12.0.1/lib/tap.js000066400000000000000000000124041327737073000152040ustar00rootroot00000000000000'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 = function (ev, er) { if (ev !== 'error' || er.code !== 'EPIPE') return emit.apply(process.stdout, 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) { if (this.options.autoend !== false) this.autoend(true) 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-12.0.1/lib/test.js000066400000000000000000001063631327737073000154070ustar00rootroot00000000000000'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 (value) { // set to false to NOT trigger autoend if (value === false) { this.options.autoend = false clearTimeout(this.autoendTimer) } else { 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-12.0.1/package-lock.json000066400000000000000000004427651327737073000165510ustar00rootroot00000000000000{ "name": "tap", "version": "12.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { "acorn": { "version": "5.5.3", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.3.tgz", "integrity": "sha512-jd5MkIUlbbmb07nXH0DT3y7rDVtkzDi4XZOUVWAer8ajmF/DTSSbl5oNFyDOl/OXA33Bl79+ypHhl2pN20VeOQ==", "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.0.4" }, "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 } } }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=", "dev": true }, "ansi-escapes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.0.0.tgz", "integrity": "sha512-O/klc27mWNUigtv0F8NJWbLF00OcegQalkqKURWdosW08YZKi4m6CnSUSvIZG1otNJbTWhN01Hhz389DW7mvDQ==", "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=", "dev": true }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "requires": { "sprintf-js": "~1.0.2" } }, "array-includes": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", "dev": true, "requires": { "define-properties": "^1.1.2", "es-abstract": "^1.7.0" } }, "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.1" } }, "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 }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", "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": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" }, "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=", "dev": true, "requires": { "chalk": "^1.1.3", "esutils": "^2.0.2", "js-tokens": "^3.0.2" } }, "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.3" } }, "bind-obj-methods": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-2.0.0.tgz", "integrity": "sha512-3/qRXczDi2Cdbz6jE+W3IflJOutRVica8frpBn14de1mBOkzDo+6tY33kNhvkw54Kn3PzRRD2VnGbGPcTAk4sw==" }, "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": "4.3.1", "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", "requires": { "hoek": "4.x.x" } }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "buffer-from": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.0.0.tgz", "integrity": "sha512-83apNb8KK0Se60UE1+4Ukbe3HbfELJ6UlI4ldtOGs7So4KD26orJM8hIY9lxdzP+UpItH1Yh/Y8GUvNFWFFRxA==" }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", "dev": true }, "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.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", "has-ansi": "^2.0.0", "strip-ansi": "^3.0.0", "supports-color": "^2.0.0" } }, "chardet": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, "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": "2.1.0", "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", "dev": true, "requires": { "restore-cursor": "^2.0.0" } }, "cli-width": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", "dev": true }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "color-convert": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.1.tgz", "integrity": "sha512-mjGanIiwQJskCC18rPR6OmrZ6fm2Lc7PeGFYwCmy5J34wC6F1PzdGL6xeMfmgicfYcNLGuVFA3WzXtIDCQSZxQ==", "dev": true, "requires": { "color-name": "^1.1.1" } }, "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "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.6", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { "delayed-stream": "~1.0.0" } }, "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.1", "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", "dev": true, "requires": { "inherits": "^2.0.3", "readable-stream": "^2.2.2", "typedarray": "^0.0.6" } }, "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, "core-js": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", "dev": true }, "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": "3.0.1", "resolved": "https://registry.npmjs.org/coveralls/-/coveralls-3.0.1.tgz", "integrity": "sha512-FAzXwiDOYLGDWH+zgoIA+8GbWv50hlx+kpEJyvzLKOdnIBv9uWoVl4DhqGgyUHpiRjAlF8KYZSipWXYtllWH6Q==", "requires": { "js-yaml": "^3.6.1", "lcov-parse": "^0.0.10", "log-driver": "^1.2.5", "minimist": "^1.2.0", "request": "^2.79.0" } }, "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.0.1", "which": "^1.2.9" } }, "cryptiles": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", "requires": { "boom": "5.x.x" }, "dependencies": { "boom": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", "requires": { "hoek": "4.x.x" } } } }, "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" } }, "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=", "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 }, "define-properties": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "dev": true, "requires": { "foreach": "^2.0.5", "object-keys": "^1.0.8" } }, "deglob": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.0.tgz", "integrity": "sha1-TUSr4W7zLHebSXK9FBqAMlApoUo=", "dev": true, "requires": { "find-root": "^1.0.0", "glob": "^7.0.5", "ignore": "^3.0.9", "pkg-config": "^1.1.0", "run-parallel": "^1.1.2", "uniq": "^1.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.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "rimraf": "^2.2.8" } }, "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": "2.1.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { "esutils": "^2.0.2" } }, "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.0" } }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "dev": true, "requires": { "iconv-lite": "~0.4.13" } }, "error-ex": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, "requires": { "is-arrayish": "^0.2.1" } }, "es-abstract": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", "dev": true, "requires": { "es-to-primitive": "^1.1.1", "function-bind": "^1.1.1", "has": "^1.0.1", "is-callable": "^1.1.3", "is-regex": "^1.0.4" } }, "es-to-primitive": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", "dev": true, "requires": { "is-callable": "^1.1.1", "is-date-object": "^1.0.1", "is-symbol": "^1.0.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=" }, "eslint": { "version": "4.18.2", "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.18.2.tgz", "integrity": "sha512-qy4i3wODqKMYfz9LUI8N2qYDkHkoieTbiHpMrYUI/WbjhXJQr7lI4VngixTgaG+yHX+NBCv7nW4hA0ShbvaNKw==", "dev": true, "requires": { "ajv": "^5.3.0", "babel-code-frame": "^6.22.0", "chalk": "^2.1.0", "concat-stream": "^1.6.0", "cross-spawn": "^5.1.0", "debug": "^3.1.0", "doctrine": "^2.1.0", "eslint-scope": "^3.7.1", "eslint-visitor-keys": "^1.0.0", "espree": "^3.5.2", "esquery": "^1.0.0", "esutils": "^2.0.2", "file-entry-cache": "^2.0.0", "functional-red-black-tree": "^1.0.1", "glob": "^7.1.2", "globals": "^11.0.1", "ignore": "^3.3.3", "imurmurhash": "^0.1.4", "inquirer": "^3.0.6", "is-resolvable": "^1.0.0", "js-yaml": "^3.9.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", "lodash": "^4.17.4", "minimatch": "^3.0.2", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", "require-uncached": "^1.0.3", "semver": "^5.3.0", "strip-ansi": "^4.0.0", "strip-json-comments": "~2.0.1", "table": "4.0.2", "text-table": "~0.2.0" }, "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 }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "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=", "dev": true, "requires": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", "which": "^1.2.9" } }, "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "dev": true, "requires": { "ms": "2.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" } }, "supports-color": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "^3.0.0" } } } }, "eslint-config-standard": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-11.0.0.tgz", "integrity": "sha512-oDdENzpViEe5fwuRCWla7AXQd++/oyIp8zP+iP9jiUPG6NBj3SHgdgtl/kTn00AjeN+1HNvavTKmYbMo+xMOlw==", "dev": true }, "eslint-config-standard-jsx": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-5.0.0.tgz", "integrity": "sha512-rLToPAEqLMPBfWnYTu6xRhm2OWziS2n40QFqJ8jAM8NSVzeVKTa3nclhsU4DpPJQRY60F34Oo1wi/71PN/eITg==", "dev": true }, "eslint-import-resolver-node": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz", "integrity": "sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q==", "dev": true, "requires": { "debug": "^2.6.9", "resolve": "^1.5.0" }, "dependencies": { "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "requires": { "ms": "2.0.0" } } } }, "eslint-module-utils": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz", "integrity": "sha512-jDI/X5l/6D1rRD/3T43q8Qgbls2nq5km5KSqiwlyUbGo5+04fXhMKdCPhjwbqAa6HXWaMxj8Q4hQDIh7IadJQw==", "dev": true, "requires": { "debug": "^2.6.8", "pkg-dir": "^1.0.0" } }, "eslint-plugin-import": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.9.0.tgz", "integrity": "sha1-JgAu+/ylmJtyiKwEdQi9JPIXsWk=", "dev": true, "requires": { "builtin-modules": "^1.1.1", "contains-path": "^0.1.0", "debug": "^2.6.8", "doctrine": "1.5.0", "eslint-import-resolver-node": "^0.3.1", "eslint-module-utils": "^2.1.1", "has": "^1.0.1", "lodash": "^4.17.4", "minimatch": "^3.0.3", "read-pkg-up": "^2.0.0" }, "dependencies": { "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" } } } }, "eslint-plugin-node": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-6.0.1.tgz", "integrity": "sha512-Q/Cc2sW1OAISDS+Ji6lZS2KV4b7ueA/WydVWd1BECTQwVvfQy5JAi3glhINoKzoMnfnuRgNP+ZWKrGAbp3QDxw==", "dev": true, "requires": { "ignore": "^3.3.6", "minimatch": "^3.0.4", "resolve": "^1.3.3", "semver": "^5.4.1" } }, "eslint-plugin-promise": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-3.7.0.tgz", "integrity": "sha512-2WO+ZFh7vxUKRfR0cOIMrWgYKdR6S1AlOezw6pC52B6oYpd5WFghN+QHxvrRdZMtbo8h3dfUZ2o1rWb0UPbKtg==", "dev": true }, "eslint-plugin-react": { "version": "7.7.0", "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz", "integrity": "sha512-KC7Snr4YsWZD5flu6A5c0AcIZidzW3Exbqp7OT67OaD2AppJtlBr/GuPrW/vaQM/yfZotEvKAdrxrO+v8vwYJA==", "dev": true, "requires": { "doctrine": "^2.0.2", "has": "^1.0.1", "jsx-ast-utils": "^2.0.1", "prop-types": "^15.6.0" } }, "eslint-plugin-standard": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-3.0.1.tgz", "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", "dev": true }, "eslint-scope": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", "dev": true, "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" } }, "eslint-visitor-keys": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, "espree": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", "integrity": "sha512-yAcIQxtmMiB/jL32dzEp2enBeidsB7xWPLNiw3IIkpVds1P+h7qF9YwJq1yUNzp2OKXgAprs4F61ih66UsoD1A==", "dev": true, "requires": { "acorn": "^5.5.0", "acorn-jsx": "^3.0.0" } }, "esquery": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.0.tgz", "integrity": "sha1-z7qLV9f7qT8XKYqKAGoEzaE9gPo=", "dev": true, "requires": { "estraverse": "^4.0.0" } }, "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { "estraverse": "^4.1.0" } }, "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 }, "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=" }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, "external-editor": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.1.0.tgz", "integrity": "sha512-E44iT5QVOUJBKij4IIV3uvxuNlbKS38Tw1HiupxEIHPv9qtC2PrDYohbXV5U+1jnfIXttny8gUhj+oZvflFlzA==", "dev": true, "requires": { "chardet": "^0.4.0", "iconv-lite": "^0.4.17", "tmp": "^0.0.33" } }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "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 }, "fbjs": { "version": "0.8.16", "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz", "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", "dev": true, "requires": { "core-js": "^1.0.0", "isomorphic-fetch": "^2.1.1", "loose-envify": "^1.0.0", "object-assign": "^4.1.0", "promise": "^7.1.1", "setimmediate": "^1.0.5", "ua-parser-js": "^0.7.9" } }, "figures": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", "dev": true, "requires": { "escape-string-regexp": "^1.0.5" } }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", "dev": true, "requires": { "flat-cache": "^1.2.1", "object-assign": "^4.0.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 }, "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" } }, "flat-cache": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", "dev": true, "requires": { "circular-json": "^0.3.1", "del": "^2.0.2", "graceful-fs": "^4.1.2", "write": "^0.2.1" } }, "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", "dev": true }, "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", "signal-exit": "^3.0.0" } }, "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.3.2", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { "asynckit": "^0.4.0", "combined-stream": "1.0.6", "mime-types": "^2.1.12" } }, "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-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, "function-loop": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-1.0.1.tgz", "integrity": "sha1-gHa7MF6OajzO7ikgdl8zDRkPNAw=" }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, "get-stdin": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", "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" } }, "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.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "globals": { "version": "11.3.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.3.0.tgz", "integrity": "sha512-kkpcKNlmQan9Z5ZmgqKH/SMbSmjxQ7QjyNqfXVc8VJcoBV2UEg+sxQD15GQofGRh2hfpwUb70VC31DR7Rq5Hdw==", "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.1", "arrify": "^1.0.0", "glob": "^7.0.3", "object-assign": "^4.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" } }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", "requires": { "ajv": "^5.1.0", "har-schema": "^2.0.0" } }, "has": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", "dev": true, "requires": { "function-bind": "^1.0.2" } }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true, "requires": { "ansi-regex": "^2.0.0" } }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "hawk": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", "requires": { "boom": "4.x.x", "cryptiles": "3.x.x", "hoek": "4.x.x", "sntp": "2.x.x" } }, "hoek": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" }, "hosted-git-info": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz", "integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==", "dev": true }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", "sshpk": "^1.7.0" } }, "iconv-lite": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==", "dev": true }, "ignore": { "version": "3.3.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.8.tgz", "integrity": "sha512-pUh+xUQQhQzevjRHHFqqcTy0/dP/kS9I8HSrUydhihjuD09W6ldVWFtIrwhXdUJHis3i2rZNqEHpZH/cbinFbg==", "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.3.0", "wrappy": "1" } }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "inquirer": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", "dev": true, "requires": { "ansi-escapes": "^3.0.0", "chalk": "^2.0.0", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", "external-editor": "^2.0.4", "figures": "^2.0.0", "lodash": "^4.3.0", "mute-stream": "0.0.7", "run-async": "^2.2.0", "rx-lite": "^4.0.8", "rx-lite-aggregates": "^4.0.8", "string-width": "^2.1.0", "strip-ansi": "^4.0.0", "through": "^2.3.6" }, "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 }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.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" } }, "supports-color": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "^3.0.0" } } } }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, "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=", "dev": true, "requires": { "builtin-modules": "^1.0.0" } }, "is-callable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", "dev": true }, "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "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 }, "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.1", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "dev": true, "requires": { "path-is-inside": "^1.0.1" } }, "is-promise": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", "dev": true }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", "dev": true, "requires": { "has": "^1.0.1" } }, "is-resolvable": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", "dev": true }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", "dev": true }, "is-symbol": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", "dev": true }, "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=" }, "isomorphic-fetch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", "dev": true, "requires": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" } }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", "dev": true }, "js-yaml": { "version": "3.11.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "requires": { "argparse": "^1.0.7", "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-parse-better-errors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.1.tgz", "integrity": "sha512-xyQpxeWWMKyJps9CuGJYeng6ssI5bpqS9ltQpdVQ90t4ql6NdnxFKh95JcRt2cun/DjMVNrdjniLPuMA69xmCw==", "dev": true }, "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-traverse": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, "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=" }, "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" } }, "jsx-ast-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", "dev": true, "requires": { "array-includes": "^3.0.3" } }, "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" } }, "load-json-file": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "dev": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", "pify": "^2.0.0", "strip-bom": "^3.0.0" } }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "dev": true, "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=", "dev": true } } }, "lodash": { "version": "4.17.5", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", "dev": true }, "log-driver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==" }, "loose-envify": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "dev": true, "requires": { "js-tokens": "^3.0.0" } }, "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.33.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" }, "mime-types": { "version": "2.1.18", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", "requires": { "mime-db": "~1.33.0" } }, "mimic-fn": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, "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.7" } }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "minipass": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.0.tgz", "integrity": "sha512-jWC2Eg+Np4bxah7llu1IrUNSJQxtLz/J+pOjTM0nFpJXGAaV18XBWhUn031Q1tAA/TJtA1jgwnOe9S2PQa4Lbg==", "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" }, "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=" }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", "dev": true }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "dev": true, "requires": { "encoding": "^0.1.11", "is-stream": "^1.0.1" } }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "nyc": { "version": "11.8.0", "resolved": "https://registry.npmjs.org/nyc/-/nyc-11.8.0.tgz", "integrity": "sha512-PUFq1PSsx5OinSk5g5aaZygcDdI3QQT5XUlbR9QRMihtMS6w0Gm8xj4BxmKeeAlpQXC5M2DIhH16Y+KejceivQ==", "requires": { "archy": "^1.0.0", "arrify": "^1.0.1", "caching-transform": "^1.0.0", "convert-source-map": "^1.5.1", "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.3", "glob": "^7.0.6", "istanbul-lib-coverage": "^1.1.2", "istanbul-lib-hook": "^1.1.0", "istanbul-lib-instrument": "^1.10.0", "istanbul-lib-report": "^1.1.3", "istanbul-lib-source-maps": "^1.2.3", "istanbul-reports": "^1.4.0", "md5-hex": "^1.2.0", "merge-source-map": "^1.1.0", "micromatch": "^3.1.10", "mkdirp": "^0.5.0", "resolve-from": "^2.0.0", "rimraf": "^2.6.2", "signal-exit": "^3.0.1", "spawn-wrap": "^1.4.2", "test-exclude": "^4.2.0", "yargs": "11.1.0", "yargs-parser": "^8.0.0" }, "dependencies": { "align-text": { "version": "0.1.4", "bundled": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", "repeat-string": "^1.5.2" } }, "amdefine": { "version": "1.0.1", "bundled": true }, "ansi-regex": { "version": "2.1.1", "bundled": true }, "ansi-styles": { "version": "2.2.1", "bundled": true }, "append-transform": { "version": "0.4.0", "bundled": true, "requires": { "default-require-extensions": "^1.0.0" } }, "archy": { "version": "1.0.0", "bundled": true }, "arr-diff": { "version": "4.0.0", "bundled": true }, "arr-flatten": { "version": "1.1.0", "bundled": true }, "arr-union": { "version": "3.1.0", "bundled": true }, "array-unique": { "version": "0.3.2", "bundled": true }, "arrify": { "version": "1.0.1", "bundled": true }, "assign-symbols": { "version": "1.0.0", "bundled": true }, "async": { "version": "1.5.2", "bundled": true }, "atob": { "version": "2.1.1", "bundled": true }, "babel-code-frame": { "version": "6.26.0", "bundled": true, "requires": { "chalk": "^1.1.3", "esutils": "^2.0.2", "js-tokens": "^3.0.2" } }, "babel-generator": { "version": "6.26.1", "bundled": true, "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", "bundled": true, "requires": { "babel-runtime": "^6.22.0" } }, "babel-runtime": { "version": "6.26.0", "bundled": true, "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" } }, "babel-template": { "version": "6.26.0", "bundled": true, "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", "bundled": true, "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.8", "globals": "^9.18.0", "invariant": "^2.2.2", "lodash": "^4.17.4" } }, "babel-types": { "version": "6.26.0", "bundled": true, "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", "bundled": true }, "balanced-match": { "version": "1.0.0", "bundled": true }, "base": { "version": "0.11.2", "bundled": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", "component-emitter": "^1.2.1", "define-property": "^1.0.0", "isobject": "^3.0.1", "mixin-deep": "^1.2.0", "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { "version": "1.0.0", "bundled": true, "requires": { "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "bundled": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "isobject": { "version": "3.0.1", "bundled": true }, "kind-of": { "version": "6.0.2", "bundled": true } } }, "brace-expansion": { "version": "1.1.11", "bundled": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "braces": { "version": "2.3.2", "bundled": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", "extend-shallow": "^2.0.1", "fill-range": "^4.0.0", "isobject": "^3.0.1", "repeat-element": "^1.1.2", "snapdragon": "^0.8.1", "snapdragon-node": "^2.0.1", "split-string": "^3.0.2", "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "builtin-modules": { "version": "1.1.1", "bundled": true }, "cache-base": { "version": "1.0.1", "bundled": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", "get-value": "^2.0.6", "has-value": "^1.0.0", "isobject": "^3.0.1", "set-value": "^2.0.0", "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" }, "dependencies": { "isobject": { "version": "3.0.1", "bundled": true } } }, "caching-transform": { "version": "1.0.1", "bundled": true, "requires": { "md5-hex": "^1.2.0", "mkdirp": "^0.5.1", "write-file-atomic": "^1.1.4" } }, "camelcase": { "version": "1.2.1", "bundled": true, "optional": true }, "center-align": { "version": "0.1.3", "bundled": true, "optional": true, "requires": { "align-text": "^0.1.3", "lazy-cache": "^1.0.3" } }, "chalk": { "version": "1.1.3", "bundled": true, "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", "has-ansi": "^2.0.0", "strip-ansi": "^3.0.0", "supports-color": "^2.0.0" } }, "class-utils": { "version": "0.3.6", "bundled": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", "isobject": "^3.0.0", "static-extend": "^0.1.1" }, "dependencies": { "define-property": { "version": "0.2.5", "bundled": true, "requires": { "is-descriptor": "^0.1.0" } }, "isobject": { "version": "3.0.1", "bundled": true } } }, "cliui": { "version": "2.1.0", "bundled": true, "optional": true, "requires": { "center-align": "^0.1.1", "right-align": "^0.1.1", "wordwrap": "0.0.2" }, "dependencies": { "wordwrap": { "version": "0.0.2", "bundled": true, "optional": true } } }, "code-point-at": { "version": "1.1.0", "bundled": true }, "collection-visit": { "version": "1.0.0", "bundled": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" } }, "commondir": { "version": "1.0.1", "bundled": true }, "component-emitter": { "version": "1.2.1", "bundled": true }, "concat-map": { "version": "0.0.1", "bundled": true }, "convert-source-map": { "version": "1.5.1", "bundled": true }, "copy-descriptor": { "version": "0.1.1", "bundled": true }, "core-js": { "version": "2.5.6", "bundled": true }, "cross-spawn": { "version": "4.0.2", "bundled": true, "requires": { "lru-cache": "^4.0.1", "which": "^1.2.9" } }, "debug": { "version": "2.6.9", "bundled": true, "requires": { "ms": "2.0.0" } }, "debug-log": { "version": "1.0.1", "bundled": true }, "decamelize": { "version": "1.2.0", "bundled": true }, "decode-uri-component": { "version": "0.2.0", "bundled": true }, "default-require-extensions": { "version": "1.0.0", "bundled": true, "requires": { "strip-bom": "^2.0.0" } }, "define-property": { "version": "2.0.2", "bundled": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "bundled": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "isobject": { "version": "3.0.1", "bundled": true }, "kind-of": { "version": "6.0.2", "bundled": true } } }, "detect-indent": { "version": "4.0.0", "bundled": true, "requires": { "repeating": "^2.0.0" } }, "error-ex": { "version": "1.3.1", "bundled": true, "requires": { "is-arrayish": "^0.2.1" } }, "escape-string-regexp": { "version": "1.0.5", "bundled": true }, "esutils": { "version": "2.0.2", "bundled": true }, "execa": { "version": "0.7.0", "bundled": true, "requires": { "cross-spawn": "^5.0.1", "get-stream": "^3.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" }, "dependencies": { "cross-spawn": { "version": "5.1.0", "bundled": true, "requires": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", "which": "^1.2.9" } } } }, "expand-brackets": { "version": "2.1.4", "bundled": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "posix-character-classes": "^0.1.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "0.2.5", "bundled": true, "requires": { "is-descriptor": "^0.1.0" } }, "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "extend-shallow": { "version": "3.0.2", "bundled": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { "version": "1.0.1", "bundled": true, "requires": { "is-plain-object": "^2.0.4" } } } }, "extglob": { "version": "2.0.4", "bundled": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", "expand-brackets": "^2.1.4", "extend-shallow": "^2.0.1", "fragment-cache": "^0.2.1", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "1.0.0", "bundled": true, "requires": { "is-descriptor": "^1.0.0" } }, "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "bundled": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "kind-of": { "version": "6.0.2", "bundled": true } } }, "fill-range": { "version": "4.0.0", "bundled": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", "repeat-string": "^1.6.1", "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "find-cache-dir": { "version": "0.1.1", "bundled": true, "requires": { "commondir": "^1.0.1", "mkdirp": "^0.5.1", "pkg-dir": "^1.0.0" } }, "find-up": { "version": "2.1.0", "bundled": true, "requires": { "locate-path": "^2.0.0" } }, "for-in": { "version": "1.0.2", "bundled": true }, "foreground-child": { "version": "1.5.6", "bundled": true, "requires": { "cross-spawn": "^4", "signal-exit": "^3.0.0" } }, "fragment-cache": { "version": "0.2.1", "bundled": true, "requires": { "map-cache": "^0.2.2" } }, "fs.realpath": { "version": "1.0.0", "bundled": true }, "get-caller-file": { "version": "1.0.2", "bundled": true }, "get-stream": { "version": "3.0.0", "bundled": true }, "get-value": { "version": "2.0.6", "bundled": true }, "glob": { "version": "7.1.2", "bundled": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "globals": { "version": "9.18.0", "bundled": true }, "graceful-fs": { "version": "4.1.11", "bundled": true }, "handlebars": { "version": "4.0.11", "bundled": true, "requires": { "async": "^1.4.0", "optimist": "^0.6.1", "source-map": "^0.4.4", "uglify-js": "^2.6" }, "dependencies": { "source-map": { "version": "0.4.4", "bundled": true, "requires": { "amdefine": ">=0.0.4" } } } }, "has-ansi": { "version": "2.0.0", "bundled": true, "requires": { "ansi-regex": "^2.0.0" } }, "has-flag": { "version": "1.0.0", "bundled": true }, "has-value": { "version": "1.0.0", "bundled": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" }, "dependencies": { "isobject": { "version": "3.0.1", "bundled": true } } }, "has-values": { "version": "1.0.0", "bundled": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" }, "dependencies": { "is-number": { "version": "3.0.0", "bundled": true, "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "bundled": true, "requires": { "is-buffer": "^1.1.5" } } } }, "kind-of": { "version": "4.0.0", "bundled": true, "requires": { "is-buffer": "^1.1.5" } } } }, "hosted-git-info": { "version": "2.6.0", "bundled": true }, "imurmurhash": { "version": "0.1.4", "bundled": true }, "inflight": { "version": "1.0.6", "bundled": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { "version": "2.0.3", "bundled": true }, "invariant": { "version": "2.2.4", "bundled": true, "requires": { "loose-envify": "^1.0.0" } }, "invert-kv": { "version": "1.0.0", "bundled": true }, "is-accessor-descriptor": { "version": "0.1.6", "bundled": true, "requires": { "kind-of": "^3.0.2" } }, "is-arrayish": { "version": "0.2.1", "bundled": true }, "is-buffer": { "version": "1.1.6", "bundled": true }, "is-builtin-module": { "version": "1.0.0", "bundled": true, "requires": { "builtin-modules": "^1.0.0" } }, "is-data-descriptor": { "version": "0.1.4", "bundled": true, "requires": { "kind-of": "^3.0.2" } }, "is-descriptor": { "version": "0.1.6", "bundled": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { "version": "5.1.0", "bundled": true } } }, "is-extendable": { "version": "0.1.1", "bundled": true }, "is-finite": { "version": "1.0.2", "bundled": true, "requires": { "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { "version": "2.0.0", "bundled": true }, "is-number": { "version": "3.0.0", "bundled": true, "requires": { "kind-of": "^3.0.2" } }, "is-odd": { "version": "2.0.0", "bundled": true, "requires": { "is-number": "^4.0.0" }, "dependencies": { "is-number": { "version": "4.0.0", "bundled": true } } }, "is-plain-object": { "version": "2.0.4", "bundled": true, "requires": { "isobject": "^3.0.1" }, "dependencies": { "isobject": { "version": "3.0.1", "bundled": true } } }, "is-stream": { "version": "1.1.0", "bundled": true }, "is-utf8": { "version": "0.2.1", "bundled": true }, "is-windows": { "version": "1.0.2", "bundled": true }, "isarray": { "version": "1.0.0", "bundled": true }, "isexe": { "version": "2.0.0", "bundled": true }, "isobject": { "version": "3.0.1", "bundled": true }, "istanbul-lib-coverage": { "version": "1.2.0", "bundled": true }, "istanbul-lib-hook": { "version": "1.1.0", "bundled": true, "requires": { "append-transform": "^0.4.0" } }, "istanbul-lib-instrument": { "version": "1.10.1", "bundled": true, "requires": { "babel-generator": "^6.18.0", "babel-template": "^6.16.0", "babel-traverse": "^6.18.0", "babel-types": "^6.18.0", "babylon": "^6.18.0", "istanbul-lib-coverage": "^1.2.0", "semver": "^5.3.0" } }, "istanbul-lib-report": { "version": "1.1.3", "bundled": true, "requires": { "istanbul-lib-coverage": "^1.1.2", "mkdirp": "^0.5.1", "path-parse": "^1.0.5", "supports-color": "^3.1.2" }, "dependencies": { "supports-color": { "version": "3.2.3", "bundled": true, "requires": { "has-flag": "^1.0.0" } } } }, "istanbul-lib-source-maps": { "version": "1.2.3", "bundled": true, "requires": { "debug": "^3.1.0", "istanbul-lib-coverage": "^1.1.2", "mkdirp": "^0.5.1", "rimraf": "^2.6.1", "source-map": "^0.5.3" }, "dependencies": { "debug": { "version": "3.1.0", "bundled": true, "requires": { "ms": "2.0.0" } } } }, "istanbul-reports": { "version": "1.4.0", "bundled": true, "requires": { "handlebars": "^4.0.3" } }, "js-tokens": { "version": "3.0.2", "bundled": true }, "jsesc": { "version": "1.3.0", "bundled": true }, "kind-of": { "version": "3.2.2", "bundled": true, "requires": { "is-buffer": "^1.1.5" } }, "lazy-cache": { "version": "1.0.4", "bundled": true, "optional": true }, "lcid": { "version": "1.0.0", "bundled": true, "requires": { "invert-kv": "^1.0.0" } }, "load-json-file": { "version": "1.1.0", "bundled": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "strip-bom": "^2.0.0" } }, "locate-path": { "version": "2.0.0", "bundled": true, "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" }, "dependencies": { "path-exists": { "version": "3.0.0", "bundled": true } } }, "lodash": { "version": "4.17.10", "bundled": true }, "longest": { "version": "1.0.1", "bundled": true }, "loose-envify": { "version": "1.3.1", "bundled": true, "requires": { "js-tokens": "^3.0.0" } }, "lru-cache": { "version": "4.1.3", "bundled": true, "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" } }, "map-cache": { "version": "0.2.2", "bundled": true }, "map-visit": { "version": "1.0.0", "bundled": true, "requires": { "object-visit": "^1.0.0" } }, "md5-hex": { "version": "1.3.0", "bundled": true, "requires": { "md5-o-matic": "^0.1.1" } }, "md5-o-matic": { "version": "0.1.1", "bundled": true }, "mem": { "version": "1.1.0", "bundled": true, "requires": { "mimic-fn": "^1.0.0" } }, "merge-source-map": { "version": "1.1.0", "bundled": true, "requires": { "source-map": "^0.6.1" }, "dependencies": { "source-map": { "version": "0.6.1", "bundled": true } } }, "micromatch": { "version": "3.1.10", "bundled": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "braces": "^2.3.1", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "extglob": "^2.0.4", "fragment-cache": "^0.2.1", "kind-of": "^6.0.2", "nanomatch": "^1.2.9", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.2" }, "dependencies": { "kind-of": { "version": "6.0.2", "bundled": true } } }, "mimic-fn": { "version": "1.2.0", "bundled": true }, "minimatch": { "version": "3.0.4", "bundled": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", "bundled": true }, "mixin-deep": { "version": "1.3.1", "bundled": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { "version": "1.0.1", "bundled": true, "requires": { "is-plain-object": "^2.0.4" } } } }, "mkdirp": { "version": "0.5.1", "bundled": true, "requires": { "minimist": "0.0.8" } }, "ms": { "version": "2.0.0", "bundled": true }, "nanomatch": { "version": "1.2.9", "bundled": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "fragment-cache": "^0.2.1", "is-odd": "^2.0.0", "is-windows": "^1.0.2", "kind-of": "^6.0.2", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "arr-diff": { "version": "4.0.0", "bundled": true }, "array-unique": { "version": "0.3.2", "bundled": true }, "kind-of": { "version": "6.0.2", "bundled": true } } }, "normalize-package-data": { "version": "2.4.0", "bundled": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "npm-run-path": { "version": "2.0.2", "bundled": true, "requires": { "path-key": "^2.0.0" } }, "number-is-nan": { "version": "1.0.1", "bundled": true }, "object-assign": { "version": "4.1.1", "bundled": true }, "object-copy": { "version": "0.1.0", "bundled": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", "kind-of": "^3.0.3" }, "dependencies": { "define-property": { "version": "0.2.5", "bundled": true, "requires": { "is-descriptor": "^0.1.0" } } } }, "object-visit": { "version": "1.0.1", "bundled": true, "requires": { "isobject": "^3.0.0" }, "dependencies": { "isobject": { "version": "3.0.1", "bundled": true } } }, "object.pick": { "version": "1.3.0", "bundled": true, "requires": { "isobject": "^3.0.1" }, "dependencies": { "isobject": { "version": "3.0.1", "bundled": true } } }, "once": { "version": "1.4.0", "bundled": true, "requires": { "wrappy": "1" } }, "optimist": { "version": "0.6.1", "bundled": true, "requires": { "minimist": "~0.0.1", "wordwrap": "~0.0.2" } }, "os-homedir": { "version": "1.0.2", "bundled": true }, "os-locale": { "version": "2.1.0", "bundled": true, "requires": { "execa": "^0.7.0", "lcid": "^1.0.0", "mem": "^1.1.0" } }, "p-finally": { "version": "1.0.0", "bundled": true }, "p-limit": { "version": "1.2.0", "bundled": true, "requires": { "p-try": "^1.0.0" } }, "p-locate": { "version": "2.0.0", "bundled": true, "requires": { "p-limit": "^1.1.0" } }, "p-try": { "version": "1.0.0", "bundled": true }, "parse-json": { "version": "2.2.0", "bundled": true, "requires": { "error-ex": "^1.2.0" } }, "pascalcase": { "version": "0.1.1", "bundled": true }, "path-exists": { "version": "2.1.0", "bundled": true, "requires": { "pinkie-promise": "^2.0.0" } }, "path-is-absolute": { "version": "1.0.1", "bundled": true }, "path-key": { "version": "2.0.1", "bundled": true }, "path-parse": { "version": "1.0.5", "bundled": true }, "path-type": { "version": "1.1.0", "bundled": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" } }, "pify": { "version": "2.3.0", "bundled": true }, "pinkie": { "version": "2.0.4", "bundled": true }, "pinkie-promise": { "version": "2.0.1", "bundled": true, "requires": { "pinkie": "^2.0.0" } }, "pkg-dir": { "version": "1.0.0", "bundled": true, "requires": { "find-up": "^1.0.0" }, "dependencies": { "find-up": { "version": "1.1.2", "bundled": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" } } } }, "posix-character-classes": { "version": "0.1.1", "bundled": true }, "pseudomap": { "version": "1.0.2", "bundled": true }, "read-pkg": { "version": "1.1.0", "bundled": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", "path-type": "^1.0.0" } }, "read-pkg-up": { "version": "1.0.1", "bundled": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { "version": "1.1.2", "bundled": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" } } } }, "regenerator-runtime": { "version": "0.11.1", "bundled": true }, "regex-not": { "version": "1.0.2", "bundled": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" } }, "repeat-element": { "version": "1.1.2", "bundled": true }, "repeat-string": { "version": "1.6.1", "bundled": true }, "repeating": { "version": "2.0.1", "bundled": true, "requires": { "is-finite": "^1.0.0" } }, "require-directory": { "version": "2.1.1", "bundled": true }, "require-main-filename": { "version": "1.0.1", "bundled": true }, "resolve-from": { "version": "2.0.0", "bundled": true }, "resolve-url": { "version": "0.2.1", "bundled": true }, "ret": { "version": "0.1.15", "bundled": true }, "right-align": { "version": "0.1.3", "bundled": true, "optional": true, "requires": { "align-text": "^0.1.1" } }, "rimraf": { "version": "2.6.2", "bundled": true, "requires": { "glob": "^7.0.5" } }, "safe-regex": { "version": "1.1.0", "bundled": true, "requires": { "ret": "~0.1.10" } }, "semver": { "version": "5.5.0", "bundled": true }, "set-blocking": { "version": "2.0.0", "bundled": true }, "set-value": { "version": "2.0.0", "bundled": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "shebang-command": { "version": "1.2.0", "bundled": true, "requires": { "shebang-regex": "^1.0.0" } }, "shebang-regex": { "version": "1.0.0", "bundled": true }, "signal-exit": { "version": "3.0.2", "bundled": true }, "slide": { "version": "1.1.6", "bundled": true }, "snapdragon": { "version": "0.8.2", "bundled": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "map-cache": "^0.2.2", "source-map": "^0.5.6", "source-map-resolve": "^0.5.0", "use": "^3.1.0" }, "dependencies": { "define-property": { "version": "0.2.5", "bundled": true, "requires": { "is-descriptor": "^0.1.0" } }, "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "snapdragon-node": { "version": "2.1.1", "bundled": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { "version": "1.0.0", "bundled": true, "requires": { "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "bundled": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "isobject": { "version": "3.0.1", "bundled": true }, "kind-of": { "version": "6.0.2", "bundled": true } } }, "snapdragon-util": { "version": "3.0.1", "bundled": true, "requires": { "kind-of": "^3.2.0" } }, "source-map": { "version": "0.5.7", "bundled": true }, "source-map-resolve": { "version": "0.5.1", "bundled": true, "requires": { "atob": "^2.0.0", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", "urix": "^0.1.0" } }, "source-map-url": { "version": "0.4.0", "bundled": true }, "spawn-wrap": { "version": "1.4.2", "bundled": true, "requires": { "foreground-child": "^1.5.6", "mkdirp": "^0.5.0", "os-homedir": "^1.0.1", "rimraf": "^2.6.2", "signal-exit": "^3.0.2", "which": "^1.3.0" } }, "spdx-correct": { "version": "3.0.0", "bundled": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { "version": "2.1.0", "bundled": true }, "spdx-expression-parse": { "version": "3.0.0", "bundled": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { "version": "3.0.0", "bundled": true }, "split-string": { "version": "3.1.0", "bundled": true, "requires": { "extend-shallow": "^3.0.0" } }, "static-extend": { "version": "0.1.2", "bundled": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" }, "dependencies": { "define-property": { "version": "0.2.5", "bundled": true, "requires": { "is-descriptor": "^0.1.0" } } } }, "string-width": { "version": "2.1.1", "bundled": true, "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" }, "dependencies": { "ansi-regex": { "version": "3.0.0", "bundled": true }, "strip-ansi": { "version": "4.0.0", "bundled": true, "requires": { "ansi-regex": "^3.0.0" } } } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-bom": { "version": "2.0.0", "bundled": true, "requires": { "is-utf8": "^0.2.0" } }, "strip-eof": { "version": "1.0.0", "bundled": true }, "supports-color": { "version": "2.0.0", "bundled": true }, "test-exclude": { "version": "4.2.1", "bundled": true, "requires": { "arrify": "^1.0.1", "micromatch": "^3.1.8", "object-assign": "^4.1.0", "read-pkg-up": "^1.0.1", "require-main-filename": "^1.0.1" }, "dependencies": { "arr-diff": { "version": "4.0.0", "bundled": true }, "array-unique": { "version": "0.3.2", "bundled": true }, "braces": { "version": "2.3.2", "bundled": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", "extend-shallow": "^2.0.1", "fill-range": "^4.0.0", "isobject": "^3.0.1", "repeat-element": "^1.1.2", "snapdragon": "^0.8.1", "snapdragon-node": "^2.0.1", "split-string": "^3.0.2", "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "expand-brackets": { "version": "2.1.4", "bundled": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "posix-character-classes": "^0.1.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "0.2.5", "bundled": true, "requires": { "is-descriptor": "^0.1.0" } }, "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { "version": "0.1.6", "bundled": true, "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "bundled": true, "requires": { "is-buffer": "^1.1.5" } } } }, "is-data-descriptor": { "version": "0.1.4", "bundled": true, "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "bundled": true, "requires": { "is-buffer": "^1.1.5" } } } }, "is-descriptor": { "version": "0.1.6", "bundled": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" } }, "kind-of": { "version": "5.1.0", "bundled": true } } }, "extglob": { "version": "2.0.4", "bundled": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", "expand-brackets": "^2.1.4", "extend-shallow": "^2.0.1", "fragment-cache": "^0.2.1", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "1.0.0", "bundled": true, "requires": { "is-descriptor": "^1.0.0" } }, "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "fill-range": { "version": "4.0.0", "bundled": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", "repeat-string": "^1.6.1", "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } } } }, "is-accessor-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "bundled": true, "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "bundled": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "is-number": { "version": "3.0.0", "bundled": true, "requires": { "kind-of": "^3.0.2" }, "dependencies": { "kind-of": { "version": "3.2.2", "bundled": true, "requires": { "is-buffer": "^1.1.5" } } } }, "isobject": { "version": "3.0.1", "bundled": true }, "kind-of": { "version": "6.0.2", "bundled": true }, "micromatch": { "version": "3.1.10", "bundled": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "braces": "^2.3.1", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "extglob": "^2.0.4", "fragment-cache": "^0.2.1", "kind-of": "^6.0.2", "nanomatch": "^1.2.9", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.2" } } } }, "to-fast-properties": { "version": "1.0.3", "bundled": true }, "to-object-path": { "version": "0.3.0", "bundled": true, "requires": { "kind-of": "^3.0.2" } }, "to-regex": { "version": "3.0.2", "bundled": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "regex-not": "^1.0.2", "safe-regex": "^1.1.0" } }, "to-regex-range": { "version": "2.1.1", "bundled": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" }, "dependencies": { "is-number": { "version": "3.0.0", "bundled": true, "requires": { "kind-of": "^3.0.2" } } } }, "trim-right": { "version": "1.0.1", "bundled": true }, "uglify-js": { "version": "2.8.29", "bundled": true, "optional": true, "requires": { "source-map": "~0.5.1", "uglify-to-browserify": "~1.0.0", "yargs": "~3.10.0" }, "dependencies": { "yargs": { "version": "3.10.0", "bundled": true, "optional": true, "requires": { "camelcase": "^1.0.2", "cliui": "^2.1.0", "decamelize": "^1.0.0", "window-size": "0.1.0" } } } }, "uglify-to-browserify": { "version": "1.0.2", "bundled": true, "optional": true }, "union-value": { "version": "1.0.0", "bundled": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "bundled": true, "requires": { "is-extendable": "^0.1.0" } }, "set-value": { "version": "0.4.3", "bundled": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", "is-plain-object": "^2.0.1", "to-object-path": "^0.3.0" } } } }, "unset-value": { "version": "1.0.0", "bundled": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" }, "dependencies": { "has-value": { "version": "0.3.1", "bundled": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", "isobject": "^2.0.0" }, "dependencies": { "isobject": { "version": "2.1.0", "bundled": true, "requires": { "isarray": "1.0.0" } } } }, "has-values": { "version": "0.1.4", "bundled": true }, "isobject": { "version": "3.0.1", "bundled": true } } }, "urix": { "version": "0.1.0", "bundled": true }, "use": { "version": "3.1.0", "bundled": true, "requires": { "kind-of": "^6.0.2" }, "dependencies": { "kind-of": { "version": "6.0.2", "bundled": true } } }, "validate-npm-package-license": { "version": "3.0.3", "bundled": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "which": { "version": "1.3.0", "bundled": true, "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "2.0.0", "bundled": true }, "window-size": { "version": "0.1.0", "bundled": true, "optional": true }, "wordwrap": { "version": "0.0.3", "bundled": true }, "wrap-ansi": { "version": "2.1.0", "bundled": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" }, "dependencies": { "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, "requires": { "number-is-nan": "^1.0.0" } }, "string-width": { "version": "1.0.2", "bundled": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" } } } }, "wrappy": { "version": "1.0.2", "bundled": true }, "write-file-atomic": { "version": "1.3.4", "bundled": true, "requires": { "graceful-fs": "^4.1.11", "imurmurhash": "^0.1.4", "slide": "^1.1.5" } }, "y18n": { "version": "3.2.1", "bundled": true }, "yallist": { "version": "2.1.2", "bundled": true }, "yargs": { "version": "11.1.0", "bundled": true, "requires": { "cliui": "^4.0.0", "decamelize": "^1.1.1", "find-up": "^2.1.0", "get-caller-file": "^1.0.1", "os-locale": "^2.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1", "yargs-parser": "^9.0.2" }, "dependencies": { "ansi-regex": { "version": "3.0.0", "bundled": true }, "camelcase": { "version": "4.1.0", "bundled": true }, "cliui": { "version": "4.1.0", "bundled": true, "requires": { "string-width": "^2.1.1", "strip-ansi": "^4.0.0", "wrap-ansi": "^2.0.0" } }, "strip-ansi": { "version": "4.0.0", "bundled": true, "requires": { "ansi-regex": "^3.0.0" } }, "yargs-parser": { "version": "9.0.2", "bundled": true, "requires": { "camelcase": "^4.1.0" } } } }, "yargs-parser": { "version": "8.1.0", "bundled": true, "requires": { "camelcase": "^4.1.0" }, "dependencies": { "camelcase": { "version": "4.1.0", "bundled": true } } } } }, "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 }, "object-keys": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", "dev": true }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" } }, "onetime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", "dev": true, "requires": { "mimic-fn": "^1.0.0" } }, "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.4", "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=" }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, "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.1", "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.1.tgz", "integrity": "sha512-y8qULRbRAlL6x2+M0vIe7jJbJx/kmUTzYonRAa2ayesR2qWLswninkVyeJe4x3IEXhdgoNodzjQRKAoEs6Fmrw==", "requires": { "own-or": "^1.0.0" } }, "p-limit": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.2.0.tgz", "integrity": "sha512-Y/OtIaXtUPr4/YpMv1pCL5L5ed0rumAaAeBSj12F+bSlMdys7i8oQF/GUJmfpTS/QoaRrS/k6pma29haJpsMng==", "dev": true, "requires": { "p-try": "^1.0.0" } }, "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "dev": true, "requires": { "p-limit": "^1.1.0" } }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", "dev": true }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, "requires": { "error-ex": "^1.2.0" } }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, "requires": { "pinkie-promise": "^2.0.0" } }, "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 }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", "dev": true }, "path-type": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", "dev": true, "requires": { "pify": "^2.0.0" } }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "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=", "dev": true }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, "requires": { "pinkie": "^2.0.0" } }, "pkg-conf": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", "dev": true, "requires": { "find-up": "^2.0.0", "load-json-file": "^4.0.0" }, "dependencies": { "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { "locate-path": "^2.0.0" } }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^4.0.0", "pify": "^3.0.0", "strip-bom": "^3.0.0" } }, "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" } }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true } } }, "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.0", "find-root": "^1.0.0", "xtend": "^4.0.1" } }, "pkg-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-1.0.0.tgz", "integrity": "sha1-ektQio1bstYp1EcFb/TpyTFM89Q=", "dev": true, "requires": { "find-up": "^1.0.0" } }, "pluralize": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", "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": "2.0.0", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", "dev": true }, "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "dev": true, "requires": { "asap": "~2.0.3" } }, "prop-types": { "version": "15.6.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.1.tgz", "integrity": "sha512-4ec7bY1Y66LymSUOH/zARVYObB23AT2h8cf6e/O6ZALB/N0sqZFEx7rq6EYPX2MkOdKORuooI/H5k9TlR4q7kQ==", "dev": true, "requires": { "fbjs": "^0.8.16", "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } }, "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.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "read-pkg": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", "dev": true, "requires": { "load-json-file": "^2.0.0", "normalize-package-data": "^2.3.2", "path-type": "^2.0.0" } }, "read-pkg-up": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", "dev": true, "requires": { "find-up": "^2.0.0", "read-pkg": "^2.0.0" }, "dependencies": { "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "dev": true, "requires": { "locate-path": "^2.0.0" } } } }, "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.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~1.0.6", "safe-buffer": "~5.1.1", "string_decoder": "~1.0.3", "util-deprecate": "~1.0.1" } }, "request": { "version": "2.86.0", "resolved": "https://registry.npmjs.org/request/-/request-2.86.0.tgz", "integrity": "sha512-BQZih67o9r+Ys94tcIW4S7Uu8pthjrQVxhsZ/weOwHbDfACxvIyvnAbzFQxjy1jMtvFSzv5zf4my6cZsJBbVzw==", "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.6.0", "caseless": "~0.12.0", "combined-stream": "~1.0.5", "extend": "~3.0.1", "forever-agent": "~0.6.1", "form-data": "~2.3.1", "har-validator": "~5.0.3", "hawk": "~6.0.2", "http-signature": "~1.2.0", "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", "performance-now": "^2.1.0", "qs": "~6.5.1", "safe-buffer": "^5.1.1", "tough-cookie": "~2.3.3", "tunnel-agent": "^0.6.0", "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.0" } }, "resolve": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, "requires": { "path-parse": "^1.0.5" } }, "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": "2.0.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { "onetime": "^2.0.0", "signal-exit": "^3.0.2" } }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { "glob": "^7.0.5" } }, "run-async": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { "is-promise": "^2.1.0" } }, "run-parallel": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", "dev": true }, "rx-lite": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", "dev": true }, "rx-lite-aggregates": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", "dev": true, "requires": { "rx-lite": "*" } }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "semver": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", "dev": true }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "dev": true, "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=", "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": "1.0.0", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", "dev": true, "requires": { "is-fullwidth-code-point": "^2.0.0" } }, "sntp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", "requires": { "hoek": "4.x.x" } }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "source-map-support": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.6.tgz", "integrity": "sha512-N4KXEz7jcKqPf2b2vZF11lQIz9W5ZMuUcIOGj243lduidkf2fjkVKJS9vNxVWn3u/uxX38AcE8U9nnH9FPcq+g==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, "spdx-correct": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", "dev": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", "dev": true }, "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.14.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.1.tgz", "integrity": "sha1-Ew9Zde3a2WPx1W+SuaxsUfqfg+s=", "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", "bcrypt-pbkdf": "^1.0.0", "dashdash": "^1.12.0", "ecc-jsbn": "~0.1.1", "getpass": "^0.1.1", "jsbn": "~0.1.0", "tweetnacl": "~0.14.0" } }, "stack-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz", "integrity": "sha1-1PM6tU6OOHeLDKXP07OvsS22hiA=" }, "standard": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/standard/-/standard-11.0.1.tgz", "integrity": "sha512-nu0jAcHiSc8H+gJCXeiziMVZNDYi8MuqrYJKxTgjP4xKXZMKm311boqQIzDrYI/ktosltxt2CbDjYQs9ANC8IA==", "dev": true, "requires": { "eslint": "~4.18.0", "eslint-config-standard": "11.0.0", "eslint-config-standard-jsx": "5.0.0", "eslint-plugin-import": "~2.9.0", "eslint-plugin-node": "~6.0.0", "eslint-plugin-promise": "~3.7.0", "eslint-plugin-react": "~7.7.0", "eslint-plugin-standard": "~3.0.1", "standard-engine": "~8.0.0" } }, "standard-engine": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-8.0.1.tgz", "integrity": "sha512-LA531C3+nljom/XRvdW/hGPXwmilRkaRkENhO3FAGF1Vtq/WtCXzgmnc5S6vUHHsgv534MRy02C1ikMwZXC+tw==", "dev": true, "requires": { "deglob": "^2.1.0", "get-stdin": "^6.0.0", "minimist": "^1.1.0", "pkg-conf": "^2.0.0" } }, "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" }, "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 }, "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" } } } }, "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.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.0.0" } }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "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=", "dev": true }, "table": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", "dev": true, "requires": { "ajv": "^5.2.3", "ajv-keywords": "^2.1.0", "chalk": "^2.1.0", "lodash": "^4.17.4", "slice-ansi": "1.0.0", "string-width": "^2.1.1" }, "dependencies": { "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { "color-convert": "^1.9.0" } }, "chalk": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", "dev": true, "requires": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" } }, "supports-color": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "^3.0.0" } } } }, "tap-mocha-reporter": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-3.0.7.tgz", "integrity": "sha512-GHVXJ38C3oPRpM3YUc43JlGdpVZYiKeT1fmAd3HH2+J+ZWwsNAUFvRRdoGsXLw9+gU9o+zXpBqhS/oXyRQYwlA==", "requires": { "color-support": "^1.1.0", "debug": "^2.1.3", "diff": "^1.3.2", "escape-string-regexp": "^1.0.3", "glob": "^7.0.5", "js-yaml": "^3.3.1", "readable-stream": "^2.1.5", "tap-parser": "^5.1.0", "unicode-length": "^1.0.0" }, "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.0.1", "js-yaml": "^3.2.7", "readable-stream": "^2" } } } }, "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.0.1", "js-yaml": "^3.2.7", "minipass": "^2.2.0" } }, "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": "4.0.0", "resolved": "https://registry.npmjs.org/tmatch/-/tmatch-4.0.0.tgz", "integrity": "sha512-Ynn2Gsp+oCvYScQXeV+cCs7citRDilq0qDXA6tuvFwDgiYyyaq7D5vKUlAPezzZR5NDobc/QMeN6e5guOYmvxg==" }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { "os-tmpdir": "~1.0.2" } }, "tough-cookie": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", "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=" }, "tsame": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/tsame/-/tsame-2.0.0.tgz", "integrity": "sha512-dAuzcnOPdqZYojylFQzEes95UDjve3HqKrlTCeLZKSDPMTsn3smzHZqsJj/sWD8wOUkg0RD++B11evyLn2+bIw==" }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { "safe-buffer": "^5.0.1" } }, "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 }, "ua-parser-js": { "version": "0.7.18", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz", "integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA==", "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.3.2", "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 }, "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.2.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" }, "validate-npm-package-license": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "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.2.0" } }, "whatwg-fetch": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=", "dev": true }, "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=", "dev": true }, "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-12.0.1/package.json000066400000000000000000000042611327737073000156040ustar00rootroot00000000000000{ "name": "tap", "version": "12.0.1", "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": "^2.0.0", "bluebird": "^3.5.1", "clean-yaml-object": "^0.1.0", "color-support": "^1.1.0", "coveralls": "^3.0.1", "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.11.0", "minipass": "^2.3.0", "mkdirp": "^0.5.1", "nyc": "^11.8.0", "opener": "^1.4.1", "os-homedir": "^1.0.2", "own-or": "^1.0.0", "own-or-env": "^1.0.1", "rimraf": "^2.6.2", "signal-exit": "^3.0.0", "source-map-support": "^0.5.6", "stack-utils": "^1.0.0", "tap-mocha-reporter": "^3.0.7", "tap-parser": "^7.0.0", "tmatch": "^4.0.0", "trivial-deferred": "^1.0.1", "tsame": "^2.0.0", "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": "^11.0.1", "which": "^1.1.1" }, "files": [ "bin/*.js", "bin/*.txt", "lib/*.js" ] } node-tap-12.0.1/scripts/000077500000000000000000000000001327737073000150025ustar00rootroot00000000000000node-tap-12.0.1/scripts/generate-test-test.js000066400000000000000000000104101327737073000210600ustar00rootroot00000000000000#!/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-12.0.1/scripts/unit.sh000066400000000000000000000001301327737073000163070ustar00rootroot00000000000000#!/bin/bash set -x node bin/run.js --100 test/$1.js --nyc-arg=--include={bin,lib}/$1.js node-tap-12.0.1/tap-snapshots/000077500000000000000000000000001327737073000161175ustar00rootroot00000000000000node-tap-12.0.1/tap-snapshots/test-run.js-TAP.test.js000066400000000000000000000142631327737073000222570ustar00rootroot00000000000000/* 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 rc file specifies test files > expected stdout 1`] = ` TAP version 13 # Subtest: test/cli-tests/via-rcfile.js # Subtest: child ok 1 - this is fine 1..1 ok 1 - child # {time} 1..1 # {time} ok 1 - test/cli-tests/via-rcfile.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-12.0.1/tap-snapshots/test-spawn.js-TAP.test.js000066400000000000000000000023751327737073000226040ustar00rootroot00000000000000/* 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: #INTERNAL# 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-12.0.1/tap-snapshots/test-tap.js-TAP.test.js000066400000000000000000000221161327737073000222330ustar00rootroot00000000000000/* 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`] = ` ` exports[`test/tap.js TAP autoend(false) with teardown > exit status 1`] = ` { code: 0, signal: null } ` exports[`test/tap.js TAP autoend(false) with teardown > stdout 1`] = ` TAP version 13 ok 1 - this is fine 1..1 # {time} tear it down ` exports[`test/tap.js TAP autoend(false) with teardown > stderr 1`] = ` ` exports[`test/tap.js TAP autoend=false with teardown > exit status 1`] = ` { code: 0, signal: null } ` exports[`test/tap.js TAP autoend=false with teardown > stdout 1`] = ` TAP version 13 ok 1 - this is fine 1..1 # {time} tear it down ` exports[`test/tap.js TAP autoend=false with teardown > stderr 1`] = ` ` node-tap-12.0.1/tap-snapshots/test-test.js-TAP.test.js000066400000000000000000001315451327737073000224350ustar00rootroot00000000000000/* 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 autoend(false) > autoend(false) 1`] = ` TAP version 13 ok 1 - this is fine 1..1 ` 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-12.0.1/test-legacy/000077500000000000000000000000001327737073000155345ustar00rootroot00000000000000node-tap-12.0.1/test-legacy/asserts.js000066400000000000000000000151461327737073000175650ustar00rootroot00000000000000var 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-12.0.1/test-legacy/buffer_compare.js000066400000000000000000000004001327737073000210430ustar00rootroot00000000000000var 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-12.0.1/test-legacy/common.js000066400000000000000000000025761327737073000173740ustar00rootroot00000000000000exports.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-12.0.1/test-legacy/coverage-export.js000066400000000000000000000025521327737073000212100ustar00rootroot00000000000000'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-12.0.1/test-legacy/coverage-html-no-browser.js000066400000000000000000000023451327737073000227260ustar00rootroot00000000000000var 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-12.0.1/test-legacy/deep-strict.js000066400000000000000000000017371327737073000203250ustar00rootroot00000000000000var 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-12.0.1/test-legacy/deep.js000066400000000000000000000023111327737073000170040ustar00rootroot00000000000000var 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-12.0.1/test-legacy/executable-scripts.js000066400000000000000000000031161327737073000217010ustar00rootroot00000000000000var 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-12.0.1/test-legacy/exit-code.js000066400000000000000000000035411327737073000177560ustar00rootroot00000000000000var 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-12.0.1/test-legacy/expose-gc-test.js000066400000000000000000000017131327737073000207430ustar00rootroot00000000000000var 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-12.0.1/test-legacy/fixtures/000077500000000000000000000000001327737073000174055ustar00rootroot00000000000000node-tap-12.0.1/test-legacy/fixtures/assert.js000066400000000000000000000254351327737073000212550ustar00rootroot00000000000000// 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-12.0.1/test-legacy/fixtures/cat.js000066400000000000000000000000431327737073000205070ustar00rootroot00000000000000process.stdin.pipe(process.stdout) node-tap-12.0.1/test-legacy/fixtures/dump-args.js000066400000000000000000000003121327737073000216360ustar00rootroot00000000000000var 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-12.0.1/test-legacy/fixtures/fail-correct-exit.js000066400000000000000000000001661327737073000232670ustar00rootroot00000000000000console.log('TAP Version 13') console.log('not ok - 1 and it will exit non-zero') console.log('1..1') process.exit(1) node-tap-12.0.1/test-legacy/fixtures/fail-exit.js000066400000000000000000000001621327737073000216240ustar00rootroot00000000000000console.log('TAP Version 13') console.log('ok - 1 but it will exit non-zero') console.log('1..1') process.exit(1) node-tap-12.0.1/test-legacy/fixtures/fail-zero-exit.js000066400000000000000000000001621327737073000226010ustar00rootroot00000000000000console.log('TAP Version 13') console.log('not ok - 1 but it will exit zero') console.log('1..1') process.exit(0) node-tap-12.0.1/test-legacy/fixtures/gc-script.js000066400000000000000000000000331327737073000216320ustar00rootroot00000000000000console.error(!!global.gc) node-tap-12.0.1/test-legacy/fixtures/invalid-rc-file.yml000066400000000000000000000000211327737073000230660ustar00rootroot00000000000000asdf: asdf: asdf node-tap-12.0.1/test-legacy/fixtures/never-finish.js000066400000000000000000000001541327737073000223400ustar00rootroot00000000000000var t = require('../..') t.pass('this is ok') setInterval(function () { t.pass('still going...') }, 1000) node-tap-12.0.1/test-legacy/fixtures/success.js000066400000000000000000000001231327737073000214070ustar00rootroot00000000000000console.log('TAP version 13') console.log('ok - 1 and exit 0') console.log('1..1') node-tap-12.0.1/test-legacy/fixtures/trivial-success.js000066400000000000000000000000011327737073000230520ustar00rootroot00000000000000 node-tap-12.0.1/test-legacy/fixtures/using-require-hook.faux000066400000000000000000000000541327737073000240260ustar00rootroot00000000000000The actual content of this file is ignored. node-tap-12.0.1/test-legacy/fixtures/using-require-hook.js000066400000000000000000000011551327737073000235020ustar00rootroot00000000000000// 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-12.0.1/test-legacy/fixtures/valid-rc-file.yml000066400000000000000000000001341327737073000225440ustar00rootroot00000000000000# this is a comment timeout: 9999 coverage: false coverageReport: false reporter: 'classic' node-tap-12.0.1/test-legacy/independent-timeouts.js000066400000000000000000000016461327737073000222450ustar00rootroot00000000000000// 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-12.0.1/test-legacy/nested-async.js000066400000000000000000000013611327737073000204700ustar00rootroot00000000000000var 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-12.0.1/test-legacy/nested-test.js000066400000000000000000000006541327737073000203360ustar00rootroot00000000000000var 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-12.0.1/test-legacy/non-enumerable-match.js000066400000000000000000000003251327737073000220730ustar00rootroot00000000000000var 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-12.0.1/test-legacy/only-non-tap-output.js000066400000000000000000000016431327737073000217670ustar00rootroot00000000000000if (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-12.0.1/test-legacy/rcfiles.js000066400000000000000000000036401327737073000175240ustar00rootroot00000000000000var 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-12.0.1/test-legacy/require-hooks.js000066400000000000000000000015171327737073000206730ustar00rootroot00000000000000var 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-12.0.1/test-legacy/root-no-tests.js000066400000000000000000000032551327737073000206340ustar00rootroot00000000000000// 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-12.0.1/test-legacy/runner-bailout-args.js000066400000000000000000000041431327737073000217740ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-colors.js000066400000000000000000000034301327737073000207020ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-dashdash.js000066400000000000000000000006601327737073000211620ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-epipe.js000066400000000000000000000036611327737073000205110ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-jobs.js000066400000000000000000000015321327737073000203370ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-no-cov-args.js000066400000000000000000000020371327737073000215360ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-non-zero-exit.js000066400000000000000000000021171327737073000221200ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-nyc-args.js000066400000000000000000000023171327737073000211270ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-output-file.js000066400000000000000000000020641327737073000216600ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-path-globbing.js000066400000000000000000000020201327737073000221100ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-read-stdin.js000066400000000000000000000076201327737073000214400ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-save-file.js000066400000000000000000000064371327737073000212660ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-test-args.js000066400000000000000000000021621327737073000213130ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-timeout.js000066400000000000000000000031331327737073000210670ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-unknown-arg.js000066400000000000000000000024631327737073000216540ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-usage.js000066400000000000000000000032411327737073000205050ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-version.js000066400000000000000000000023341327737073000210700ustar00rootroot00000000000000var 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-12.0.1/test-legacy/runner-warn-covering-stdin.js000066400000000000000000000021041327737073000232760ustar00rootroot00000000000000var 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-12.0.1/test-legacy/spawn-failures.js000066400000000000000000000024461327737073000210400ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test-args.js000066400000000000000000000037701327737073000200120ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test-bail-buffer.js000066400000000000000000000001011327737073000212150ustar00rootroot00000000000000var runTests = require('./test.js') runTests('*.js', true, true) node-tap-12.0.1/test-legacy/test-bail.js000066400000000000000000000001021327737073000177470ustar00rootroot00000000000000var runTests = require('./test.js') runTests('*.js', true, false) node-tap-12.0.1/test-legacy/test-buffer.js000066400000000000000000000001021327737073000203110ustar00rootroot00000000000000var runTests = require('./test.js') runTests('*.js', false, true) node-tap-12.0.1/test-legacy/test-test.js000066400000000000000000000102211327737073000200220ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test.js000066400000000000000000000122051327737073000170510ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/000077500000000000000000000000001327737073000165135ustar00rootroot00000000000000node-tap-12.0.1/test-legacy/test/assert-at--bail--buffer.tap000066400000000000000000000003561327737073000234360ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/assert-at--bail.tap000066400000000000000000000003161327737073000221060ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/assert-at--buffer.tap000066400000000000000000000013171327737073000224520ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/assert-at.js000066400000000000000000000007251327737073000207600ustar00rootroot00000000000000// 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-12.0.1/test-legacy/test/assert-at.tap000066400000000000000000000013321327737073000211230ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/assert-todo-skip--buffer.tap000066400000000000000000000015351327737073000237610ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/assert-todo-skip.js000066400000000000000000000010111327737073000222520ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/assert-todo-skip.tap000066400000000000000000000015551327737073000224370ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/async--buffer.tap000066400000000000000000000003361327737073000216640ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/async.js000066400000000000000000000003301327737073000201620ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/async.tap000066400000000000000000000004131327737073000203340ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-child--bail--buffer.tap000066400000000000000000000005511327737073000235200ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-child--bail.tap000066400000000000000000000004451327737073000221760ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-child--buffer.tap000066400000000000000000000005511327737073000225360ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-child.js000066400000000000000000000005211327737073000210370ustar00rootroot00000000000000// 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-12.0.1/test-legacy/test/bail-child.tap000066400000000000000000000004451327737073000212140ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-error-object--bail--buffer.tap000066400000000000000000000000511327737073000250250ustar00rootroot00000000000000TAP version 13 Bail out! TypeError: wat node-tap-12.0.1/test-legacy/test/bail-error-object--bail.tap000066400000000000000000000000511327737073000235010ustar00rootroot00000000000000TAP version 13 Bail out! TypeError: wat node-tap-12.0.1/test-legacy/test/bail-error-object--buffer.tap000066400000000000000000000000511327737073000240430ustar00rootroot00000000000000TAP version 13 Bail out! TypeError: wat node-tap-12.0.1/test-legacy/test/bail-error-object.js000066400000000000000000000002731327737073000223550ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/bail-error-object.tap000066400000000000000000000000511327737073000225170ustar00rootroot00000000000000TAP version 13 Bail out! TypeError: wat node-tap-12.0.1/test-legacy/test/bail-fail-spawn--bail--buffer.tap000066400000000000000000000020711327737073000244750ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-fail-spawn--bail.tap000066400000000000000000000014401327737073000231500ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-fail-spawn--buffer.tap000066400000000000000000000020711327737073000235130ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-fail-spawn.js000066400000000000000000000004441327737073000220210ustar00rootroot00000000000000// 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-12.0.1/test-legacy/test/bail-fail-spawn.tap000066400000000000000000000014401327737073000221660ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-teardown--bail--buffer.tap000066400000000000000000000002401327737073000242530ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-teardown--bail.tap000066400000000000000000000002551327737073000227350ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-teardown--buffer.tap000066400000000000000000000002401327737073000232710ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bail-teardown-async--bail--buffer.tap000066400000000000000000000001451327737073000253720ustar00rootroot00000000000000TAP version 13 ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ { 1..0 } Bail out! teardown fail node-tap-12.0.1/test-legacy/test/bail-teardown-async--bail.tap000066400000000000000000000002121327737073000240410ustar00rootroot00000000000000TAP version 13 # Subtest: foobar test 1..0 ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ # Subtest: barfoo Bail out! teardown fail node-tap-12.0.1/test-legacy/test/bail-teardown-async--buffer.tap000066400000000000000000000001451327737073000244100ustar00rootroot00000000000000TAP version 13 ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ { 1..0 } Bail out! teardown fail node-tap-12.0.1/test-legacy/test/bail-teardown-async.js000066400000000000000000000006111327737073000227120ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/bail-teardown-async.tap000066400000000000000000000002121327737073000230570ustar00rootroot00000000000000TAP version 13 # Subtest: foobar test 1..0 ok 1 - foobar test ___/# time=[0-9.]+(ms)?/~~~ # Subtest: barfoo Bail out! teardown fail node-tap-12.0.1/test-legacy/test/bail-teardown.js000066400000000000000000000003071327737073000216010ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/bail-teardown.tap000066400000000000000000000002551327737073000217530ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bailout--buffer.tap000066400000000000000000000011461327737073000222060ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/bailout-with-stuff-after--bail--buffer.tap000066400000000000000000000000471327737073000263640ustar00rootroot00000000000000TAP version 13 Bail out! this is fine node-tap-12.0.1/test-legacy/test/bailout-with-stuff-after--bail.tap000066400000000000000000000000471327737073000250400ustar00rootroot00000000000000TAP version 13 Bail out! this is fine node-tap-12.0.1/test-legacy/test/bailout-with-stuff-after--buffer.tap000066400000000000000000000000471327737073000254020ustar00rootroot00000000000000TAP version 13 Bail out! this is fine node-tap-12.0.1/test-legacy/test/bailout-with-stuff-after.js000066400000000000000000000003101327737073000236770ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/bailout-with-stuff-after.tap000066400000000000000000000000471327737073000240560ustar00rootroot00000000000000TAP version 13 Bail out! this is fine node-tap-12.0.1/test-legacy/test/bailout.js000066400000000000000000000012251327737073000205100ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/bailout.tap000066400000000000000000000011651327737073000206630ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each--buffer.tap000066400000000000000000000010101327737073000237740ustar00rootroot000000000000000 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-12.0.1/test-legacy/test/before-after-each-async--buffer.tap000066400000000000000000000007451327737073000251250ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-async.js000066400000000000000000000011651327737073000234260ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/before-after-each-async.tap000066400000000000000000000010221327737073000235660ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-plan--buffer.tap000066400000000000000000000007271327737073000247420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-plan.js000066400000000000000000000011051327737073000232350ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/before-after-each-plan.tap000066400000000000000000000010221327737073000234030ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-promise--bail--buffer.tap000066400000000000000000000013101327737073000264350ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-promise--bail.tap000066400000000000000000000011161327737073000251150ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-promise--buffer.tap000066400000000000000000000014771327737073000254710ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-promise.js000066400000000000000000000015621327737073000237700ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/before-after-each-promise.tap000066400000000000000000000015541327737073000241410ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-raise--bail--buffer.tap000066400000000000000000000012751327737073000260740ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-raise--bail.tap000066400000000000000000000011211327737073000245360ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-raise--buffer.tap000066400000000000000000000014711327737073000251100ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-raise.js000066400000000000000000000012141327737073000234070ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/before-after-each-raise.tap000066400000000000000000000015461327737073000235670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-throw--bail--buffer.tap000066400000000000000000000012731327737073000261320ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-throw--bail.tap000066400000000000000000000011171327737073000246030ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-throw--buffer.tap000066400000000000000000000014671327737073000251550ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each-throw.js000066400000000000000000000012671327737073000234570ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/before-after-each-throw.tap000066400000000000000000000015441327737073000236250ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/before-after-each.js000066400000000000000000000014041327737073000223070ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/before-after-each.tap000066400000000000000000000010471327737073000224620ustar00rootroot000000000000000 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-12.0.1/test-legacy/test/buffer-yaml--bail--buffer.tap000066400000000000000000000074411327737073000237460ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/buffer-yaml--bail.tap000066400000000000000000000074411327737073000224220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/buffer-yaml--buffer.tap000066400000000000000000000074611327737073000227660ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/buffer-yaml.js000066400000000000000000000002231327737073000212570ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/buffer-yaml.tap000066400000000000000000000074611327737073000214420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/buffered--buffer.tap000066400000000000000000000016231327737073000223310ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/buffered.js000066400000000000000000000007531327737073000206400ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/buffered.tap000066400000000000000000000017411327737073000210060ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/catch-tap-throws--bail--buffer.tap000066400000000000000000000005221327737073000247160ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/catch-tap-throws--bail.tap000066400000000000000000000005421327737073000233740ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/catch-tap-throws--buffer.tap000066400000000000000000000032241327737073000237360ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/catch-tap-throws.js000066400000000000000000000030221327737073000222360ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/catch-tap-throws.tap000066400000000000000000000034631327737073000224170ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-sigterm-after-end--buffer.tap000066400000000000000000000004441327737073000251450ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-sigterm-after-end.js000066400000000000000000000011461327737073000234510ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/child-sigterm-after-end.tap000066400000000000000000000004441327737073000236210ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-buffer--bail--buffer.tap000066400000000000000000000005451327737073000250470ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-buffer--bail.tap000066400000000000000000000005051327737073000235170ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-buffer--buffer.tap000066400000000000000000000011511327737073000240570ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-buffer.js000066400000000000000000000011001327737073000223550ustar00rootroot00000000000000if (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-12.0.1/test-legacy/test/child-text-buffer.tap000066400000000000000000000012571327737073000225420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-indentsub--bail--buffer.tap000066400000000000000000000005071327737073000255670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-indentsub--bail.tap000066400000000000000000000004471327737073000242460ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-indentsub--buffer.tap000066400000000000000000000012341327737073000246030ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-indentsub.js000066400000000000000000000011771327737073000231150ustar00rootroot00000000000000if (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-12.0.1/test-legacy/test/child-text-indentsub.tap000066400000000000000000000013501327737073000232560ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-sub--bail--buffer.tap000066400000000000000000000004731327737073000243670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-sub--bail.tap000066400000000000000000000004331327737073000230370ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-sub--buffer.tap000066400000000000000000000012201327737073000233740ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/child-text-sub.js000066400000000000000000000011471327737073000217100ustar00rootroot00000000000000if (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-12.0.1/test-legacy/test/child-text-sub.tap000066400000000000000000000013201327737073000220510ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/console-log--buffer.tap000066400000000000000000000016351327737073000227730ustar00rootroot00000000000000>>>> 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-12.0.1/test-legacy/test/console-log.js000066400000000000000000000025331327737073000212750ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/console-log.tap000066400000000000000000000017351327737073000214500ustar00rootroot00000000000000>>>> 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-12.0.1/test-legacy/test/deferred-comment--buffer.tap000066400000000000000000000002051327737073000237620ustar00rootroot00000000000000TAP version 13 ok 1 - child ___/# time=[0-9.]+(ms)?/~~~ { 1..0 } # this is {"some":true} json 1..1 ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/deferred-comment.js000066400000000000000000000002241327737073000222670ustar00rootroot00000000000000var t = require('../..') t.test('child', function (t) { setTimeout(function () { t.end() }) }) t.comment('this is %j json', { some: true }) node-tap-12.0.1/test-legacy/test/deferred-comment.tap000066400000000000000000000002221327737073000224350ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/descendant-fail--bail--buffer.tap000066400000000000000000000005551327737073000245550ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/descendant-fail--bail.tap000066400000000000000000000004511327737073000232240ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/descendant-fail--buffer.tap000066400000000000000000000006411327737073000235670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/descendant-fail.js000066400000000000000000000002311327737073000220660ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/descendant-fail.tap000066400000000000000000000006741327737073000222510ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/does-not-throw-message--bail--buffer.tap000066400000000000000000000004461327737073000260460ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/does-not-throw-message--bail.tap000066400000000000000000000004461327737073000245220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/does-not-throw-message--buffer.tap000066400000000000000000000004651327737073000250650ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/does-not-throw-message.js000066400000000000000000000001521327737073000233620ustar00rootroot00000000000000var t = require('../..') t.doesNotThrow(function () { throw new TypeError('this is a type of error') }) node-tap-12.0.1/test-legacy/test/does-not-throw-message.tap000066400000000000000000000004651327737073000235410ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/domain-escaping--bail--buffer.tap000066400000000000000000000007241327737073000245700ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/domain-escaping--bail.tap000066400000000000000000000007021327737073000232400ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/domain-escaping--buffer.tap000066400000000000000000000046371327737073000236150ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/domain-escaping.js000066400000000000000000000025271327737073000221150ustar00rootroot00000000000000// 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-12.0.1/test-legacy/test/domain-escaping.tap000066400000000000000000000050511327737073000222600ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/emitter-match--bail--buffer.tap000066400000000000000000000007221327737073000242730ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/emitter-match--bail.tap000066400000000000000000000006621327737073000227520ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/emitter-match--buffer.tap000066400000000000000000000007111327737073000233070ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/emitter-match.js000066400000000000000000000004171327737073000216160ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/emitter-match.tap000066400000000000000000000007411327737073000217660ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/empty--buffer.tap000066400000000000000000000000011327737073000216720ustar00rootroot00000000000000 node-tap-12.0.1/test-legacy/test/empty.js000066400000000000000000000000211327737073000202000ustar00rootroot00000000000000require('../..') node-tap-12.0.1/test-legacy/test/empty.tap000066400000000000000000000000011327737073000203460ustar00rootroot00000000000000 node-tap-12.0.1/test-legacy/test/end-end--bail--buffer.tap000066400000000000000000000003221327737073000230360ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-end--bail.tap000066400000000000000000000003411327737073000215130ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-end--buffer.tap000066400000000000000000000016631327737073000220650ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-end.js000066400000000000000000000011671327737073000203700ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/end-end.tap000066400000000000000000000020631327737073000205340ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-event-timing--buffer.tap000066400000000000000000000004721327737073000237220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-event-timing.js000066400000000000000000000011001327737073000222130ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/end-event-timing.tap000066400000000000000000000005251327737073000223750ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-exception--bail--buffer.tap000066400000000000000000000003761327737073000242770ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-exception--bail.tap000066400000000000000000000004041327737073000227430ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-exception--buffer.tap000066400000000000000000000004441327737073000233110ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/end-exception.js000066400000000000000000000002561327737073000216160ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/end-exception.tap000066400000000000000000000004521327737073000217640ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/equivalent--bail--buffer.tap000066400000000000000000000006171327737073000237100ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/equivalent--bail.tap000066400000000000000000000005571327737073000223670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/equivalent--buffer.tap000066400000000000000000000035071327737073000227270ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/equivalent.js000066400000000000000000000007441327737073000212330ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/equivalent.tap000066400000000000000000000035311327737073000214000ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/exit-on-bailout--bail--buffer.tap000066400000000000000000000004731327737073000245530ustar00rootroot00000000000000log 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-12.0.1/test-legacy/test/exit-on-bailout--bail.tap000066400000000000000000000003231327737073000232210ustar00rootroot00000000000000log 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-12.0.1/test-legacy/test/exit-on-bailout--buffer.tap000066400000000000000000000004731327737073000235710ustar00rootroot00000000000000log 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-12.0.1/test-legacy/test/exit-on-bailout.js000066400000000000000000000007631327737073000220770ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/exit-on-bailout.tap000066400000000000000000000003231327737073000222370ustar00rootroot00000000000000log 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-12.0.1/test-legacy/test/exit-on-exit--buffer.tap000066400000000000000000000025471327737073000231070ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/exit-on-exit.js000066400000000000000000000030561327737073000214070ustar00rootroot00000000000000process.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-12.0.1/test-legacy/test/exit-on-exit.tap000066400000000000000000000031431327737073000215540ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/grep--buffer.tap000066400000000000000000000057411327737073000215110ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/grep.js000066400000000000000000000016741327737073000200160ustar00rootroot00000000000000// 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-12.0.1/test-legacy/test/grep.tap000066400000000000000000000066351327737073000201700ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mocha-bdd--buffer.tap000066400000000000000000000023041327737073000223620ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mocha-bdd.js000066400000000000000000000021171327737073000206700ustar00rootroot00000000000000if (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-12.0.1/test-legacy/test/mocha-bdd.tap000066400000000000000000000026241327737073000210430ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mochalike--bail--buffer.tap000066400000000000000000000035401327737073000234650ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mochalike--bail.tap000066400000000000000000000037571327737073000221530ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mochalike--buffer.tap000066400000000000000000000055651327737073000225140ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mochalike-ok--buffer.tap000066400000000000000000000023371327737073000231150ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mochalike-ok.js000066400000000000000000000021721327737073000214160ustar00rootroot00000000000000if (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-12.0.1/test-legacy/test/mochalike-ok.tap000066400000000000000000000027321327737073000215700ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/mochalike.js000066400000000000000000000032721327737073000210110ustar00rootroot00000000000000if (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-12.0.1/test-legacy/test/mochalike.tap000066400000000000000000000064501327737073000211620ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/nesting--bail--buffer.tap000066400000000000000000000011531327737073000231760ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/nesting--bail.tap000066400000000000000000000010641327737073000216530ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/nesting--buffer.tap000066400000000000000000000022661327737073000222220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/nesting.js000066400000000000000000000014041327737073000205170ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/nesting.tap000066400000000000000000000023611327737073000206720ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/no-diags--bail--buffer.tap000066400000000000000000000001051327737073000232240ustar00rootroot00000000000000TAP version 13 not ok 1 - this is not ok Bail out! # this is not ok node-tap-12.0.1/test-legacy/test/no-diags--bail.tap000066400000000000000000000001051327737073000217000ustar00rootroot00000000000000TAP version 13 not ok 1 - this is not ok Bail out! # this is not ok node-tap-12.0.1/test-legacy/test/no-diags--buffer.tap000066400000000000000000000003331327737073000222450ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/no-diags.js000066400000000000000000000003131327737073000205470ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/no-diags.tap000066400000000000000000000003611327737073000207220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/non-tap-output--buffer.tap000066400000000000000000000003411327737073000234550ustar00rootroot00000000000000everything 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-12.0.1/test-legacy/test/non-tap-output.js000066400000000000000000000005101327737073000217570ustar00rootroot00000000000000console.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-12.0.1/test-legacy/test/non-tap-output.tap000066400000000000000000000003411327737073000221310ustar00rootroot00000000000000everything 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-12.0.1/test-legacy/test/not-ok--bail--buffer.tap000066400000000000000000000002731327737073000227400ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/not-ok--bail.tap000066400000000000000000000002731327737073000214140ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/not-ok--buffer.tap000066400000000000000000000003211327737073000217500ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/not-ok-nested--bail--buffer.tap000066400000000000000000000005431327737073000242200ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/not-ok-nested--bail.tap000066400000000000000000000004371327737073000226760ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/not-ok-nested--buffer.tap000066400000000000000000000006341327737073000232370ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/not-ok-nested.js000066400000000000000000000002151327737073000215360ustar00rootroot00000000000000var t = require('../..') t.test('gp', function (t) { t.plan(1) t.test('parent', function (t) { t.plan(1) t.fail('fail') }) }) node-tap-12.0.1/test-legacy/test/not-ok-nested.tap000066400000000000000000000006641327737073000217160ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/not-ok.js000066400000000000000000000000631327737073000202570ustar00rootroot00000000000000var t = require('../..') t.fail('this is not ok') node-tap-12.0.1/test-legacy/test/not-ok.tap000066400000000000000000000003211327737073000204240ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/ok--buffer.tap000066400000000000000000000010501327737073000211520ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/ok-diags--buffer.tap000066400000000000000000000002711327737073000222430ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/ok-diags.js000066400000000000000000000003031327737073000205430ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/ok-diags.tap000066400000000000000000000003061327737073000207160ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/ok-exit-fail--bail--buffer.tap000066400000000000000000000001461327737073000240210ustar00rootroot00000000000000TAP version 13 ok 1 - this passes but the exit code makes it not ok 1..1 ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/ok-exit-fail--bail.tap000066400000000000000000000001461327737073000224750ustar00rootroot00000000000000TAP version 13 ok 1 - this passes but the exit code makes it not ok 1..1 ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/ok-exit-fail--buffer.tap000066400000000000000000000001461327737073000230370ustar00rootroot00000000000000TAP version 13 ok 1 - this passes but the exit code makes it not ok 1..1 ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/ok-exit-fail.js000066400000000000000000000001411327737073000213360ustar00rootroot00000000000000var t = require('../..') t.pass('this passes but the exit code makes it not ok') process.exit(1) node-tap-12.0.1/test-legacy/test/ok-exit-fail.tap000066400000000000000000000001461327737073000215130ustar00rootroot00000000000000TAP version 13 ok 1 - this passes but the exit code makes it not ok 1..1 ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/ok.js000066400000000000000000000016521327737073000174660ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/ok.tap000066400000000000000000000011501327737073000176270ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/only--buffer.tap000066400000000000000000000053121327737073000215270ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/only.js000066400000000000000000000012761327737073000200400ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/only.tap000066400000000000000000000063271327737073000202120ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pending-handles--bail--buffer.tap000066400000000000000000000007351327737073000245740ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pending-handles--bail.tap000066400000000000000000000004411327737073000232420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pending-handles--buffer.tap000066400000000000000000000010721327737073000236050ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pending-handles.js000066400000000000000000000003201327737073000221040ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/pending-handles.tap000066400000000000000000000011751327737073000222650ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-async--buffer.tap000066400000000000000000000003321327737073000226100ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-async.js000066400000000000000000000002561327737073000211210ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/plan-async.tap000066400000000000000000000004031327737073000212630ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-failures--bail--buffer.tap000066400000000000000000000005151327737073000242720ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-failures--bail.tap000066400000000000000000000005521327737073000227470ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-failures--buffer.tap000066400000000000000000000042061327737073000233110ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-failures.js000066400000000000000000000007641327737073000216220ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/plan-failures.tap000066400000000000000000000045521327737073000217710ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-too-many--bail--buffer.tap000066400000000000000000000010621327737073000242210ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-too-many--bail.tap000066400000000000000000000007561327737073000227060ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-too-many--buffer.tap000066400000000000000000000012431327737073000232400ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/plan-too-many.js000066400000000000000000000004021327737073000215400ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/plan-too-many.tap000066400000000000000000000013221327737073000217120ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pragma--bail--buffer.tap000066400000000000000000000012371327737073000230010ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pragma--bail.tap000066400000000000000000000013321327737073000214510ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pragma--buffer.tap000066400000000000000000000016701327737073000220200ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/pragma.js000066400000000000000000000014051327737073000203200ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/pragma.tap000066400000000000000000000015031327737073000204670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise--buffer.tap000066400000000000000000000033151327737073000222250ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-fails--bail--buffer.tap000066400000000000000000000010771327737073000243060ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-fails--bail.tap000066400000000000000000000006471327737073000227640ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-fails--buffer.tap000066400000000000000000000034121327737073000233170ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-fails.js000066400000000000000000000020601327737073000216210ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/promise-fails.tap000066400000000000000000000036111327737073000217740ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-plan--bail--buffer.tap000066400000000000000000000012751327737073000241420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-plan--bail.tap000066400000000000000000000014121327737073000226070ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-plan--buffer.tap000066400000000000000000000026601327737073000231570ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-plan.js000066400000000000000000000027401327737073000214620ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/promise-plan.tap000066400000000000000000000031621327737073000216310ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return--bail--buffer.tap000066400000000000000000000007001327737073000245170ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return--bail.tap000066400000000000000000000006731327737073000232040ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return--buffer.tap000066400000000000000000000007331327737073000235430ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return-mocha--bail--buffer.tap000066400000000000000000000010301327737073000256010ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return-mocha--bail.tap000066400000000000000000000012041327737073000242600ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return-mocha--buffer.tap000066400000000000000000000014301327737073000246230ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return-mocha.js000066400000000000000000000015211327737073000231300ustar00rootroot00000000000000/* 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-12.0.1/test-legacy/test/promise-return-mocha.tap000066400000000000000000000016041327737073000233020ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise-return.js000066400000000000000000000007711327737073000220510ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/promise-return.tap000066400000000000000000000010061327737073000222110ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/promise.js000066400000000000000000000022151327737073000205270ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/promise.tap000066400000000000000000000040251327737073000207000ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/rejects--bail--buffer.tap000066400000000000000000000012741327737073000231720ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/rejects--bail.tap000066400000000000000000000012741327737073000216460ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/rejects--buffer.tap000066400000000000000000000075521327737073000222150ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/rejects.js000066400000000000000000000031511327737073000205100ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/rejects.tap000066400000000000000000000075521327737073000206710ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/root-teardown--buffer.tap000066400000000000000000000003111327737073000233440ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/root-teardown.js000066400000000000000000000011251327737073000216540ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/root-teardown.tap000066400000000000000000000003331327737073000220240ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/segv--bail--buffer.tap000066400000000000000000000004501327737073000224720ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/segv--bail.tap000066400000000000000000000005051327737073000211470ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/segv--buffer.tap000066400000000000000000000005151327737073000215120ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/segv.js000066400000000000000000000013441327737073000200170ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/segv.tap000066400000000000000000000005511327737073000201660ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/skip--buffer.tap000066400000000000000000000001431327737073000215110ustar00rootroot00000000000000TAP version 13 ok 1 - does not count as failure # SKIP 1..1 # skip: 1 ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/skip-all--buffer.tap000066400000000000000000000001101327737073000222510ustar00rootroot00000000000000TAP version 13 1..0 # Skip all these tests ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/skip-all.js000066400000000000000000000000611327737073000205620ustar00rootroot00000000000000require('../..').plan(0, 'Skip all these tests') node-tap-12.0.1/test-legacy/test/skip-all.tap000066400000000000000000000001101327737073000207250ustar00rootroot00000000000000TAP version 13 1..0 # Skip all these tests ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/skip.js000066400000000000000000000001561327737073000200210ustar00rootroot00000000000000var tap = require('../..') tap.test('does not count as failure', { skip: true }, function (t) { t.end() }) node-tap-12.0.1/test-legacy/test/skip.tap000066400000000000000000000001431327737073000201650ustar00rootroot00000000000000TAP version 13 ok 1 - does not count as failure # SKIP 1..1 # skip: 1 ___/# time=[0-9.]+(ms)?/~~~ node-tap-12.0.1/test-legacy/test/source-map-fail--bail--buffer.tap000066400000000000000000000005061327737073000245140ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/source-map-fail--bail.tap000066400000000000000000000004021327737073000231630ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/source-map-fail--buffer.tap000066400000000000000000000005771327737073000235420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/source-map-fail-bail.tap000066400000000000000000000004241327737073000231120ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/source-map-fail.coffee000066400000000000000000000001541327737073000226500ustar00rootroot00000000000000t = require '../..' t.test 'gp', (t) -> t.plan 1 t.test 'parent', (t) -> t.plan 1 t.fail 'fail'node-tap-12.0.1/test-legacy/test/source-map-fail.js000066400000000000000000000004441327737073000220370ustar00rootroot00000000000000// 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-12.0.1/test-legacy/test/source-map-fail.js.map000066400000000000000000000006451327737073000226160ustar00rootroot00000000000000{ "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-12.0.1/test-legacy/test/source-map-fail.tap000066400000000000000000000006271327737073000222120ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/sparse-array--bail--buffer.tap000066400000000000000000000004401327737073000241360ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/sparse-array--bail.tap000066400000000000000000000004401327737073000226120ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/sparse-array--buffer.tap000066400000000000000000000010251327737073000231540ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/sparse-array.js000066400000000000000000000002031327737073000214550ustar00rootroot00000000000000var t = require('../..') t.similar([1,, 3], [1, 2, 3]) // eslint-disable-line t.similar([1,,,], [1, 2, 3]) // eslint-disable-line node-tap-12.0.1/test-legacy/test/sparse-array.tap000066400000000000000000000010251327737073000216300ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn--bail--buffer.tap000066400000000000000000000016261327737073000226640ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn--bail.tap000066400000000000000000000012631327737073000213350ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn--buffer.tap000066400000000000000000000053421327737073000217010ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-empty--buffer.tap000066400000000000000000000002571327737073000230350ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-empty.js000066400000000000000000000001631327737073000213350ustar00rootroot00000000000000if (process.argv[2] !== 'child') { var t = require('../..') t.spawn(process.execPath, [__filename, 'child']) } node-tap-12.0.1/test-legacy/test/spawn-empty.tap000066400000000000000000000003561327737073000215110ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-failures--bail--buffer.tap000066400000000000000000000013311327737073000244650ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-failures--bail.tap000066400000000000000000000010311327737073000231360ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-failures--buffer.tap000066400000000000000000000027771327737073000235220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-failures.js000066400000000000000000000014461327737073000220160ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/spawn-failures.tap000066400000000000000000000032551327737073000221660ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-stderr--buffer.tap000066400000000000000000000003341327737073000231760ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn-stderr.js000066400000000000000000000003011327737073000214740ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/spawn-stderr.tap000066400000000000000000000004341327737073000216530ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/spawn.js000066400000000000000000000015351327737073000202050ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/spawn.tap000066400000000000000000000056211327737073000203550ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/stdin--bail--buffer.tap000066400000000000000000000017251327737073000226550ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/stdin--bail.tap000066400000000000000000000011061327737073000213220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/stdin--buffer.tap000066400000000000000000000020001327737073000216560ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/stdin.js000066400000000000000000000017421327737073000201760ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/stdin.tap000066400000000000000000000020441327737073000203420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/subtest-only-options--buffer.tap000066400000000000000000000001341327737073000247040ustar00rootroot00000000000000TAP version 13 ok 1 - (unnamed test) # SKIP --- {"some":"diags"} ... 1..1 # skip: 1 node-tap-12.0.1/test-legacy/test/subtest-only-options.js000066400000000000000000000002131327737073000232060ustar00rootroot00000000000000var Test = require('../..').Test var t = new Test() t.pipe(process.stdout) t.test({ skip: true, some: 'diags', diagnostic: true }) t.end() node-tap-12.0.1/test-legacy/test/subtest-only-options.tap000066400000000000000000000001341327737073000233600ustar00rootroot00000000000000TAP version 13 ok 1 - (unnamed test) # SKIP --- {"some":"diags"} ... 1..1 # skip: 1 node-tap-12.0.1/test-legacy/test/subtest-preplan--buffer.tap000066400000000000000000000007351327737073000237020ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/subtest-preplan.js000066400000000000000000000006741327737073000222100ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/subtest-preplan.tap000066400000000000000000000010611327737073000223470ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/subtest-with-name-and-function--buffer.tap000066400000000000000000000001131327737073000265030ustar00rootroot00000000000000TAP version 13 ok 1 - name ___/# time=[0-9.]+(ms)?/~~~ { 1..0 } 1..1 node-tap-12.0.1/test-legacy/test/subtest-with-name-and-function.js000066400000000000000000000001711327737073000250130ustar00rootroot00000000000000var Test = require('../..').Test var t = new Test() t.pipe(process.stdout) t.test('name', function (t){t.end()}) t.end() node-tap-12.0.1/test-legacy/test/subtest-with-name-and-function.tap000066400000000000000000000001271327737073000251640ustar00rootroot00000000000000TAP version 13 # Subtest: name 1..0 ok 1 - name ___/# time=[0-9.]+(ms)?/~~~ 1..1 node-tap-12.0.1/test-legacy/test/subtest-with-name-and-options--buffer.tap000066400000000000000000000001221327737073000263510ustar00rootroot00000000000000TAP version 13 ok 1 - name # SKIP --- {"some":"diags"} ... 1..1 # skip: 1 node-tap-12.0.1/test-legacy/test/subtest-with-name-and-options.js000066400000000000000000000002231327737073000246570ustar00rootroot00000000000000var Test = require('../..').Test var t = new Test() t.pipe(process.stdout) t.test('name', { skip: true, some: 'diags', diagnostic: true }) t.end() node-tap-12.0.1/test-legacy/test/subtest-with-name-and-options.tap000066400000000000000000000001221327737073000250250ustar00rootroot00000000000000TAP version 13 ok 1 - name # SKIP --- {"some":"diags"} ... 1..1 # skip: 1 node-tap-12.0.1/test-legacy/test/subtest-with-only-a-function--buffer.tap000066400000000000000000000001041327737073000262220ustar00rootroot00000000000000TAP version 13 ok 1 ___/# time=[0-9.]+(ms)?/~~~ { 1..0 } 1..1 node-tap-12.0.1/test-legacy/test/subtest-with-only-a-function.js000066400000000000000000000001611327737073000245310ustar00rootroot00000000000000var Test = require('../..').Test var t = new Test() t.pipe(process.stdout) t.test(function (t){t.end()}) t.end() node-tap-12.0.1/test-legacy/test/subtest-with-only-a-function.tap000066400000000000000000000001121327737073000246750ustar00rootroot00000000000000TAP version 13 # Subtest 1..0 ok 1 ___/# time=[0-9.]+(ms)?/~~~ 1..1 node-tap-12.0.1/test-legacy/test/subtest-with-only-a-name--buffer.tap000066400000000000000000000000671327737073000253250ustar00rootroot00000000000000TAP version 13 ok 1 - name only # TODO 1..1 # todo: 1 node-tap-12.0.1/test-legacy/test/subtest-with-only-a-name.js000066400000000000000000000001471327737073000236300ustar00rootroot00000000000000var Test = require('../..').Test var t = new Test() t.pipe(process.stdout) t.test('name only') t.end() node-tap-12.0.1/test-legacy/test/subtest-with-only-a-name.tap000066400000000000000000000000671327737073000240010ustar00rootroot00000000000000TAP version 13 ok 1 - name only # TODO 1..1 # todo: 1 node-tap-12.0.1/test-legacy/test/subtest-with-options-and-function--buffer.tap000066400000000000000000000001431327737073000272610ustar00rootroot00000000000000TAP version 13 ok 1 ___/# time=[0-9.]+(ms)?/~~~ --- {"some":"diags"} ... { 1..0 } 1..1 node-tap-12.0.1/test-legacy/test/subtest-with-options-and-function.js000066400000000000000000000002431327737073000255660ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/subtest-with-options-and-function.tap000066400000000000000000000001511327737073000257340ustar00rootroot00000000000000TAP version 13 # Subtest 1..0 ok 1 ___/# time=[0-9.]+(ms)?/~~~ --- {"some":"diags"} ... 1..1 node-tap-12.0.1/test-legacy/test/subtest-without-arguments--buffer.tap000066400000000000000000000000741327737073000257430ustar00rootroot00000000000000TAP version 13 ok 1 - (unnamed test) # TODO 1..1 # todo: 1 node-tap-12.0.1/test-legacy/test/subtest-without-arguments.js000066400000000000000000000001341327737073000242440ustar00rootroot00000000000000var Test = require('../..').Test var t = new Test() t.pipe(process.stdout) t.test() t.end() node-tap-12.0.1/test-legacy/test/subtest-without-arguments.tap000066400000000000000000000000741327737073000244170ustar00rootroot00000000000000TAP version 13 ok 1 - (unnamed test) # TODO 1..1 # todo: 1 node-tap-12.0.1/test-legacy/test/sync-timeout--bail--buffer.tap000066400000000000000000000003201327737073000241620ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/sync-timeout--bail.tap000066400000000000000000000003731327737073000226460ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/sync-timeout--buffer.tap000066400000000000000000000006671327737073000232160ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/sync-timeout.js000066400000000000000000000005631327737073000215150ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/sync-timeout.tap000066400000000000000000000007601327737073000216640ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-throw-autocomplete--bail--buffer.tap000066400000000000000000000006411327737073000272130ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-throw-autocomplete--bail.tap000066400000000000000000000006011327737073000256630ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-throw-autocomplete--buffer.tap000066400000000000000000000015071327737073000262330ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-throw-autocomplete.js000066400000000000000000000006311327737073000245340ustar00rootroot00000000000000console.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-12.0.1/test-legacy/test/teardown-throw-autocomplete.tap000066400000000000000000000015241327737073000247060ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-timing--buffer.tap000066400000000000000000000007711327737073000236620ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-timing-throws--bail--buffer.tap000066400000000000000000000013311327737073000261610ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-timing-throws--bail.tap000066400000000000000000000014151327737073000246400ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-timing-throws--buffer.tap000066400000000000000000000025561327737073000252110ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-timing-throws.js000066400000000000000000000017051327737073000235100ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/teardown-timing-throws.tap000066400000000000000000000026421327737073000236610ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/teardown-timing.js000066400000000000000000000013751327737073000221670ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/teardown-timing.tap000066400000000000000000000010551327737073000223320ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw--bail--buffer.tap000066400000000000000000000012111327737073000226650ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw--bail.tap000066400000000000000000000011221327737073000213420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw--buffer.tap000066400000000000000000000023441327737073000217130ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-root--bail--buffer.tap000066400000000000000000000003211327737073000236470ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-root--bail.tap000066400000000000000000000003211327737073000223230ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-root--buffer.tap000066400000000000000000000003651327737073000226750ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-root.js000066400000000000000000000001121327737073000211670ustar00rootroot00000000000000var t = require('../..') t.pass('this is fine') throw new Error('catch!') node-tap-12.0.1/test-legacy/test/throw-root.tap000066400000000000000000000003651327737073000213510ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-twice--bail--buffer.tap000066400000000000000000000005071327737073000240050ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-twice--bail.tap000066400000000000000000000005231327737073000224570ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-twice--buffer.tap000066400000000000000000000010501327737073000230150ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw-twice.js000066400000000000000000000003601327737073000213240ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/throw-twice.tap000066400000000000000000000010641327737073000214760ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throw.js000066400000000000000000000014261327737073000202170ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/throw.tap000066400000000000000000000024041327737073000203640ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws--bail--buffer.tap000066400000000000000000000006211327737073000230540ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws--bail.tap000066400000000000000000000005611327737073000215330ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws--buffer.tap000066400000000000000000000006411327737073000220740ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws-and-plans--bail--buffer.tap000066400000000000000000000007321327737073000247320ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws-and-plans--bail.tap000066400000000000000000000007161327737073000234100ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws-and-plans--buffer.tap000066400000000000000000000044151327737073000237520ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws-and-plans.js000066400000000000000000000024601327737073000222540ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/throws-and-plans.tap000066400000000000000000000046371327737073000224340ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/throws.js000066400000000000000000000004101327737073000203720ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/throws.tap000066400000000000000000000007041327737073000205500ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout--bail--buffer.tap000066400000000000000000000011221327737073000232110ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout--bail.tap000066400000000000000000000006151327737073000216730ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout--buffer.tap000066400000000000000000000015511327737073000222350ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner--bail--buffer.tap000066400000000000000000000013021327737073000252750ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner--bail.tap000066400000000000000000000007361327737073000237630ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner--buffer.tap000066400000000000000000000014761327737073000243270ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-ignore-sigterm--bail--buffer.tap000066400000000000000000000011031327737073000302250ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-ignore-sigterm--bail.tap000066400000000000000000000010321327737073000267020ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-ignore-sigterm--buffer.tap000066400000000000000000000011521327737073000272470ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-ignore-sigterm.js000066400000000000000000000007441327737073000255610ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/timeout-via-runner-ignore-sigterm.tap000066400000000000000000000015611327737073000257270ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-no-plan--bail--buffer.tap000066400000000000000000000013051327737073000266420ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-no-plan--bail.tap000066400000000000000000000007311327737073000253200ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-no-plan--buffer.tap000066400000000000000000000015161327737073000256640ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner-no-plan.js000066400000000000000000000006411327737073000241660ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/timeout-via-runner-no-plan.tap000066400000000000000000000016561327737073000243450ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout-via-runner.js000066400000000000000000000006411327737073000226240ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/timeout-via-runner.tap000066400000000000000000000016261327737073000230000ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/timeout.js000066400000000000000000000010521327737073000205350ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/timeout.tap000066400000000000000000000016771327737073000207220ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/todo--buffer.tap000066400000000000000000000017411327737073000215150ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/todo.js000066400000000000000000000013751327737073000200240ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/todo.tap000066400000000000000000000021261327737073000201670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/type-function--bail--buffer.tap000066400000000000000000000004751327737073000243410ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/type-function--bail.tap000066400000000000000000000004751327737073000230150ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/type-function--buffer.tap000066400000000000000000000013751327737073000233570ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/type-function.js000066400000000000000000000003111327737073000216500ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/type-function.tap000066400000000000000000000013751327737073000220330ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished--bail--buffer.tap000066400000000000000000000006201327737073000236610ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished--bail.tap000066400000000000000000000005141327737073000223370ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished--buffer.tap000066400000000000000000000017701327737073000227060ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-empty--bail--buffer.tap000066400000000000000000000006051327737073000250200ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-empty--bail.tap000066400000000000000000000005011327737073000234670ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-empty--buffer.tap000066400000000000000000000006761327737073000240460ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-empty.js000066400000000000000000000002351327737073000223410ustar00rootroot00000000000000var t = require('../..') t.teardown(function () { console.log('ok') }) t.test('a', function (t) { t.test('b', function (t) { // nothing here }) }) node-tap-12.0.1/test-legacy/test/unfinished-empty.tap000066400000000000000000000007201327737073000225100ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-promise--bail--buffer.tap000066400000000000000000000010541327737073000253370ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-promise--bail.tap000066400000000000000000000007001327737073000240100ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-promise--buffer.tap000066400000000000000000000012631327737073000243570ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished-promise.js000066400000000000000000000003021327737073000226540ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/unfinished-promise.tap000066400000000000000000000013401327737073000230270ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unfinished.js000066400000000000000000000016501327737073000212070ustar00rootroot00000000000000var 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-12.0.1/test-legacy/test/unfinished.tap000066400000000000000000000020151327737073000213530ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unhandled-rejection--bail--buffer.tap000066400000000000000000000003711327737073000254520ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unhandled-rejection--bail.tap000066400000000000000000000003711327737073000241260ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unhandled-rejection--buffer.tap000066400000000000000000000004311327737073000244650ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/test/unhandled-rejection.js000066400000000000000000000004071327737073000227740ustar00rootroot00000000000000if (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-12.0.1/test-legacy/test/unhandled-rejection.tap000066400000000000000000000004311327737073000231410ustar00rootroot00000000000000TAP 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-12.0.1/test-legacy/throw-after-end.js000066400000000000000000000005741327737073000211060ustar00rootroot00000000000000var 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-12.0.1/test-legacy/throws-arg-ordering.js000066400000000000000000000024411327737073000217770ustar00rootroot00000000000000var 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-12.0.1/test/000077500000000000000000000000001327737073000142725ustar00rootroot00000000000000node-tap-12.0.1/test/base.js000066400000000000000000000126071327737073000155500ustar00rootroot00000000000000'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-12.0.1/test/clean-stacks.js000066400000000000000000000040561327737073000172050ustar00rootroot00000000000000'use strict' // Just a utility to clean up the snapshots for output tests const yaml = require('js-yaml') const internals = Object.keys(process.binding('natives')) 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') .replace(/\n( +)file: (.*)\n/g, ($0, $1, $2) => internals.indexOf($2.replace(/\.js$/, '')) === -1 ? $0 : '\n' + $1 + 'file: #INTERNAL#\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-12.0.1/test/clean-yaml-object.js000066400000000000000000000024561327737073000201250ustar00rootroot00000000000000'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-12.0.1/test/diags.js000066400000000000000000000002521327737073000157160ustar00rootroot00000000000000'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-12.0.1/test/extra-from-error.js000066400000000000000000000020641327737073000200450ustar00rootroot00000000000000'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-12.0.1/test/mocha.js000066400000000000000000000067471327737073000157350ustar00rootroot00000000000000'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() })) }) if (process.version.match(/v[0-9]\./)) { assert.throws(_ => mocha.after(), 'cannot call "after" outside of describe()') assert.throws(_ => mocha.before(), 'cannot call "before" outside of describe()') } else { assert.throws(_ => mocha.after(), new Error('cannot call "after" outside of describe()')) assert.throws(_ => mocha.before(), new Error('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-12.0.1/test/obj-to-yaml.js000066400000000000000000000002501327737073000167570ustar00rootroot00000000000000'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-12.0.1/test/parse-test-args.js000066400000000000000000000017161327737073000176560ustar00rootroot00000000000000'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-12.0.1/test/point.js000066400000000000000000000035141327737073000157640ustar00rootroot00000000000000'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-12.0.1/test/regression-many-asserts-epipe.js000066400000000000000000000003501327737073000225320ustar00rootroot00000000000000'use strict' // See https://github.com/tapjs/node-tap/issues/422 const t = require('../') t.test('just a lot of asserts in rapid succession', t => { for (let i = 0; i < 5000; i++) { t.pass('a number is ' + i) } t.end() }) node-tap-12.0.1/test/run.js000066400000000000000000000366051327737073000154460ustar00rootroot00000000000000'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 cleanStacks = require('./clean-stacks.js') // also clean up NYC output a bit, because the line lengths // in the text report can vary on different platforms. const clean = string => cleanStacks(string) .replace(/uncovered line( #)?s/i, 'Uncovered Lines') .replace(/ +\|/g, ' |') .replace(/\| +/g, '| ') .replace(/-+\|/g, '-|') .replace(/\|-+/g, '|-') 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('rc file specifies test files', t => { const testfile = tmpfile(t, 'via-rcfile.js', ` 'use strict' require(${tap}).test('child', t => { t.pass('this is fine') t.end() }) `) const rc = tmpfile(t, 'taprc', ` files: [ ${testfile} ] reporter: tap `) const c = run([], { env: { TAP_RCFILE: rc }}, (er, o, e) => { t.equal(er, null) t.matchSnapshot(clean(o), 'expected stdout') t.equal(e, '') 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-12.0.1/test/snapshot.js000066400000000000000000000024641327737073000164750ustar00rootroot00000000000000'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-12.0.1/test/spawn.js000066400000000000000000000103541327737073000157630ustar00rootroot00000000000000const 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 ? 5000 : 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-12.0.1/test/stack.js000066400000000000000000000026131327737073000157370ustar00rootroot00000000000000'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-12.0.1/test/stdin.js000066400000000000000000000025151327737073000157540ustar00rootroot00000000000000const 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-12.0.1/test/synonyms.js000066400000000000000000000004251327737073000165300ustar00rootroot00000000000000'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-12.0.1/test/tap.js000066400000000000000000000103351327737073000154160ustar00rootroot00000000000000'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') }, 'autoend(false) with teardown': t => { t.autoend(false) t.teardown(() => console.log('tear it down')) setTimeout(() => { t.pass('this is fine') t.end() }, 50) }, 'autoend=false with teardown': t => { t.options.autoend = false t.teardown(() => console.log('tear it down')) setTimeout(() => { t.pass('this is fine') t.end() }, 50) }, } 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-12.0.1/test/test.js000066400000000000000000000572561327737073000156260ustar00rootroot00000000000000'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() }) }, 'autoend(false)': tt => { tt.autoend() tt.autoend(false) setTimeout(() => { tt.pass('this is fine') tt.end() }, 50) }, '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() })