From 6729fced265868d04bd87e90d4a9e330e69077b2 Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Mon, 9 Mar 2020 15:07:30 +0000 Subject: [PATCH 01/14] Show node internal stack trace --- lib/beautify-stack.js | 19 ++++++------ lib/reporters/mini.js | 16 ++++++++-- lib/reporters/verbose.js | 14 ++++++++- package.json | 1 - test-tap/beautify-stack.js | 18 +++++++++++ test-tap/reporters/mini.regular.log | 42 +++++++++++++++++--------- test-tap/reporters/tap.regular.log | 8 +++++ test-tap/reporters/verbose.regular.log | 42 +++++++++++++++++--------- 8 files changed, 119 insertions(+), 41 deletions(-) diff --git a/lib/beautify-stack.js b/lib/beautify-stack.js index 96206d605..e788934fb 100644 --- a/lib/beautify-stack.js +++ b/lib/beautify-stack.js @@ -1,19 +1,19 @@ 'use strict'; const StackUtils = require('stack-utils'); -const cleanStack = require('clean-stack'); const debug = require('debug')('ava'); // Ignore unimportant stack trace lines -let ignoreStackLines = []; +const ignoreStackLines = []; const avaInternals = /\/ava\/(?:lib\/|lib\/worker\/)?[\w-]+\.js:\d+:\d+\)?$/; const avaDependencies = /\/node_modules\/(?:@ava\/babel|@ava\/require-precompiled|append-transform|empower-core|nyc|require-precompiled|(?:ava\/node_modules\/)?(?:babel-runtime|core-js))\//; const stackFrameLine = /^.+( \(.+:\d+:\d+\)|:\d+:\d+)$/; if (!debug.enabled) { - ignoreStackLines = StackUtils.nodeInternals(); ignoreStackLines.push(avaInternals); ignoreStackLines.push(avaDependencies); + ignoreStackLines.push(/\(internal\/process\/task_queues\.js:\d+:\d+\)$/); + ignoreStackLines.push(/\(internal\/modules\/cjs\/loader\.js:\d+:\d+\)$/); } const stackUtils = new StackUtils({internals: ignoreStackLines}); @@ -54,6 +54,12 @@ function extractFrames(stack) { * /home/ava/ex.js:12:5 * outer (/home/ava/ex.js:13:4) * Object. (/home/ava/ex.js:14:3) + * Module._compile (module.js:570:32) + * Object.Module._extensions..js (module.js:579:10) + * Module.load (module.js:487:32) + * tryModuleLoad (module.js:446:12) + * Function.Module._load (module.js:438:3) + * Module.runMain (module.js:604:10) * ``` */ module.exports = stack => { @@ -61,12 +67,7 @@ module.exports = stack => { return ''; } - stack = extractFrames(stack); - // Workaround for https://github.com/tapjs/stack-utils/issues/14 - // TODO: fix it in `stack-utils` - stack = cleanStack(stack); - - return stackUtils.clean(stack) + return stackUtils.clean(extractFrames(stack)) // Remove the trailing newline inserted by the `stack-utils` module .trim() // Remove remaining file:// prefixes, inserted by `esm`, that are not diff --git a/lib/reporters/mini.js b/lib/reporters/mini.js index 32e58fd41..ced1b57d6 100644 --- a/lib/reporters/mini.js +++ b/lib/reporters/mini.js @@ -9,6 +9,7 @@ const indentString = require('indent-string'); const ora = require('ora'); const plur = require('plur'); const trimOffNewlines = require('trim-off-newlines'); +const StackUtils = require('stack-utils'); const chalk = require('../chalk').get(); const codeExcerpt = require('../code-excerpt'); @@ -322,13 +323,24 @@ class MiniReporter { if (evt.err.stack) { const {stack} = evt.err; - if (stack.includes(os.EOL)) { + if (stack.includes('\n')) { this.lineWriter.writeLine(); - this.lineWriter.writeLine(colors.errorStack(stack)); + this.lineWriter.writeLine(this.formatErrorStack(stack)); } } } + formatErrorStack(stack) { + return stack.split('\n') + .map(line => { + if (StackUtils.nodeInternals().some(internal => internal.test(line))) { + return colors.errorStack(line); + } + + return line; + }).join('\n'); + } + writeLogs(evt) { if (evt.logs) { for (const log of evt.logs) { diff --git a/lib/reporters/verbose.js b/lib/reporters/verbose.js index 9e7158c1b..2e00f1e03 100644 --- a/lib/reporters/verbose.js +++ b/lib/reporters/verbose.js @@ -8,6 +8,7 @@ const indentString = require('indent-string'); const plur = require('plur'); const prettyMs = require('pretty-ms'); const trimOffNewlines = require('trim-off-newlines'); +const StackUtils = require('stack-utils'); const chalk = require('../chalk').get(); const codeExcerpt = require('../code-excerpt'); @@ -263,11 +264,22 @@ class VerboseReporter { const {stack} = evt.err; if (stack.includes('\n')) { this.lineWriter.writeLine(); - this.lineWriter.writeLine(colors.errorStack(stack)); + this.lineWriter.writeLine(this.formatErrorStack(stack)); } } } + formatErrorStack(stack) { + return stack.split('\n') + .map(line => { + if (StackUtils.nodeInternals().some(internal => internal.test(line))) { + return colors.errorStack(line); + } + + return line; + }).join('\n'); + } + writePendingTests(evt) { for (const [file, testsInFile] of evt.pendingTests) { if (testsInFile.size === 0) { diff --git a/package.json b/package.json index dc122f0db..936dbf447 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,6 @@ "chunkd": "^2.0.1", "ci-info": "^2.0.0", "ci-parallel-vars": "^1.0.0", - "clean-stack": "^2.2.0", "clean-yaml-object": "^0.1.0", "cli-cursor": "^3.1.0", "cli-truncate": "^2.1.0", diff --git a/test-tap/beautify-stack.js b/test-tap/beautify-stack.js index c8ef34032..6f3ba2d3b 100644 --- a/test-tap/beautify-stack.js +++ b/test-tap/beautify-stack.js @@ -2,6 +2,7 @@ require('../lib/chalk').set(); require('../lib/worker/options').set({}); +const path = require('path'); const proxyquire = require('proxyquire').noPreserveCache(); const {test} = require('tap'); const Runner = require('../lib/runner'); @@ -76,3 +77,20 @@ test('beautify stack - removes uninteresting lines', async t => { t.end(); } }); + +test('beautify stack - don`t remove node internals', async t => { + try { + const runner = new Runner(); + await runner.runSingle({ + run() { + path.resolve({root: '..'}); + } + }); + } catch (error) { + const stack = beautifyStack(error.stack); + t.match(stack, /path.js/); + t.match(error.stack, /runSingle/); + t.notMatch(stack, /runSingle/); + t.end(); + } +}); diff --git a/test-tap/reporters/mini.regular.log b/test-tap/reporters/mini.regular.log index 2ef59f32b..f46b15749 100644 --- a/test-tap/reporters/mini.regular.log +++ b/test-tap/reporters/mini.regular.log @@ -272,8 +272,13 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message +<<<<<<< HEAD:test-tap/reporters/mini.regular.log test.js:32:9 test.js:35:11 +======= + test.js:35:9 + test.js:38:11 +>>>>>>> Show node internal stack trace:test/reporters/mini.regular.log @@ -301,8 +306,13 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message +<<<<<<< HEAD:test-tap/reporters/mini.regular.log test.js:40:9 test.js:43:14 +======= + test.js:43:9 + test.js:46:14 +>>>>>>> Show node internal stack trace:test/reporters/mini.regular.log @@ -333,9 +343,9 @@ Function TypeError {} - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:12:17 - traces-in-t-throws.js:12:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:12:17 + traces-in-t-throws.js:12:4 @@ -353,9 +363,9 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:16:20 - traces-in-t-throws.js:16:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:16:20 + traces-in-t-throws.js:16:4 @@ -373,9 +383,9 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:20:25 - traces-in-t-throws.js:20:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:20:25 + traces-in-t-throws.js:20:4 @@ -393,9 +403,9 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:24:22 - traces-in-t-throws.js:24:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:24:22 + traces-in-t-throws.js:24:4 @@ -417,8 +427,8 @@ Function TypeError {} - traces-in-t-throws.js:8:24 - traces-in-t-throws.js:28:11 + traces-in-t-throws.js:8:24 + traces-in-t-throws.js:28:11 @@ -444,6 +454,10 @@ Error: Can’t catch me + uncaught-exception.js:5:9 + internal/timers.js:549:17 + internal/timers.js:492:7 + Unhandled rejection in unhandled-rejection.js diff --git a/test-tap/reporters/tap.regular.log b/test-tap/reporters/tap.regular.log index a08ed0d60..05cfbdda0 100644 --- a/test-tap/reporters/tap.regular.log +++ b/test-tap/reporters/tap.regular.log @@ -249,8 +249,16 @@ ok 23 - uncaught-exception › passes not ok 24 - Error: Can’t catch me --- name: Error +<<<<<<< HEAD:test-tap/reporters/tap.regular.log message: Can’t catch me at: 'uncaught-exception.js:5:9' +======= + message: Can't catch me + at: |- + uncaught-exception.js:5:9 + internal/timers.js:549:17 + internal/timers.js:492:7 +>>>>>>> Show node internal stack trace:test/reporters/tap.regular.log ... ---tty-stream-chunk-separator # uncaught-exception.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/verbose.regular.log b/test-tap/reporters/verbose.regular.log index 2d6bac075..d9f81bc6b 100644 --- a/test-tap/reporters/verbose.regular.log +++ b/test-tap/reporters/verbose.regular.log @@ -89,6 +89,10 @@ Error: Can’t catch me + uncaught-exception.js:5:9 + internal/timers.js:549:17 + internal/timers.js:492:7 + ---tty-stream-chunk-separator ✖ uncaught-exception.js exited with a non-zero exit code: 1 ---tty-stream-chunk-separator @@ -224,8 +228,13 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message +<<<<<<< HEAD:test-tap/reporters/verbose.regular.log test.js:32:9 test.js:35:11 +======= + test.js:35:9 + test.js:38:11 +>>>>>>> Show node internal stack trace:test/reporters/verbose.regular.log @@ -253,8 +262,13 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message +<<<<<<< HEAD:test-tap/reporters/verbose.regular.log test.js:40:9 test.js:43:14 +======= + test.js:43:9 + test.js:46:14 +>>>>>>> Show node internal stack trace:test/reporters/verbose.regular.log @@ -285,9 +299,9 @@ Function TypeError {} - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:12:17 - traces-in-t-throws.js:12:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:12:17 + traces-in-t-throws.js:12:4 @@ -305,9 +319,9 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:16:20 - traces-in-t-throws.js:16:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:16:20 + traces-in-t-throws.js:16:4 @@ -325,9 +339,9 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:20:25 - traces-in-t-throws.js:20:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:20:25 + traces-in-t-throws.js:20:4 @@ -345,9 +359,9 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:24:22 - traces-in-t-throws.js:24:4 + traces-in-t-throws.js:4:8 + traces-in-t-throws.js:24:22 + traces-in-t-throws.js:24:4 @@ -369,7 +383,7 @@ Function TypeError {} - traces-in-t-throws.js:8:24 - traces-in-t-throws.js:28:11 + traces-in-t-throws.js:8:24 + traces-in-t-throws.js:28:11 ---tty-stream-chunk-separator From 8bb1dea750bf41738190a70ee61b47ff89427f5f Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Sat, 4 Apr 2020 15:02:17 +0000 Subject: [PATCH 02/14] Moved stack processing to the reporters --- lib/{ => reporters}/beautify-stack.js | 11 +-- lib/reporters/mini.js | 26 +++--- lib/reporters/tap.js | 3 +- lib/reporters/verbose.js | 26 +++--- lib/runner.js | 2 +- lib/serialize-error.js | 48 +++++++---- lib/worker/subprocess.js | 10 +-- test-tap/{ => reporters}/beautify-stack.js | 13 +-- test-tap/reporters/mini.edgecases.log | 4 + test-tap/reporters/mini.failfast.log | 3 + test-tap/reporters/mini.failfast2.log | 3 + test-tap/reporters/mini.regular.log | 80 +++++++++++------- test-tap/reporters/tap.edgecases.log | 6 +- test-tap/reporters/tap.failfast.log | 4 +- test-tap/reporters/tap.failfast2.log | 4 +- test-tap/reporters/tap.regular.log | 97 ++++++++++++++-------- test-tap/reporters/verbose.edgecases.log | 4 + test-tap/reporters/verbose.failfast.log | 3 + test-tap/reporters/verbose.failfast2.log | 3 + test-tap/reporters/verbose.regular.log | 80 +++++++++++------- test-tap/serialize-error.js | 88 ++------------------ 21 files changed, 283 insertions(+), 235 deletions(-) rename lib/{ => reporters}/beautify-stack.js (89%) rename test-tap/{ => reporters}/beautify-stack.js (83%) diff --git a/lib/beautify-stack.js b/lib/reporters/beautify-stack.js similarity index 89% rename from lib/beautify-stack.js rename to lib/reporters/beautify-stack.js index e788934fb..5c7d9b0ad 100644 --- a/lib/beautify-stack.js +++ b/lib/reporters/beautify-stack.js @@ -7,7 +7,6 @@ const ignoreStackLines = []; const avaInternals = /\/ava\/(?:lib\/|lib\/worker\/)?[\w-]+\.js:\d+:\d+\)?$/; const avaDependencies = /\/node_modules\/(?:@ava\/babel|@ava\/require-precompiled|append-transform|empower-core|nyc|require-precompiled|(?:ava\/node_modules\/)?(?:babel-runtime|core-js))\//; -const stackFrameLine = /^.+( \(.+:\d+:\d+\)|:\d+:\d+)$/; if (!debug.enabled) { ignoreStackLines.push(avaInternals); @@ -18,14 +17,6 @@ if (!debug.enabled) { const stackUtils = new StackUtils({internals: ignoreStackLines}); -function extractFrames(stack) { - return stack - .split('\n') - .map(line => line.trim()) - .filter(line => stackFrameLine.test(line)) - .join('\n'); -} - /* * Given a string value of the format generated for the `stack` property of a * V8 error object, return a string that contains only stack frame information @@ -67,7 +58,7 @@ module.exports = stack => { return ''; } - return stackUtils.clean(extractFrames(stack)) + return stackUtils.clean(stack) // Remove the trailing newline inserted by the `stack-utils` module .trim() // Remove remaining file:// prefixes, inserted by `esm`, that are not diff --git a/lib/reporters/mini.js b/lib/reporters/mini.js index ced1b57d6..a270839c6 100644 --- a/lib/reporters/mini.js +++ b/lib/reporters/mini.js @@ -9,7 +9,7 @@ const indentString = require('indent-string'); const ora = require('ora'); const plur = require('plur'); const trimOffNewlines = require('trim-off-newlines'); -const StackUtils = require('stack-utils'); +const beautifyStack = require('./beautify-stack'); const chalk = require('../chalk').get(); const codeExcerpt = require('../code-excerpt'); @@ -19,6 +19,8 @@ const improperUsageMessages = require('./improper-usage-messages'); const prefixTitle = require('./prefix-title'); const whileCorked = require('./while-corked'); +const nodeInternals = require('stack-utils').nodeInternals(); + class LineWriter extends stream.Writable { constructor(dest, spinner) { super(); @@ -325,20 +327,24 @@ class MiniReporter { const {stack} = evt.err; if (stack.includes('\n')) { this.lineWriter.writeLine(); - this.lineWriter.writeLine(this.formatErrorStack(stack)); + this.lineWriter.writeLine(this.formatErrorStack(evt.err)); } } } - formatErrorStack(stack) { - return stack.split('\n') - .map(line => { - if (StackUtils.nodeInternals().some(internal => internal.test(line))) { - return colors.errorStack(line); - } + formatErrorStack(error) { + if (error.shouldBeautifyStack) { + return beautifyStack(error.stack).split('\n') + .map(line => { + if (nodeInternals.some(internal => internal.test(line))) { + return colors.errorStack(line); + } + + return line; + }).join('\n'); + } - return line; - }).join('\n'); + return error.stack; } writeLogs(evt) { diff --git a/lib/reporters/tap.js b/lib/reporters/tap.js index 0c9998728..f3dd2dfad 100644 --- a/lib/reporters/tap.js +++ b/lib/reporters/tap.js @@ -7,6 +7,7 @@ const stripAnsi = require('strip-ansi'); const supertap = require('supertap'); const indentString = require('indent-string'); +const beautifyStack = require('./beautify-stack'); const prefixTitle = require('./prefix-title'); function dumpError(error) { @@ -42,7 +43,7 @@ function dumpError(error) { } if (error.stack) { - object.at = error.stack; + object.at = error.shouldBeautifyStack ? beautifyStack(error.stack) : error.stack; } return object; diff --git a/lib/reporters/verbose.js b/lib/reporters/verbose.js index 2e00f1e03..af8255664 100644 --- a/lib/reporters/verbose.js +++ b/lib/reporters/verbose.js @@ -8,7 +8,7 @@ const indentString = require('indent-string'); const plur = require('plur'); const prettyMs = require('pretty-ms'); const trimOffNewlines = require('trim-off-newlines'); -const StackUtils = require('stack-utils'); +const beautifyStack = require('./beautify-stack'); const chalk = require('../chalk').get(); const codeExcerpt = require('../code-excerpt'); @@ -18,6 +18,8 @@ const improperUsageMessages = require('./improper-usage-messages'); const prefixTitle = require('./prefix-title'); const whileCorked = require('./while-corked'); +const nodeInternals = require('stack-utils').nodeInternals(); + class LineWriter extends stream.Writable { constructor(dest) { super(); @@ -264,20 +266,24 @@ class VerboseReporter { const {stack} = evt.err; if (stack.includes('\n')) { this.lineWriter.writeLine(); - this.lineWriter.writeLine(this.formatErrorStack(stack)); + this.lineWriter.writeLine(this.formatErrorStack(evt.err)); } } } - formatErrorStack(stack) { - return stack.split('\n') - .map(line => { - if (StackUtils.nodeInternals().some(internal => internal.test(line))) { - return colors.errorStack(line); - } + formatErrorStack(error) { + if (error.shouldBeautifyStack) { + return beautifyStack(error.stack).split('\n') + .map(line => { + if (nodeInternals.some(internal => internal.test(line))) { + return colors.errorStack(line); + } + + return line; + }).join('\n'); + } - return line; - }).join('\n'); + return error.stack; } writePendingTests(evt) { diff --git a/lib/runner.js b/lib/runner.js index 80f76791e..34f56772d 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -343,7 +343,7 @@ class Runner extends Emittery { this.emit('stateChange', { type: 'test-failed', title: result.title, - err: serializeError('Test failure', true, result.error), + err: serializeError('Test failure', true, result.error, this.file), duration: result.duration, knownFailing: result.metadata.failing, logs: result.logs diff --git a/lib/serialize-error.js b/lib/serialize-error.js index 114b9a28e..c30dbd9b7 100644 --- a/lib/serialize-error.js +++ b/lib/serialize-error.js @@ -5,7 +5,6 @@ const concordance = require('concordance'); const isError = require('is-error'); const StackUtils = require('stack-utils'); const assert = require('./assert'); -const beautifyStack = require('./beautify-stack'); const concordanceOptions = require('./concordance-options').default; function isAvaAssertionError(source) { @@ -17,13 +16,33 @@ function filter(propertyName, isRoot) { } const stackUtils = new StackUtils(); -function extractSource(stack) { - if (!stack) { +function extractSource(stack, testFile) { + if (!stack || !testFile) { return null; } - const firstStackLine = stack.split('\n')[0]; - return stackUtils.parseLine(firstStackLine); + let result = null; + stack.split('\n').forEach(line => { + try { + const callSite = stackUtils.parseLine(line.replace('file:///', '/')); + // Assume the CWD is the project directory (see function `buildSource()` + // and assume `testFile` is a absolute path. + if (callSite.file === path.relative(process.cwd(), testFile)) { + result = callSite; + } + } catch (_) { + } + }); + if (result) { + return { + isDependency: false, + isWithinProject: true, + file: path.resolve(process.cwd(), result.file), + line: result.line + }; + } + + return null; } function buildSource(source) { @@ -51,22 +70,19 @@ function buildSource(source) { }; } -function trySerializeError(err, shouldBeautifyStack) { - let stack = err.savedError ? err.savedError.stack : err.stack; - - if (shouldBeautifyStack) { - stack = beautifyStack(stack); - } +function trySerializeError(err, shouldBeautifyStack, testFile) { + const stack = err.savedError ? err.savedError.stack : err.stack; const retval = { avaAssertionError: isAvaAssertionError(err), nonErrorObject: false, - source: buildSource(extractSource(stack)), - stack + source: extractSource(stack, testFile), + stack, + shouldBeautifyStack }; if (err.actualStack) { - retval.stack = shouldBeautifyStack ? beautifyStack(err.actualStack) : err.actualStack; + retval.stack = err.actualStack; } if (retval.avaAssertionError) { @@ -133,7 +149,7 @@ function trySerializeError(err, shouldBeautifyStack) { return retval; } -function serializeError(origin, shouldBeautifyStack, err) { +function serializeError(origin, shouldBeautifyStack, err, testFile) { if (!isError(err)) { return { avaAssertionError: false, @@ -143,7 +159,7 @@ function serializeError(origin, shouldBeautifyStack, err) { } try { - return trySerializeError(err, shouldBeautifyStack); + return trySerializeError(err, shouldBeautifyStack, testFile); } catch (_) { const replacement = new Error(`${origin}: Could not serialize error`); return { diff --git a/lib/worker/subprocess.js b/lib/worker/subprocess.js index b6477428c..d22081af4 100644 --- a/lib/worker/subprocess.js +++ b/lib/worker/subprocess.js @@ -70,7 +70,7 @@ ipc.options.then(async options => { runner.on('stateChange', state => ipc.send(state)); runner.on('error', error => { - ipc.send({type: 'internal-error', err: serializeError('Internal runner error', false, error)}); + ipc.send({type: 'internal-error', err: serializeError('Internal runner error', false, error, runner.file)}); exit(1); }); @@ -81,7 +81,7 @@ ipc.options.then(async options => { ipc.send({type: 'touched-files', files: touchedFiles}); } } catch (error) { - ipc.send({type: 'internal-error', err: serializeError('Internal runner error', false, error)}); + ipc.send({type: 'internal-error', err: serializeError('Internal runner error', false, error, runner.file)}); exit(1); return; } @@ -90,7 +90,7 @@ ipc.options.then(async options => { currentlyUnhandled() .filter(rejection => !attributedRejections.has(rejection.promise)) .forEach(rejection => { - ipc.send({type: 'unhandled-rejection', err: serializeError('Unhandled rejection', true, rejection.reason)}); + ipc.send({type: 'unhandled-rejection', err: serializeError('Unhandled rejection', true, rejection.reason, runner.file)}); }); exit(0); @@ -102,7 +102,7 @@ ipc.options.then(async options => { return; } - ipc.send({type: 'uncaught-exception', err: serializeError('Uncaught exception', true, error)}); + ipc.send({type: 'uncaught-exception', err: serializeError('Uncaught exception', true, error, runner.file)}); exit(1); }); @@ -207,7 +207,7 @@ ipc.options.then(async options => { exit(1); } } catch (error) { - ipc.send({type: 'uncaught-exception', err: serializeError('Uncaught exception', true, error)}); + ipc.send({type: 'uncaught-exception', err: serializeError('Uncaught exception', true, error, runner.file)}); exit(1); } }).catch(error => { diff --git a/test-tap/beautify-stack.js b/test-tap/reporters/beautify-stack.js similarity index 83% rename from test-tap/beautify-stack.js rename to test-tap/reporters/beautify-stack.js index 6f3ba2d3b..381b7a99e 100644 --- a/test-tap/beautify-stack.js +++ b/test-tap/reporters/beautify-stack.js @@ -1,13 +1,13 @@ 'use strict'; -require('../lib/chalk').set(); -require('../lib/worker/options').set({}); +require('../../lib/chalk').set(); +require('../../lib/worker/options').set({}); const path = require('path'); const proxyquire = require('proxyquire').noPreserveCache(); const {test} = require('tap'); -const Runner = require('../lib/runner'); +const Runner = require('../../lib/runner'); -const beautifyStack = proxyquire('../lib/beautify-stack', { +const beautifyStack = proxyquire('../../lib/reporters/beautify-stack', { debug() { return { enabled: false @@ -24,7 +24,7 @@ function barFunc() { } test('does not strip ava internals and dependencies from stack trace with debug enabled', t => { - const beautify = proxyquire('../lib/beautify-stack', { + const beautify = proxyquire('../../lib/reporters/beautify-stack', { debug() { return { enabled: true @@ -68,6 +68,7 @@ test('beautify stack - removes uninteresting lines', async t => { }); } catch (error) { const stack = beautifyStack(error.stack); + t.notMatch(stack, /Error\n/); t.match(stack, /fooFunc/); t.match(stack, /barFunc/); // The runSingle line is introduced by Runner. It's internal so it should @@ -78,7 +79,7 @@ test('beautify stack - removes uninteresting lines', async t => { } }); -test('beautify stack - don`t remove node internals', async t => { +test('beautify stack - don’t remove node internals', async t => { try { const runner = new Runner(); await runner.runSingle({ diff --git a/test-tap/reporters/mini.edgecases.log b/test-tap/reporters/mini.edgecases.log index 992deae88..9402a70d2 100644 --- a/test-tap/reporters/mini.edgecases.log +++ b/test-tap/reporters/mini.edgecases.log @@ -25,6 +25,8 @@ TypeError: test is not a function + test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + Uncaught exception in throws.js @@ -36,4 +38,6 @@ Error: throws + test-tap/fixture/report/edgecases/throws.js:1:7 + ---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.failfast.log b/test-tap/reporters/mini.failfast.log index f9f8acf99..a1d0c8fcb 100644 --- a/test-tap/reporters/mini.failfast.log +++ b/test-tap/reporters/mini.failfast.log @@ -20,6 +20,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/failfast/a.js:3:22 + async Promise.all (index 1) + `--fail-fast` is on. 1 test file was skipped. diff --git a/test-tap/reporters/mini.failfast2.log b/test-tap/reporters/mini.failfast2.log index 5c9445793..497b880b6 100644 --- a/test-tap/reporters/mini.failfast2.log +++ b/test-tap/reporters/mini.failfast2.log @@ -20,6 +20,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/failfast2/a.js:3:22 + async Promise.all (index 1) + `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. diff --git a/test-tap/reporters/mini.regular.log b/test-tap/reporters/mini.regular.log index f46b15749..dc1d23897 100644 --- a/test-tap/reporters/mini.regular.log +++ b/test-tap/reporters/mini.regular.log @@ -181,6 +181,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/regular/output-in-hook.js:34:4 + async Promise.all (index 1) + test › fails @@ -193,6 +196,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/regular/test.js:9:22 + async Promise.all (index 1) + test › no longer failing @@ -200,6 +206,9 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing + new Promise () + async Promise.all (index 3) + test › logs @@ -214,6 +223,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/regular/test.js:18:4 + async Promise.all (index 4) + test › formatted @@ -229,6 +241,9 @@ - 'foo' + 'bar' + test-tap/fixture/report/regular/test.js:22:4 + async Promise.all (index 5) + test › power-assert @@ -246,6 +261,9 @@ foo => '' + test-tap/fixture/report/regular/test.js:27:4 + async Promise.all (index 6) + test › bad throws @@ -272,13 +290,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message -<<<<<<< HEAD:test-tap/reporters/mini.regular.log - test.js:32:9 - test.js:35:11 -======= - test.js:35:9 - test.js:38:11 ->>>>>>> Show node internal stack trace:test/reporters/mini.regular.log + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + async Promise.all (index 7) @@ -306,13 +320,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message -<<<<<<< HEAD:test-tap/reporters/mini.regular.log - test.js:40:9 - test.js:43:14 -======= - test.js:43:9 - test.js:46:14 ->>>>>>> Show node internal stack trace:test/reporters/mini.regular.log + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + async Promise.all (index 8) @@ -323,6 +333,8 @@ null + async Promise.all (index 9) + traces-in-t-throws › throws @@ -343,9 +355,10 @@ Function TypeError {} - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:12:17 - traces-in-t-throws.js:12:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + async Promise.all (index 0) @@ -363,9 +376,10 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:16:20 - traces-in-t-throws.js:16:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + async Promise.all (index 1) @@ -383,9 +397,10 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:20:25 - traces-in-t-throws.js:20:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + async Promise.all (index 2) @@ -403,9 +418,10 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:24:22 - traces-in-t-throws.js:24:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + async Promise.all (index 3) @@ -427,8 +443,9 @@ Function TypeError {} - traces-in-t-throws.js:8:24 - traces-in-t-throws.js:28:11 + test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + async Promise.all (index 4) @@ -442,6 +459,8 @@ TypeError: test.serial.test is not a function + test-tap/fixture/report/regular/bad-test-chain.js:3:13 + Uncaught exception in uncaught-exception.js @@ -454,7 +473,7 @@ Error: Can’t catch me - uncaught-exception.js:5:9 + test-tap/fixture/report/regular/uncaught-exception.js:5:9 internal/timers.js:549:17 internal/timers.js:492:7 @@ -470,6 +489,9 @@ Error: Can’t catch me + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + async Promise.all (index 0) + Unhandled rejection in unhandled-rejection.js diff --git a/test-tap/reporters/tap.edgecases.log b/test-tap/reporters/tap.edgecases.log index 27b8c048d..a6b6943c7 100644 --- a/test-tap/reporters/tap.edgecases.log +++ b/test-tap/reporters/tap.edgecases.log @@ -8,7 +8,9 @@ not ok 2 - TypeError: test is not a function --- name: TypeError message: test is not a function - at: 'import-and-use-test-member.js:3:1' + at: >- + Object. + (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) ... ---tty-stream-chunk-separator # import-and-use-test-member.js exited with a non-zero exit code: 1 @@ -22,7 +24,7 @@ not ok 5 - Error: throws --- name: Error message: throws - at: 'throws.js:1:7' + at: 'test-tap/fixture/report/edgecases/throws.js:1:7' ... ---tty-stream-chunk-separator # throws.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/tap.failfast.log b/test-tap/reporters/tap.failfast.log index e512af4d6..11941af1e 100644 --- a/test-tap/reporters/tap.failfast.log +++ b/test-tap/reporters/tap.failfast.log @@ -6,7 +6,9 @@ not ok 1 - a › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: 'a.js:3:22' + at: |- + test-tap/fixture/report/failfast/a.js:3:22 + async Promise.all (index 1) ... ---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast2.log b/test-tap/reporters/tap.failfast2.log index 78aebbd1a..3c40115e4 100644 --- a/test-tap/reporters/tap.failfast2.log +++ b/test-tap/reporters/tap.failfast2.log @@ -6,7 +6,9 @@ not ok 1 - a › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: 'a.js:3:22' + at: |- + test-tap/fixture/report/failfast2/a.js:3:22 + async Promise.all (index 1) ... ---tty-stream-chunk-separator # 1 test remaining in a.js diff --git a/test-tap/reporters/tap.regular.log b/test-tap/reporters/tap.regular.log index 05cfbdda0..0abb3fce0 100644 --- a/test-tap/reporters/tap.regular.log +++ b/test-tap/reporters/tap.regular.log @@ -5,7 +5,7 @@ not ok 1 - TypeError: test.serial.test is not a function --- name: TypeError message: test.serial.test is not a function - at: 'bad-test-chain.js:3:13' + at: 'test-tap/fixture/report/regular/bad-test-chain.js:3:13' ... ---tty-stream-chunk-separator # bad-test-chain.js exited with a non-zero exit code: 1 @@ -34,7 +34,9 @@ not ok 4 - output-in-hook › failing test name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: 'output-in-hook.js:34:4' + at: |- + test-tap/fixture/report/regular/output-in-hook.js:34:4 + async Promise.all (index 1) ... ---tty-stream-chunk-separator # output-in-hook › afterEach hook for passing test @@ -71,7 +73,9 @@ not ok 9 - test › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: 'test.js:9:22' + at: |- + test-tap/fixture/report/regular/test.js:9:22 + async Promise.all (index 1) ... ---tty-stream-chunk-separator # test › known failure @@ -84,6 +88,9 @@ not ok 11 - test › no longer failing message: >- Test was expected to fail, but succeeded, you should stop marking the test as failing + at: |- + new Promise () + async Promise.all (index 3) ... ---tty-stream-chunk-separator # test › logs @@ -94,7 +101,9 @@ not ok 12 - test › logs name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: 'test.js:18:4' + at: |- + test-tap/fixture/report/regular/test.js:18:4 + async Promise.all (index 4) ... ---tty-stream-chunk-separator # test › formatted @@ -106,7 +115,9 @@ not ok 13 - test › formatted 'Difference:': |- - 'foo' + 'bar' - at: 'test.js:22:4' + at: |- + test-tap/fixture/report/regular/test.js:22:4 + async Promise.all (index 5) ... ---tty-stream-chunk-separator # test › power-assert @@ -117,7 +128,9 @@ not ok 14 - test › power-assert operator: '!!' values: 'Value is not truthy:': '''''' - at: 'test.js:27:4' + at: |- + test-tap/fixture/report/regular/test.js:27:4 + async Promise.all (index 6) ... ---tty-stream-chunk-separator # test › bad throws @@ -132,8 +145,9 @@ not ok 15 - test › bad throws message: 'err', } at: |- - test.js:32:9 - test.js:35:11 + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + async Promise.all (index 7) ... ---tty-stream-chunk-separator # test › bad notThrows @@ -148,8 +162,9 @@ not ok 16 - test › bad notThrows message: 'err', } at: |- - test.js:40:9 - test.js:43:14 + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + async Promise.all (index 8) ... ---tty-stream-chunk-separator # test › implementation throws non-error @@ -159,6 +174,7 @@ not ok 17 - test › implementation throws non-error message: Error thrown in test values: 'Error thrown in test:': 'null' + at: async Promise.all (index 9) ... ---tty-stream-chunk-separator # traces-in-t-throws › throws @@ -172,10 +188,15 @@ not ok 18 - traces-in-t-throws › throws message: 'uh-oh', } 'Expected instance of:': 'Function TypeError {}' - at: |- - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:12:17 - traces-in-t-throws.js:12:4 + at: >- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + + t.throws.instanceOf + (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + + async Promise.all (index 0) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrows @@ -189,9 +210,10 @@ not ok 19 - traces-in-t-throws › notThrows message: 'uh-oh', } at: |- - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:16:20 - traces-in-t-throws.js:16:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + async Promise.all (index 1) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrowsAsync @@ -205,9 +227,10 @@ not ok 20 - traces-in-t-throws › notThrowsAsync message: 'uh-oh', } at: |- - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:20:25 - traces-in-t-throws.js:20:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + async Promise.all (index 2) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync @@ -220,10 +243,15 @@ not ok 21 - traces-in-t-throws › throwsAsync Error { message: 'uh-oh', } - at: |- - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:24:22 - traces-in-t-throws.js:24:4 + at: >- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + + t.throwsAsync.instanceOf + (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + + async Promise.all (index 3) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync different error @@ -237,9 +265,13 @@ not ok 22 - traces-in-t-throws › throwsAsync different erro message: 'uh-oh', } 'Expected instance of:': 'Function TypeError {}' - at: |- - traces-in-t-throws.js:8:24 - traces-in-t-throws.js:28:11 + at: >- + returnRejectedPromise + (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + + async Promise.all (index 4) ... ---tty-stream-chunk-separator # uncaught-exception › passes @@ -249,16 +281,11 @@ ok 23 - uncaught-exception › passes not ok 24 - Error: Can’t catch me --- name: Error -<<<<<<< HEAD:test-tap/reporters/tap.regular.log message: Can’t catch me - at: 'uncaught-exception.js:5:9' -======= - message: Can't catch me at: |- - uncaught-exception.js:5:9 + test-tap/fixture/report/regular/uncaught-exception.js:5:9 internal/timers.js:549:17 internal/timers.js:492:7 ->>>>>>> Show node internal stack trace:test/reporters/tap.regular.log ... ---tty-stream-chunk-separator # uncaught-exception.js exited with a non-zero exit code: 1 @@ -275,7 +302,9 @@ not ok 28 - Error: Can’t catch me --- name: Error message: Can’t catch me - at: 'unhandled-rejection.js:4:17' + at: |- + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + async Promise.all (index 0) ... ---tty-stream-chunk-separator # unhandled-rejection diff --git a/test-tap/reporters/verbose.edgecases.log b/test-tap/reporters/verbose.edgecases.log index 9d654c505..94794e3c5 100644 --- a/test-tap/reporters/verbose.edgecases.log +++ b/test-tap/reporters/verbose.edgecases.log @@ -13,6 +13,8 @@ TypeError: test is not a function + test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + ---tty-stream-chunk-separator ✖ import-and-use-test-member.js exited with a non-zero exit code: 1 ---tty-stream-chunk-separator @@ -28,6 +30,8 @@ Error: throws + test-tap/fixture/report/edgecases/throws.js:1:7 + ---tty-stream-chunk-separator ✖ throws.js exited with a non-zero exit code: 1 ---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.failfast.log b/test-tap/reporters/verbose.failfast.log index 9f640ba2c..a8abb4d8e 100644 --- a/test-tap/reporters/verbose.failfast.log +++ b/test-tap/reporters/verbose.failfast.log @@ -15,6 +15,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/failfast/a.js:3:22 + async Promise.all (index 1) + `--fail-fast` is on. 1 test file was skipped. diff --git a/test-tap/reporters/verbose.failfast2.log b/test-tap/reporters/verbose.failfast2.log index 23cd8b8b8..b316262da 100644 --- a/test-tap/reporters/verbose.failfast2.log +++ b/test-tap/reporters/verbose.failfast2.log @@ -15,6 +15,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/failfast2/a.js:3:22 + async Promise.all (index 1) + `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. diff --git a/test-tap/reporters/verbose.regular.log b/test-tap/reporters/verbose.regular.log index d9f81bc6b..1ac6f9a39 100644 --- a/test-tap/reporters/verbose.regular.log +++ b/test-tap/reporters/verbose.regular.log @@ -10,6 +10,8 @@ TypeError: test.serial.test is not a function + test-tap/fixture/report/regular/bad-test-chain.js:3:13 + ---tty-stream-chunk-separator ✖ bad-test-chain.js exited with a non-zero exit code: 1 ---tty-stream-chunk-separator @@ -89,7 +91,7 @@ Error: Can’t catch me - uncaught-exception.js:5:9 + test-tap/fixture/report/regular/uncaught-exception.js:5:9 internal/timers.js:549:17 internal/timers.js:492:7 @@ -111,6 +113,9 @@ Error: Can’t catch me + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + async Promise.all (index 0) + ---tty-stream-chunk-separator Unhandled rejection in unhandled-rejection.js @@ -137,6 +142,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/regular/output-in-hook.js:34:4 + async Promise.all (index 1) + test › fails @@ -149,6 +157,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/regular/test.js:9:22 + async Promise.all (index 1) + test › no longer failing @@ -156,6 +167,9 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing + new Promise () + async Promise.all (index 3) + test › logs @@ -170,6 +184,9 @@ Test failed via `t.fail()` + test-tap/fixture/report/regular/test.js:18:4 + async Promise.all (index 4) + test › formatted @@ -185,6 +202,9 @@ - 'foo' + 'bar' + test-tap/fixture/report/regular/test.js:22:4 + async Promise.all (index 5) + test › power-assert @@ -202,6 +222,9 @@ foo => '' + test-tap/fixture/report/regular/test.js:27:4 + async Promise.all (index 6) + test › bad throws @@ -228,13 +251,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message -<<<<<<< HEAD:test-tap/reporters/verbose.regular.log - test.js:32:9 - test.js:35:11 -======= - test.js:35:9 - test.js:38:11 ->>>>>>> Show node internal stack trace:test/reporters/verbose.regular.log + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + async Promise.all (index 7) @@ -262,13 +281,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message -<<<<<<< HEAD:test-tap/reporters/verbose.regular.log - test.js:40:9 - test.js:43:14 -======= - test.js:43:9 - test.js:46:14 ->>>>>>> Show node internal stack trace:test/reporters/verbose.regular.log + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + async Promise.all (index 8) @@ -279,6 +294,8 @@ null + async Promise.all (index 9) + traces-in-t-throws › throws @@ -299,9 +316,10 @@ Function TypeError {} - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:12:17 - traces-in-t-throws.js:12:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + async Promise.all (index 0) @@ -319,9 +337,10 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:16:20 - traces-in-t-throws.js:16:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + async Promise.all (index 1) @@ -339,9 +358,10 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:20:25 - traces-in-t-throws.js:20:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + async Promise.all (index 2) @@ -359,9 +379,10 @@ message: 'uh-oh', } - traces-in-t-throws.js:4:8 - traces-in-t-throws.js:24:22 - traces-in-t-throws.js:24:4 + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + async Promise.all (index 3) @@ -383,7 +404,8 @@ Function TypeError {} - traces-in-t-throws.js:8:24 - traces-in-t-throws.js:28:11 + test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + async Promise.all (index 4) ---tty-stream-chunk-separator diff --git a/test-tap/serialize-error.js b/test-tap/serialize-error.js index 724ca33fb..4f8240728 100644 --- a/test-tap/serialize-error.js +++ b/test-tap/serialize-error.js @@ -2,46 +2,33 @@ require('../lib/chalk').set(); require('../lib/worker/options').set({}); -const fs = require('fs'); const path = require('path'); const sourceMapFixtures = require('source-map-fixtures'); const sourceMapSupport = require('source-map-support'); -const tempWrite = require('temp-write'); -const tempy = require('tempy'); const {test} = require('tap'); const avaAssert = require('../lib/assert'); -const beautifyStack = require('../lib/beautify-stack'); const serializeError = require('../lib/serialize-error'); -const serialize = error => serializeError('Test', true, error); +const serialize = error => serializeError('Test', true, error, path.resolve('test-tap/serialize-error.js')); // Needed to test stack traces from source map fixtures. sourceMapSupport.install({environment: 'node'}); -const makeTemporaryDir = () => { - if (process.platform !== 'win32') { - return tempy.directory(); - } - - const dir = path.join(__dirname, '.tmpdir', `serialize-error.${process.pid}`); - fs.mkdirSync(dir, {recursive: true}); - return dir; -}; - test('serialize standard props', t => { const error = new Error('Hello'); - const serializedError = serialize(error); + const serializedError = serialize(error, true); - t.is(Object.keys(serializedError).length, 8); + t.is(Object.keys(serializedError).length, 9); t.is(serializedError.avaAssertionError, false); t.is(serializedError.nonErrorObject, false); t.deepEqual(serializedError.object, {}); t.is(serializedError.name, 'Error'); - t.is(serializedError.stack, beautifyStack(error.stack)); + t.is(serializedError.stack, error.stack); t.is(serializedError.message, 'Hello'); t.is(serializedError.summary, 'Error: Hello'); - t.is(typeof serializedError.source.isDependency, 'boolean'); - t.is(typeof serializedError.source.isWithinProject, 'boolean'); + t.is(serializedError.shouldBeautifyStack, true); + t.is(serializedError.source.isWithinProject, true); + t.is(serializedError.source.isDependency, false); t.is(typeof serializedError.source.file, 'string'); t.is(typeof serializedError.source.line, 'number'); t.end(); @@ -68,70 +55,11 @@ test('source file is an absolute path, after source map correction', t => { t.fail('Fixture should have thrown'); } catch (error) { const serializedError = serialize(error); - t.is(serializedError.source.file, fixture.sourceFile); + t.is(serializedError.source.file, __filename); t.end(); } }); -test('source file is an absolute path, after source map correction, even if already absolute', t => { - const fixture = sourceMapFixtures.mapFile('throws'); - const map = JSON.parse(fs.readFileSync(fixture.file + '.map')); - - const temporary = makeTemporaryDir(); - const sourceRoot = path.join(temporary, 'src'); - const expectedSourceFile = path.join(sourceRoot, map.file); - - const temporaryFile = path.join(temporary, path.basename(fixture.file)); - fs.writeFileSync(temporaryFile, fs.readFileSync(fixture.file)); - fs.writeFileSync(temporaryFile + '.map', JSON.stringify(Object.assign(map, {sourceRoot}), null, 2)); - - try { - require(temporaryFile).run(); - t.fail('Fixture should have thrown'); - } catch (error) { - const serializedError = serialize(error); - t.is(serializedError.source.file, expectedSourceFile); - t.end(); - } -}); - -test('determines whether source file is within the project', t => { - const file = tempWrite.sync('module.exports = () => { throw new Error("hello") }'); - try { - require(file)(); - t.fail('Should have thrown'); - } catch (error_) { - const serializedError = serialize(error_); - t.is(serializedError.source.file, file); - t.is(serializedError.source.isWithinProject, false); - } - - const error = new Error('Hello'); - const serializedError = serialize(error); - t.is(serializedError.source.file, __filename); - t.is(serializedError.source.isWithinProject, true); - t.end(); -}); - -test('determines whether source file, if within the project, is a dependency', t => { - const fixture = sourceMapFixtures.mapFile('throws'); - try { - fixture.require().run(); - t.fail('Fixture should have thrown'); - } catch (error_) { - const serializedError = serialize(error_); - t.is(serializedError.source.file, fixture.sourceFile); - t.is(serializedError.source.isWithinProject, true); - t.is(serializedError.source.isDependency, true); - } - - const error = new Error('Hello'); - const serializedError = serialize(error); - t.is(serializedError.source.file, __filename); - t.is(serializedError.source.isDependency, false); - t.end(); -}); - test('sets avaAssertionError to true if indeed an assertion error', t => { const error = new avaAssert.AssertionError({}); const serializedError = serialize(error); From 5015ee7b9f8e5f023692b9a1c3a3aa2ea3fe79ba Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Tue, 14 Apr 2020 09:36:21 +0000 Subject: [PATCH 03/14] Bugfix: support windows --- test-tap/serialize-error.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-tap/serialize-error.js b/test-tap/serialize-error.js index 4f8240728..cd27f2718 100644 --- a/test-tap/serialize-error.js +++ b/test-tap/serialize-error.js @@ -9,7 +9,7 @@ const {test} = require('tap'); const avaAssert = require('../lib/assert'); const serializeError = require('../lib/serialize-error'); -const serialize = error => serializeError('Test', true, error, path.resolve('test-tap/serialize-error.js')); +const serialize = error => serializeError('Test', true, error, path.resolve('test-tap', 'serialize-error.js')); // Needed to test stack traces from source map fixtures. sourceMapSupport.install({environment: 'node'}); From 0d18b24c056586ca1791fb60bd7c4d3a5a12df0e Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Tue, 14 Apr 2020 09:37:28 +0000 Subject: [PATCH 04/14] unit-test: create separate log-files for major node versions --- ...i.edgecases.log => mini.edgecases.v10.log} | 0 test-tap/reporters/mini.edgecases.v12.log | 43 ++ test-tap/reporters/mini.edgecases.v13.log | 43 ++ test-tap/reporters/mini.failfast.v10.log | 30 ++ ...ini.failfast.log => mini.failfast.v12.log} | 0 test-tap/reporters/mini.failfast.v13.log | 30 ++ test-tap/reporters/mini.failfast2.v10.log | 30 ++ ...i.failfast2.log => mini.failfast2.v12.log} | 0 test-tap/reporters/mini.failfast2.v13.log | 30 ++ test-tap/reporters/mini.js | 2 +- .../{mini.only.log => mini.only.v10.log} | 0 test-tap/reporters/mini.only.v12.log | 17 + test-tap/reporters/mini.only.v13.log | 17 + test-tap/reporters/mini.regular.v10.log | 503 ++++++++++++++++++ ...{mini.regular.log => mini.regular.v12.log} | 0 test-tap/reporters/mini.regular.v13.log | 501 +++++++++++++++++ ...typescript.log => mini.typescript.v10.log} | 0 test-tap/reporters/mini.typescript.v12.log | 16 + test-tap/reporters/mini.typescript.v13.log | 16 + .../{mini.watch.log => mini.watch.v10.log} | 0 test-tap/reporters/mini.watch.v12.log | 48 ++ test-tap/reporters/mini.watch.v13.log | 48 ++ test-tap/reporters/readme.md | 8 + ...ap.edgecases.log => tap.edgecases.v10.log} | 0 test-tap/reporters/tap.edgecases.v12.log | 39 ++ test-tap/reporters/tap.edgecases.v13.log | 39 ++ test-tap/reporters/tap.failfast.v10.log | 20 + ...{tap.failfast.log => tap.failfast.v12.log} | 0 test-tap/reporters/tap.failfast.v13.log | 20 + test-tap/reporters/tap.failfast2.v10.log | 22 + ...ap.failfast2.log => tap.failfast2.v12.log} | 0 test-tap/reporters/tap.failfast2.v13.log | 22 + test-tap/reporters/tap.js | 2 +- .../{tap.only.log => tap.only.v10.log} | 0 test-tap/reporters/tap.only.v12.log | 15 + test-tap/reporters/tap.only.v13.log | 15 + test-tap/reporters/tap.regular.v10.log | 318 +++++++++++ .../{tap.regular.log => tap.regular.v12.log} | 0 test-tap/reporters/tap.regular.v13.log | 324 +++++++++++ ...dgecases.log => verbose.edgecases.v10.log} | 0 test-tap/reporters/verbose.edgecases.v12.log | 41 ++ test-tap/reporters/verbose.edgecases.v13.log | 41 ++ test-tap/reporters/verbose.failfast.v10.log | 25 + ....failfast.log => verbose.failfast.v12.log} | 0 test-tap/reporters/verbose.failfast.v13.log | 25 + test-tap/reporters/verbose.failfast2.v10.log | 25 + ...ailfast2.log => verbose.failfast2.v12.log} | 0 test-tap/reporters/verbose.failfast2.v13.log | 25 + test-tap/reporters/verbose.js | 2 +- ...{verbose.only.log => verbose.only.v10.log} | 0 test-tap/reporters/verbose.only.v12.log | 10 + test-tap/reporters/verbose.only.v13.log | 10 + test-tap/reporters/verbose.regular.v10.log | 413 ++++++++++++++ ...se.regular.log => verbose.regular.v12.log} | 0 test-tap/reporters/verbose.regular.v13.log | 411 ++++++++++++++ ...=> verbose.timeoutinmultiplefiles.v10.log} | 0 .../verbose.timeoutinmultiplefiles.v12.log | 33 ++ .../verbose.timeoutinmultiplefiles.v13.log | 33 ++ ...og => verbose.timeoutinsinglefile.v10.log} | 0 .../verbose.timeoutinsinglefile.v12.log | 19 + .../verbose.timeoutinsinglefile.v13.log | 19 + ...h.log => verbose.timeoutwithmatch.v10.log} | 0 .../verbose.timeoutwithmatch.v12.log | 17 + .../verbose.timeoutwithmatch.v13.log | 17 + ...escript.log => verbose.typescript.v10.log} | 0 test-tap/reporters/verbose.typescript.v12.log | 14 + test-tap/reporters/verbose.typescript.v13.log | 14 + ...erbose.watch.log => verbose.watch.v10.log} | 0 test-tap/reporters/verbose.watch.v12.log | 29 + test-tap/reporters/verbose.watch.v13.log | 29 + 70 files changed, 3467 insertions(+), 3 deletions(-) rename test-tap/reporters/{mini.edgecases.log => mini.edgecases.v10.log} (100%) create mode 100644 test-tap/reporters/mini.edgecases.v12.log create mode 100644 test-tap/reporters/mini.edgecases.v13.log create mode 100644 test-tap/reporters/mini.failfast.v10.log rename test-tap/reporters/{mini.failfast.log => mini.failfast.v12.log} (100%) create mode 100644 test-tap/reporters/mini.failfast.v13.log create mode 100644 test-tap/reporters/mini.failfast2.v10.log rename test-tap/reporters/{mini.failfast2.log => mini.failfast2.v12.log} (100%) create mode 100644 test-tap/reporters/mini.failfast2.v13.log rename test-tap/reporters/{mini.only.log => mini.only.v10.log} (100%) create mode 100644 test-tap/reporters/mini.only.v12.log create mode 100644 test-tap/reporters/mini.only.v13.log create mode 100644 test-tap/reporters/mini.regular.v10.log rename test-tap/reporters/{mini.regular.log => mini.regular.v12.log} (100%) create mode 100644 test-tap/reporters/mini.regular.v13.log rename test-tap/reporters/{mini.typescript.log => mini.typescript.v10.log} (100%) create mode 100644 test-tap/reporters/mini.typescript.v12.log create mode 100644 test-tap/reporters/mini.typescript.v13.log rename test-tap/reporters/{mini.watch.log => mini.watch.v10.log} (100%) create mode 100644 test-tap/reporters/mini.watch.v12.log create mode 100644 test-tap/reporters/mini.watch.v13.log create mode 100644 test-tap/reporters/readme.md rename test-tap/reporters/{tap.edgecases.log => tap.edgecases.v10.log} (100%) create mode 100644 test-tap/reporters/tap.edgecases.v12.log create mode 100644 test-tap/reporters/tap.edgecases.v13.log create mode 100644 test-tap/reporters/tap.failfast.v10.log rename test-tap/reporters/{tap.failfast.log => tap.failfast.v12.log} (100%) create mode 100644 test-tap/reporters/tap.failfast.v13.log create mode 100644 test-tap/reporters/tap.failfast2.v10.log rename test-tap/reporters/{tap.failfast2.log => tap.failfast2.v12.log} (100%) create mode 100644 test-tap/reporters/tap.failfast2.v13.log rename test-tap/reporters/{tap.only.log => tap.only.v10.log} (100%) create mode 100644 test-tap/reporters/tap.only.v12.log create mode 100644 test-tap/reporters/tap.only.v13.log create mode 100644 test-tap/reporters/tap.regular.v10.log rename test-tap/reporters/{tap.regular.log => tap.regular.v12.log} (100%) create mode 100644 test-tap/reporters/tap.regular.v13.log rename test-tap/reporters/{verbose.edgecases.log => verbose.edgecases.v10.log} (100%) create mode 100644 test-tap/reporters/verbose.edgecases.v12.log create mode 100644 test-tap/reporters/verbose.edgecases.v13.log create mode 100644 test-tap/reporters/verbose.failfast.v10.log rename test-tap/reporters/{verbose.failfast.log => verbose.failfast.v12.log} (100%) create mode 100644 test-tap/reporters/verbose.failfast.v13.log create mode 100644 test-tap/reporters/verbose.failfast2.v10.log rename test-tap/reporters/{verbose.failfast2.log => verbose.failfast2.v12.log} (100%) create mode 100644 test-tap/reporters/verbose.failfast2.v13.log rename test-tap/reporters/{verbose.only.log => verbose.only.v10.log} (100%) create mode 100644 test-tap/reporters/verbose.only.v12.log create mode 100644 test-tap/reporters/verbose.only.v13.log create mode 100644 test-tap/reporters/verbose.regular.v10.log rename test-tap/reporters/{verbose.regular.log => verbose.regular.v12.log} (100%) create mode 100644 test-tap/reporters/verbose.regular.v13.log rename test-tap/reporters/{verbose.timeoutinmultiplefiles.log => verbose.timeoutinmultiplefiles.v10.log} (100%) create mode 100644 test-tap/reporters/verbose.timeoutinmultiplefiles.v12.log create mode 100644 test-tap/reporters/verbose.timeoutinmultiplefiles.v13.log rename test-tap/reporters/{verbose.timeoutinsinglefile.log => verbose.timeoutinsinglefile.v10.log} (100%) create mode 100644 test-tap/reporters/verbose.timeoutinsinglefile.v12.log create mode 100644 test-tap/reporters/verbose.timeoutinsinglefile.v13.log rename test-tap/reporters/{verbose.timeoutwithmatch.log => verbose.timeoutwithmatch.v10.log} (100%) create mode 100644 test-tap/reporters/verbose.timeoutwithmatch.v12.log create mode 100644 test-tap/reporters/verbose.timeoutwithmatch.v13.log rename test-tap/reporters/{verbose.typescript.log => verbose.typescript.v10.log} (100%) create mode 100644 test-tap/reporters/verbose.typescript.v12.log create mode 100644 test-tap/reporters/verbose.typescript.v13.log rename test-tap/reporters/{verbose.watch.log => verbose.watch.v10.log} (100%) create mode 100644 test-tap/reporters/verbose.watch.v12.log create mode 100644 test-tap/reporters/verbose.watch.v13.log diff --git a/test-tap/reporters/mini.edgecases.log b/test-tap/reporters/mini.edgecases.v10.log similarity index 100% rename from test-tap/reporters/mini.edgecases.log rename to test-tap/reporters/mini.edgecases.v10.log diff --git a/test-tap/reporters/mini.edgecases.v12.log b/test-tap/reporters/mini.edgecases.v12.log new file mode 100644 index 000000000..9402a70d2 --- /dev/null +++ b/test-tap/reporters/mini.edgecases.v12.log @@ -0,0 +1,43 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* ✖ No tests found in ava-import-no-test-declaration.js---tty-stream-chunk-separator +---tty-stream-chunk-separator +* ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file + ✖ No tests found in ava-import-no-test-declaration.js + ✖ No tests found in import-and-use-test-member.js + ✖ No tests found in throws.js + + 2 uncaught exceptions + + Uncaught exception in import-and-use-test-member.js + + import-and-use-test-member.js:3 + + 2: +  3: test('pass', t => t.pass()); + 4: + + TypeError: test is not a function + + test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + + + + Uncaught exception in throws.js + + throws.js:1 + +  1: throw new Error('throws'); + 2: + + Error: throws + + test-tap/fixture/report/edgecases/throws.js:1:7 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.edgecases.v13.log b/test-tap/reporters/mini.edgecases.v13.log new file mode 100644 index 000000000..9402a70d2 --- /dev/null +++ b/test-tap/reporters/mini.edgecases.v13.log @@ -0,0 +1,43 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* ✖ No tests found in ava-import-no-test-declaration.js---tty-stream-chunk-separator +---tty-stream-chunk-separator +* ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file + ✖ No tests found in ava-import-no-test-declaration.js + ✖ No tests found in import-and-use-test-member.js + ✖ No tests found in throws.js + + 2 uncaught exceptions + + Uncaught exception in import-and-use-test-member.js + + import-and-use-test-member.js:3 + + 2: +  3: test('pass', t => t.pass()); + 4: + + TypeError: test is not a function + + test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + + + + Uncaught exception in throws.js + + throws.js:1 + +  1: throw new Error('throws'); + 2: + + Error: throws + + test-tap/fixture/report/edgecases/throws.js:1:7 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.failfast.v10.log b/test-tap/reporters/mini.failfast.v10.log new file mode 100644 index 000000000..de4d9e6f0 --- /dev/null +++ b/test-tap/reporters/mini.failfast.v10.log @@ -0,0 +1,30 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* a › fails + + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail()); + 4: + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast/a.js:3:22 + internal/process/next_tick.js:68:7 + + + + `--fail-fast` is on. 1 test file was skipped. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.failfast.log b/test-tap/reporters/mini.failfast.v12.log similarity index 100% rename from test-tap/reporters/mini.failfast.log rename to test-tap/reporters/mini.failfast.v12.log diff --git a/test-tap/reporters/mini.failfast.v13.log b/test-tap/reporters/mini.failfast.v13.log new file mode 100644 index 000000000..a1d0c8fcb --- /dev/null +++ b/test-tap/reporters/mini.failfast.v13.log @@ -0,0 +1,30 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* a › fails + + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail()); + 4: + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast/a.js:3:22 + async Promise.all (index 1) + + + + `--fail-fast` is on. 1 test file was skipped. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.failfast2.v10.log b/test-tap/reporters/mini.failfast2.v10.log new file mode 100644 index 000000000..6fef68ca4 --- /dev/null +++ b/test-tap/reporters/mini.failfast2.v10.log @@ -0,0 +1,30 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* a › fails + + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail());  + 4: test('passes', t => t.pass()); + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast2/a.js:3:22 + internal/process/next_tick.js:68:7 + + + + `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.failfast2.log b/test-tap/reporters/mini.failfast2.v12.log similarity index 100% rename from test-tap/reporters/mini.failfast2.log rename to test-tap/reporters/mini.failfast2.v12.log diff --git a/test-tap/reporters/mini.failfast2.v13.log b/test-tap/reporters/mini.failfast2.v13.log new file mode 100644 index 000000000..497b880b6 --- /dev/null +++ b/test-tap/reporters/mini.failfast2.v13.log @@ -0,0 +1,30 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* a › fails + + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail());  + 4: test('passes', t => t.pass()); + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast2/a.js:3:22 + async Promise.all (index 1) + + + + `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.js b/test-tap/reporters/mini.js index 8604e4c18..17c2d8e7b 100644 --- a/test-tap/reporters/mini.js +++ b/test-tap/reporters/mini.js @@ -15,7 +15,7 @@ const MiniReporter = require('../../lib/reporters/mini'); const run = (type, sanitizers = []) => t => { t.plan(1); - const logFile = path.join(__dirname, `mini.${type.toLowerCase()}.log`); + const logFile = path.join(__dirname, `mini.${type.toLowerCase()}.${process.version.split('.')[0]}.log`); const tty = new TTYStream({ columns: 200, diff --git a/test-tap/reporters/mini.only.log b/test-tap/reporters/mini.only.v10.log similarity index 100% rename from test-tap/reporters/mini.only.log rename to test-tap/reporters/mini.only.v10.log diff --git a/test-tap/reporters/mini.only.v12.log b/test-tap/reporters/mini.only.v12.log new file mode 100644 index 000000000..7bb4c83c2 --- /dev/null +++ b/test-tap/reporters/mini.only.v12.log @@ -0,0 +1,17 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* a › only + + 1 passed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* b › passes + + 2 passed---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 2 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.only.v13.log b/test-tap/reporters/mini.only.v13.log new file mode 100644 index 000000000..7bb4c83c2 --- /dev/null +++ b/test-tap/reporters/mini.only.v13.log @@ -0,0 +1,17 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* a › only + + 1 passed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* b › passes + + 2 passed---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 2 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.regular.v10.log b/test-tap/reporters/mini.regular.v10.log new file mode 100644 index 000000000..4b20d2008 --- /dev/null +++ b/test-tap/reporters/mini.regular.v10.log @@ -0,0 +1,503 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* output-in-hook › passing test + + 1 passed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* output-in-hook › failing test + + 1 passed + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* slow › slow + + 2 passed + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 3 passed + 1 test failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › fails + + 3 passed + 2 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › known failure + + 3 passed + 1 known failure + 2 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › no longer failing + + 3 passed + 1 known failure + 3 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › logs + + 3 passed + 1 known failure + 4 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › formatted + + 3 passed + 1 known failure + 5 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › power-assert + + 3 passed + 1 known failure + 6 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › bad throws + + 3 passed + 1 known failure + 7 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › bad notThrows + + 3 passed + 1 known failure + 8 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › implementation throws non-error + + 3 passed + 1 known failure + 9 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › throws + + 3 passed + 1 known failure + 10 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › notThrows + + 3 passed + 1 known failure + 11 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › notThrowsAsync + + 3 passed + 1 known failure + 12 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › throwsAsync + + 3 passed + 1 known failure + 13 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › throwsAsync different error + + 3 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* uncaught-exception › passes + + 4 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* unhandled-rejection › passes + + 5 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* unhandled-rejection › unhandled non-error rejection + + 6 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + ✖ No tests found in bad-test-chain.js + + 14 tests failed + 1 known failure + 1 test skipped + 1 test todo + 2 unhandled rejections + 2 uncaught exceptions + + test › known failure + + output-in-hook › failing test + + output-in-hook.js:34 + + 33: test('failing test', t => { +  34: t.fail();  + 35: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/output-in-hook.js:34:4 + internal/process/next_tick.js:68:7 + + + + test › fails + + test.js:9 + + 8: +  9: test('fails', t => t.fail()); + 10: + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:9:22 + internal/process/next_tick.js:68:7 + + + + test › no longer failing + + + Error: Test was expected to fail, but succeeded, you should stop marking the test as failing + + new Promise () + internal/process/next_tick.js:68:7 + + + + test › logs + ℹ hello + ℹ world + + test.js:18 + + 17: t.log('world'); +  18: t.fail();  + 19: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:18:4 + internal/process/next_tick.js:68:7 + + + + test › formatted + + test.js:22 + + 21: test('formatted', t => { +  22: t.deepEqual('foo', 'bar'); + 23: }); + + Difference: + + - 'foo' + + 'bar' + + test-tap/fixture/report/regular/test.js:22:4 + internal/process/next_tick.js:68:7 + + + + test › power-assert + + test.js:27 + + 26: const foo = ''; +  27: t.assert(foo);  + 28: }); + + Value is not truthy: + + '' + + foo + => '' + + test-tap/fixture/report/regular/test.js:27:4 + internal/process/next_tick.js:68:7 + + + + test › bad throws + + test.js:35 + + 34: +  35: t.throws(fn()); + 36: }); + + Improper usage of `t.throws()` detected + + The following error was thrown, possibly before `t.throws()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.throws()` in a function: + + t.throws(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + internal/process/next_tick.js:68:7 + + + + test › bad notThrows + + test.js:43 + + 42: +  43: t.notThrows(fn()); + 44: }); + + Improper usage of `t.notThrows()` detected + + The following error was thrown, possibly before `t.notThrows()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.notThrows()` in a function: + + t.notThrows(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + internal/process/next_tick.js:68:7 + + + + test › implementation throws non-error + + + Error thrown in test: + + null + + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › throws + + traces-in-t-throws.js:12 + + 11: test('throws', t => { +  12: t.throws(() => throwError(), {instanceOf: TypeError}); + 13: }); + + Function threw unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › notThrows + + traces-in-t-throws.js:16 + + 15: test('notThrows', t => { +  16: t.notThrows(() => throwError()); + 17: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › notThrowsAsync + + traces-in-t-throws.js:20 + + 19: test('notThrowsAsync', t => { +  20: t.notThrowsAsync(() => throwError()); + 21: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › throwsAsync + + traces-in-t-throws.js:24 + + 23: test('throwsAsync', t => { +  24: t.throwsAsync(() => throwError(), {instanceOf: TypeError}); + 25: }); + + Function threw synchronously. Use `t.throws()` instead: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › throwsAsync different error + + traces-in-t-throws.js:28 + + 27: test('throwsAsync different error', t => { +  28: return t.throwsAsync(returnRejectedPromise, {instanceOf: TypeError}); + 29: }); + + Returned promise rejected with unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + internal/process/next_tick.js:68:7 + + + + Uncaught exception in bad-test-chain.js + + bad-test-chain.js:3 + + 2: +  3: test.serial.test('passes', t => t.pass()); + 4: + + TypeError: test.serial.test is not a function + + test-tap/fixture/report/regular/bad-test-chain.js:3:13 + + + + Uncaught exception in uncaught-exception.js + + uncaught-exception.js:5 + + 4: setTimeout(() => { +  5: throw new Error('Can’t catch me'); + 6: }); + + Error: Can’t catch me + + test-tap/fixture/report/regular/uncaught-exception.js:5:9 + timers.js:436:11 + timers.js:300:5 + timers.js:263:5 + timers.js:223:10 + + + + Unhandled rejection in unhandled-rejection.js + + unhandled-rejection.js:4 + + 3: const passes = t => { +  4: Promise.reject(new Error('Can’t catch me')); + 5: t.pass(); + + Error: Can’t catch me + + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + internal/process/next_tick.js:68:7 + + + + Unhandled rejection in unhandled-rejection.js + + null + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.regular.log b/test-tap/reporters/mini.regular.v12.log similarity index 100% rename from test-tap/reporters/mini.regular.log rename to test-tap/reporters/mini.regular.v12.log diff --git a/test-tap/reporters/mini.regular.v13.log b/test-tap/reporters/mini.regular.v13.log new file mode 100644 index 000000000..f1a5120f8 --- /dev/null +++ b/test-tap/reporters/mini.regular.v13.log @@ -0,0 +1,501 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* output-in-hook › passing test + + 1 passed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* output-in-hook › failing test + + 1 passed + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* slow › slow + + 2 passed + 1 test failed---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 3 passed + 1 test failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › fails + + 3 passed + 2 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › known failure + + 3 passed + 1 known failure + 2 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › no longer failing + + 3 passed + 1 known failure + 3 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › logs + + 3 passed + 1 known failure + 4 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › formatted + + 3 passed + 1 known failure + 5 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › power-assert + + 3 passed + 1 known failure + 6 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › bad throws + + 3 passed + 1 known failure + 7 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › bad notThrows + + 3 passed + 1 known failure + 8 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › implementation throws non-error + + 3 passed + 1 known failure + 9 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › throws + + 3 passed + 1 known failure + 10 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › notThrows + + 3 passed + 1 known failure + 11 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › notThrowsAsync + + 3 passed + 1 known failure + 12 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › throwsAsync + + 3 passed + 1 known failure + 13 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* traces-in-t-throws › throwsAsync different error + + 3 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* uncaught-exception › passes + + 4 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* unhandled-rejection › passes + + 5 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +* unhandled-rejection › unhandled non-error rejection + + 6 passed + 1 known failure + 14 tests failed + 1 skipped + 1 todo---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + ✖ No tests found in bad-test-chain.js + + 14 tests failed + 1 known failure + 1 test skipped + 1 test todo + 2 unhandled rejections + 2 uncaught exceptions + + test › known failure + + output-in-hook › failing test + + output-in-hook.js:34 + + 33: test('failing test', t => { +  34: t.fail();  + 35: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/output-in-hook.js:34:4 + async Promise.all (index 1) + + + + test › fails + + test.js:9 + + 8: +  9: test('fails', t => t.fail()); + 10: + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:9:22 + async Promise.all (index 1) + + + + test › no longer failing + + + Error: Test was expected to fail, but succeeded, you should stop marking the test as failing + + new Promise () + async Promise.all (index 3) + + + + test › logs + ℹ hello + ℹ world + + test.js:18 + + 17: t.log('world'); +  18: t.fail();  + 19: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:18:4 + async Promise.all (index 4) + + + + test › formatted + + test.js:22 + + 21: test('formatted', t => { +  22: t.deepEqual('foo', 'bar'); + 23: }); + + Difference: + + - 'foo' + + 'bar' + + test-tap/fixture/report/regular/test.js:22:4 + async Promise.all (index 5) + + + + test › power-assert + + test.js:27 + + 26: const foo = ''; +  27: t.assert(foo);  + 28: }); + + Value is not truthy: + + '' + + foo + => '' + + test-tap/fixture/report/regular/test.js:27:4 + async Promise.all (index 6) + + + + test › bad throws + + test.js:35 + + 34: +  35: t.throws(fn()); + 36: }); + + Improper usage of `t.throws()` detected + + The following error was thrown, possibly before `t.throws()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.throws()` in a function: + + t.throws(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + async Promise.all (index 7) + + + + test › bad notThrows + + test.js:43 + + 42: +  43: t.notThrows(fn()); + 44: }); + + Improper usage of `t.notThrows()` detected + + The following error was thrown, possibly before `t.notThrows()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.notThrows()` in a function: + + t.notThrows(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + async Promise.all (index 8) + + + + test › implementation throws non-error + + + Error thrown in test: + + null + + async Promise.all (index 9) + + + + traces-in-t-throws › throws + + traces-in-t-throws.js:12 + + 11: test('throws', t => { +  12: t.throws(() => throwError(), {instanceOf: TypeError}); + 13: }); + + Function threw unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + async Promise.all (index 0) + + + + traces-in-t-throws › notThrows + + traces-in-t-throws.js:16 + + 15: test('notThrows', t => { +  16: t.notThrows(() => throwError()); + 17: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + async Promise.all (index 1) + + + + traces-in-t-throws › notThrowsAsync + + traces-in-t-throws.js:20 + + 19: test('notThrowsAsync', t => { +  20: t.notThrowsAsync(() => throwError()); + 21: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + async Promise.all (index 2) + + + + traces-in-t-throws › throwsAsync + + traces-in-t-throws.js:24 + + 23: test('throwsAsync', t => { +  24: t.throwsAsync(() => throwError(), {instanceOf: TypeError}); + 25: }); + + Function threw synchronously. Use `t.throws()` instead: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + async Promise.all (index 3) + + + + traces-in-t-throws › throwsAsync different error + + traces-in-t-throws.js:28 + + 27: test('throwsAsync different error', t => { +  28: return t.throwsAsync(returnRejectedPromise, {instanceOf: TypeError}); + 29: }); + + Returned promise rejected with unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + async Promise.all (index 4) + + + + Uncaught exception in bad-test-chain.js + + bad-test-chain.js:3 + + 2: +  3: test.serial.test('passes', t => t.pass()); + 4: + + TypeError: test.serial.test is not a function + + test-tap/fixture/report/regular/bad-test-chain.js:3:13 + + + + Uncaught exception in uncaught-exception.js + + uncaught-exception.js:5 + + 4: setTimeout(() => { +  5: throw new Error('Can’t catch me'); + 6: }); + + Error: Can’t catch me + + test-tap/fixture/report/regular/uncaught-exception.js:5:9 + internal/timers.js:537:17 + internal/timers.js:481:7 + + + + Unhandled rejection in unhandled-rejection.js + + unhandled-rejection.js:4 + + 3: const passes = t => { +  4: Promise.reject(new Error('Can’t catch me')); + 5: t.pass(); + + Error: Can’t catch me + + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + async Promise.all (index 0) + + + + Unhandled rejection in unhandled-rejection.js + + null + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.typescript.log b/test-tap/reporters/mini.typescript.v10.log similarity index 100% rename from test-tap/reporters/mini.typescript.log rename to test-tap/reporters/mini.typescript.v10.log diff --git a/test-tap/reporters/mini.typescript.v12.log b/test-tap/reporters/mini.typescript.v12.log new file mode 100644 index 000000000..c7131fef0 --- /dev/null +++ b/test-tap/reporters/mini.typescript.v12.log @@ -0,0 +1,16 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + ✖ No tests found in build-error.ts + + 1 uncaught exception + + Uncaught exception in build-error.ts + + build-error.ts(1,1): error TS2304: Cannot find name 'trigger'. + build-error.ts(2,1): error TS2304: Cannot find name 'lets'. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.typescript.v13.log b/test-tap/reporters/mini.typescript.v13.log new file mode 100644 index 000000000..c7131fef0 --- /dev/null +++ b/test-tap/reporters/mini.typescript.v13.log @@ -0,0 +1,16 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + ✖ No tests found in build-error.ts + + 1 uncaught exception + + Uncaught exception in build-error.ts + + build-error.ts(1,1): error TS2304: Cannot find name 'trigger'. + build-error.ts(2,1): error TS2304: Cannot find name 'lets'. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.watch.log b/test-tap/reporters/mini.watch.v10.log similarity index 100% rename from test-tap/reporters/mini.watch.log rename to test-tap/reporters/mini.watch.v10.log diff --git a/test-tap/reporters/mini.watch.v12.log b/test-tap/reporters/mini.watch.v12.log new file mode 100644 index 000000000..1f6d8ef7c --- /dev/null +++ b/test-tap/reporters/mini.watch.v12.log @@ -0,0 +1,48 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test passed [17:19:12] + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test passed [17:19:12] + 2 previous failures in test files that were not rerun + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test passed [17:19:12] + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.watch.v13.log b/test-tap/reporters/mini.watch.v13.log new file mode 100644 index 000000000..1f6d8ef7c --- /dev/null +++ b/test-tap/reporters/mini.watch.v13.log @@ -0,0 +1,48 @@ +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* ---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test passed [17:19:12] + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test passed [17:19:12] + 2 previous failures in test files that were not rerun + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator +[?25l---tty-stream-chunk-separator + +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +* test › passes + + 1 passed [17:19:12]---tty-stream-chunk-separator +---tty-stream-chunk-separator +[?25h + 1 test passed [17:19:12] + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/readme.md b/test-tap/reporters/readme.md new file mode 100644 index 000000000..9f2dbd9ac --- /dev/null +++ b/test-tap/reporters/readme.md @@ -0,0 +1,8 @@ +# Upgrade reporter test +There are separate log-files for every supported +major node version. +To upgrade to a new major node version, install +the new node version with [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md), +and run `npm run test`. +This command creates a new set of log-files, that +you should add to the git repository. diff --git a/test-tap/reporters/tap.edgecases.log b/test-tap/reporters/tap.edgecases.v10.log similarity index 100% rename from test-tap/reporters/tap.edgecases.log rename to test-tap/reporters/tap.edgecases.v10.log diff --git a/test-tap/reporters/tap.edgecases.v12.log b/test-tap/reporters/tap.edgecases.v12.log new file mode 100644 index 000000000..a6b6943c7 --- /dev/null +++ b/test-tap/reporters/tap.edgecases.v12.log @@ -0,0 +1,39 @@ +TAP version 13 +---tty-stream-chunk-separator +# No tests found in ava-import-no-test-declaration.js +not ok 1 - No tests found in ava-import-no-test-declaration.js +---tty-stream-chunk-separator +# TypeError: test is not a function +not ok 2 - TypeError: test is not a function + --- + name: TypeError + message: test is not a function + at: >- + Object. + (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) + ... +---tty-stream-chunk-separator +# import-and-use-test-member.js exited with a non-zero exit code: 1 +not ok 3 - import-and-use-test-member.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +# No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file +not ok 4 - No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file +---tty-stream-chunk-separator +# Error: throws +not ok 5 - Error: throws + --- + name: Error + message: throws + at: 'test-tap/fixture/report/edgecases/throws.js:1:7' + ... +---tty-stream-chunk-separator +# throws.js exited with a non-zero exit code: 1 +not ok 6 - throws.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + +1..0 +# tests 0 +# pass 0 +# fail 6 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.edgecases.v13.log b/test-tap/reporters/tap.edgecases.v13.log new file mode 100644 index 000000000..a6b6943c7 --- /dev/null +++ b/test-tap/reporters/tap.edgecases.v13.log @@ -0,0 +1,39 @@ +TAP version 13 +---tty-stream-chunk-separator +# No tests found in ava-import-no-test-declaration.js +not ok 1 - No tests found in ava-import-no-test-declaration.js +---tty-stream-chunk-separator +# TypeError: test is not a function +not ok 2 - TypeError: test is not a function + --- + name: TypeError + message: test is not a function + at: >- + Object. + (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) + ... +---tty-stream-chunk-separator +# import-and-use-test-member.js exited with a non-zero exit code: 1 +not ok 3 - import-and-use-test-member.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +# No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file +not ok 4 - No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file +---tty-stream-chunk-separator +# Error: throws +not ok 5 - Error: throws + --- + name: Error + message: throws + at: 'test-tap/fixture/report/edgecases/throws.js:1:7' + ... +---tty-stream-chunk-separator +# throws.js exited with a non-zero exit code: 1 +not ok 6 - throws.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + +1..0 +# tests 0 +# pass 0 +# fail 6 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast.v10.log b/test-tap/reporters/tap.failfast.v10.log new file mode 100644 index 000000000..28339aa5f --- /dev/null +++ b/test-tap/reporters/tap.failfast.v10.log @@ -0,0 +1,20 @@ +TAP version 13 +---tty-stream-chunk-separator +# a › fails +not ok 1 - a › fails + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/failfast/a.js:3:22 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator + +1..1 +# tests 1 +# pass 0 +# fail 1 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast.log b/test-tap/reporters/tap.failfast.v12.log similarity index 100% rename from test-tap/reporters/tap.failfast.log rename to test-tap/reporters/tap.failfast.v12.log diff --git a/test-tap/reporters/tap.failfast.v13.log b/test-tap/reporters/tap.failfast.v13.log new file mode 100644 index 000000000..11941af1e --- /dev/null +++ b/test-tap/reporters/tap.failfast.v13.log @@ -0,0 +1,20 @@ +TAP version 13 +---tty-stream-chunk-separator +# a › fails +not ok 1 - a › fails + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/failfast/a.js:3:22 + async Promise.all (index 1) + ... +---tty-stream-chunk-separator + +1..1 +# tests 1 +# pass 0 +# fail 1 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast2.v10.log b/test-tap/reporters/tap.failfast2.v10.log new file mode 100644 index 000000000..e38f9897f --- /dev/null +++ b/test-tap/reporters/tap.failfast2.v10.log @@ -0,0 +1,22 @@ +TAP version 13 +---tty-stream-chunk-separator +# a › fails +not ok 1 - a › fails + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/failfast2/a.js:3:22 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# 1 test remaining in a.js +---tty-stream-chunk-separator + +1..2 +# tests 2 +# pass 0 +# fail 2 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast2.log b/test-tap/reporters/tap.failfast2.v12.log similarity index 100% rename from test-tap/reporters/tap.failfast2.log rename to test-tap/reporters/tap.failfast2.v12.log diff --git a/test-tap/reporters/tap.failfast2.v13.log b/test-tap/reporters/tap.failfast2.v13.log new file mode 100644 index 000000000..3c40115e4 --- /dev/null +++ b/test-tap/reporters/tap.failfast2.v13.log @@ -0,0 +1,22 @@ +TAP version 13 +---tty-stream-chunk-separator +# a › fails +not ok 1 - a › fails + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/failfast2/a.js:3:22 + async Promise.all (index 1) + ... +---tty-stream-chunk-separator +# 1 test remaining in a.js +---tty-stream-chunk-separator + +1..2 +# tests 2 +# pass 0 +# fail 2 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.js b/test-tap/reporters/tap.js index 23d552443..30363d740 100644 --- a/test-tap/reporters/tap.js +++ b/test-tap/reporters/tap.js @@ -10,7 +10,7 @@ const TapReporter = require('../../lib/reporters/tap'); const run = (type, sanitizers = []) => t => { t.plan(1); - const logFile = path.join(__dirname, `tap.${type.toLowerCase()}.log`); + const logFile = path.join(__dirname, `tap.${type.toLowerCase()}.${process.version.split('.')[0]}.log`); const tty = new TTYStream({ columns: 200, diff --git a/test-tap/reporters/tap.only.log b/test-tap/reporters/tap.only.v10.log similarity index 100% rename from test-tap/reporters/tap.only.log rename to test-tap/reporters/tap.only.v10.log diff --git a/test-tap/reporters/tap.only.v12.log b/test-tap/reporters/tap.only.v12.log new file mode 100644 index 000000000..4df4b8c60 --- /dev/null +++ b/test-tap/reporters/tap.only.v12.log @@ -0,0 +1,15 @@ +TAP version 13 +---tty-stream-chunk-separator +# a › only +ok 1 - a › only +---tty-stream-chunk-separator +# b › passes +ok 2 - b › passes +---tty-stream-chunk-separator + +1..2 +# tests 2 +# pass 2 +# fail 0 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.only.v13.log b/test-tap/reporters/tap.only.v13.log new file mode 100644 index 000000000..4df4b8c60 --- /dev/null +++ b/test-tap/reporters/tap.only.v13.log @@ -0,0 +1,15 @@ +TAP version 13 +---tty-stream-chunk-separator +# a › only +ok 1 - a › only +---tty-stream-chunk-separator +# b › passes +ok 2 - b › passes +---tty-stream-chunk-separator + +1..2 +# tests 2 +# pass 2 +# fail 0 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.regular.v10.log b/test-tap/reporters/tap.regular.v10.log new file mode 100644 index 000000000..89838910c --- /dev/null +++ b/test-tap/reporters/tap.regular.v10.log @@ -0,0 +1,318 @@ +TAP version 13 +---tty-stream-chunk-separator +# TypeError: test.serial.test is not a function +not ok 1 - TypeError: test.serial.test is not a function + --- + name: TypeError + message: test.serial.test is not a function + at: 'test-tap/fixture/report/regular/bad-test-chain.js:3:13' + ... +---tty-stream-chunk-separator +# bad-test-chain.js exited with a non-zero exit code: 1 +not ok 2 - bad-test-chain.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +# output-in-hook › before hook +---tty-stream-chunk-separator +# output-in-hook › before hook +---tty-stream-chunk-separator + # before +---tty-stream-chunk-separator +# output-in-hook › beforeEach hook for passing test +---tty-stream-chunk-separator + # beforeEach +---tty-stream-chunk-separator +# output-in-hook › beforeEach hook for failing test +---tty-stream-chunk-separator + # beforeEach +---tty-stream-chunk-separator +# output-in-hook › passing test +ok 3 - output-in-hook › passing test +---tty-stream-chunk-separator +# output-in-hook › failing test +not ok 4 - output-in-hook › failing test + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/regular/output-in-hook.js:34:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# output-in-hook › afterEach hook for passing test +---tty-stream-chunk-separator + # afterEach +---tty-stream-chunk-separator +# output-in-hook › afterEach.always hook for failing test +---tty-stream-chunk-separator + # afterEachAlways +---tty-stream-chunk-separator +# output-in-hook › afterEach.always hook for passing test +---tty-stream-chunk-separator + # afterEachAlways +---tty-stream-chunk-separator +# output-in-hook › cleanup +---tty-stream-chunk-separator + # afterAlways +---tty-stream-chunk-separator +# slow › slow +ok 5 - slow › slow +---tty-stream-chunk-separator +# test › skip +ok 6 - test › skip # SKIP +---tty-stream-chunk-separator +# test › todo +not ok 7 - test › todo # TODO +---tty-stream-chunk-separator +# test › passes +ok 8 - test › passes +---tty-stream-chunk-separator +# test › fails +not ok 9 - test › fails + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/regular/test.js:9:22 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# test › known failure +ok 10 - test › known failure +---tty-stream-chunk-separator +# test › no longer failing +not ok 11 - test › no longer failing + --- + name: Error + message: >- + Test was expected to fail, but succeeded, you should stop marking the test as + failing + at: |- + new Promise () + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# test › logs +not ok 12 - test › logs + * hello + * world + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/regular/test.js:18:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# test › formatted +not ok 13 - test › formatted + --- + name: AssertionError + assertion: deepEqual + values: + 'Difference:': |- + - 'foo' + + 'bar' + at: |- + test-tap/fixture/report/regular/test.js:22:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# test › power-assert +not ok 14 - test › power-assert + --- + name: AssertionError + assertion: assert + operator: '!!' + values: + 'Value is not truthy:': '''''' + at: |- + test-tap/fixture/report/regular/test.js:27:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# test › bad throws +not ok 15 - test › bad throws + --- + name: AssertionError + message: Improper usage of `t.throws()` detected + assertion: throws + values: + 'The following error was thrown, possibly before `t.throws()` could be called:': |- + Error { + message: 'err', + } + at: |- + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# test › bad notThrows +not ok 16 - test › bad notThrows + --- + name: AssertionError + message: Improper usage of `t.notThrows()` detected + assertion: notThrows + values: + 'The following error was thrown, possibly before `t.notThrows()` could be called:': |- + Error { + message: 'err', + } + at: |- + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# test › implementation throws non-error +not ok 17 - test › implementation throws non-error + --- + name: AssertionError + message: Error thrown in test + values: + 'Error thrown in test:': 'null' + at: 'internal/process/next_tick.js:68:7' + ... +---tty-stream-chunk-separator +# traces-in-t-throws › throws +not ok 18 - traces-in-t-throws › throws + --- + name: AssertionError + assertion: throws + values: + 'Function threw unexpected exception:': |- + Error { + message: 'uh-oh', + } + 'Expected instance of:': 'Function TypeError {}' + at: |- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# traces-in-t-throws › notThrows +not ok 19 - traces-in-t-throws › notThrows + --- + name: AssertionError + assertion: notThrows + values: + 'Function threw:': |- + Error { + message: 'uh-oh', + } + at: |- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# traces-in-t-throws › notThrowsAsync +not ok 20 - traces-in-t-throws › notThrowsAsync + --- + name: AssertionError + assertion: notThrowsAsync + values: + 'Function threw:': |- + Error { + message: 'uh-oh', + } + at: |- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# traces-in-t-throws › throwsAsync +not ok 21 - traces-in-t-throws › throwsAsync + --- + name: AssertionError + assertion: throwsAsync + values: + 'Function threw synchronously. Use `t.throws()` instead:': |- + Error { + message: 'uh-oh', + } + at: |- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# traces-in-t-throws › throwsAsync different error +not ok 22 - traces-in-t-throws › throwsAsync different error + --- + name: AssertionError + assertion: throwsAsync + values: + 'Returned promise rejected with unexpected exception:': |- + Error { + message: 'uh-oh', + } + 'Expected instance of:': 'Function TypeError {}' + at: >- + returnRejectedPromise + (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# uncaught-exception › passes +ok 23 - uncaught-exception › passes +---tty-stream-chunk-separator +# Error: Can’t catch me +not ok 24 - Error: Can’t catch me + --- + name: Error + message: Can’t catch me + at: |- + test-tap/fixture/report/regular/uncaught-exception.js:5:9 + timers.js:436:11 + timers.js:300:5 + timers.js:263:5 + timers.js:223:10 + ... +---tty-stream-chunk-separator +# uncaught-exception.js exited with a non-zero exit code: 1 +not ok 25 - uncaught-exception.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +# unhandled-rejection › passes +ok 26 - unhandled-rejection › passes +---tty-stream-chunk-separator +# unhandled-rejection › unhandled non-error rejection +ok 27 - unhandled-rejection › unhandled non-error rejection +---tty-stream-chunk-separator +# Error: Can’t catch me +not ok 28 - Error: Can’t catch me + --- + name: Error + message: Can’t catch me + at: |- + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + internal/process/next_tick.js:68:7 + ... +---tty-stream-chunk-separator +# unhandled-rejection +not ok 29 - unhandled-rejection + --- + message: Non-error object + formatted: 'null' + ... +---tty-stream-chunk-separator + +1..23 +# tests 22 +# pass 7 +# skip 1 +# fail 21 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.regular.log b/test-tap/reporters/tap.regular.v12.log similarity index 100% rename from test-tap/reporters/tap.regular.log rename to test-tap/reporters/tap.regular.v12.log diff --git a/test-tap/reporters/tap.regular.v13.log b/test-tap/reporters/tap.regular.v13.log new file mode 100644 index 000000000..05a5ab6d5 --- /dev/null +++ b/test-tap/reporters/tap.regular.v13.log @@ -0,0 +1,324 @@ +TAP version 13 +---tty-stream-chunk-separator +# TypeError: test.serial.test is not a function +not ok 1 - TypeError: test.serial.test is not a function + --- + name: TypeError + message: test.serial.test is not a function + at: 'test-tap/fixture/report/regular/bad-test-chain.js:3:13' + ... +---tty-stream-chunk-separator +# bad-test-chain.js exited with a non-zero exit code: 1 +not ok 2 - bad-test-chain.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +# output-in-hook › before hook +---tty-stream-chunk-separator +# output-in-hook › before hook +---tty-stream-chunk-separator + # before +---tty-stream-chunk-separator +# output-in-hook › beforeEach hook for passing test +---tty-stream-chunk-separator + # beforeEach +---tty-stream-chunk-separator +# output-in-hook › beforeEach hook for failing test +---tty-stream-chunk-separator + # beforeEach +---tty-stream-chunk-separator +# output-in-hook › passing test +ok 3 - output-in-hook › passing test +---tty-stream-chunk-separator +# output-in-hook › failing test +not ok 4 - output-in-hook › failing test + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/regular/output-in-hook.js:34:4 + async Promise.all (index 1) + ... +---tty-stream-chunk-separator +# output-in-hook › afterEach hook for passing test +---tty-stream-chunk-separator + # afterEach +---tty-stream-chunk-separator +# output-in-hook › afterEach.always hook for failing test +---tty-stream-chunk-separator + # afterEachAlways +---tty-stream-chunk-separator +# output-in-hook › afterEach.always hook for passing test +---tty-stream-chunk-separator + # afterEachAlways +---tty-stream-chunk-separator +# output-in-hook › cleanup +---tty-stream-chunk-separator + # afterAlways +---tty-stream-chunk-separator +# slow › slow +ok 5 - slow › slow +---tty-stream-chunk-separator +# test › skip +ok 6 - test › skip # SKIP +---tty-stream-chunk-separator +# test › todo +not ok 7 - test › todo # TODO +---tty-stream-chunk-separator +# test › passes +ok 8 - test › passes +---tty-stream-chunk-separator +# test › fails +not ok 9 - test › fails + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/regular/test.js:9:22 + async Promise.all (index 1) + ... +---tty-stream-chunk-separator +# test › known failure +ok 10 - test › known failure +---tty-stream-chunk-separator +# test › no longer failing +not ok 11 - test › no longer failing + --- + name: Error + message: >- + Test was expected to fail, but succeeded, you should stop marking the test as + failing + at: |- + new Promise () + async Promise.all (index 3) + ... +---tty-stream-chunk-separator +# test › logs +not ok 12 - test › logs + * hello + * world + --- + name: AssertionError + message: Test failed via `t.fail()` + assertion: fail + at: |- + test-tap/fixture/report/regular/test.js:18:4 + async Promise.all (index 4) + ... +---tty-stream-chunk-separator +# test › formatted +not ok 13 - test › formatted + --- + name: AssertionError + assertion: deepEqual + values: + 'Difference:': |- + - 'foo' + + 'bar' + at: |- + test-tap/fixture/report/regular/test.js:22:4 + async Promise.all (index 5) + ... +---tty-stream-chunk-separator +# test › power-assert +not ok 14 - test › power-assert + --- + name: AssertionError + assertion: assert + operator: '!!' + values: + 'Value is not truthy:': '''''' + at: |- + test-tap/fixture/report/regular/test.js:27:4 + async Promise.all (index 6) + ... +---tty-stream-chunk-separator +# test › bad throws +not ok 15 - test › bad throws + --- + name: AssertionError + message: Improper usage of `t.throws()` detected + assertion: throws + values: + 'The following error was thrown, possibly before `t.throws()` could be called:': |- + Error { + message: 'err', + } + at: |- + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + async Promise.all (index 7) + ... +---tty-stream-chunk-separator +# test › bad notThrows +not ok 16 - test › bad notThrows + --- + name: AssertionError + message: Improper usage of `t.notThrows()` detected + assertion: notThrows + values: + 'The following error was thrown, possibly before `t.notThrows()` could be called:': |- + Error { + message: 'err', + } + at: |- + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + async Promise.all (index 8) + ... +---tty-stream-chunk-separator +# test › implementation throws non-error +not ok 17 - test › implementation throws non-error + --- + name: AssertionError + message: Error thrown in test + values: + 'Error thrown in test:': 'null' + at: async Promise.all (index 9) + ... +---tty-stream-chunk-separator +# traces-in-t-throws › throws +not ok 18 - traces-in-t-throws › throws + --- + name: AssertionError + assertion: throws + values: + 'Function threw unexpected exception:': |- + Error { + message: 'uh-oh', + } + 'Expected instance of:': 'Function TypeError {}' + at: >- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + + t.throws.instanceOf + (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + + async Promise.all (index 0) + ... +---tty-stream-chunk-separator +# traces-in-t-throws › notThrows +not ok 19 - traces-in-t-throws › notThrows + --- + name: AssertionError + assertion: notThrows + values: + 'Function threw:': |- + Error { + message: 'uh-oh', + } + at: |- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + async Promise.all (index 1) + ... +---tty-stream-chunk-separator +# traces-in-t-throws › notThrowsAsync +not ok 20 - traces-in-t-throws › notThrowsAsync + --- + name: AssertionError + assertion: notThrowsAsync + values: + 'Function threw:': |- + Error { + message: 'uh-oh', + } + at: |- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + async Promise.all (index 2) + ... +---tty-stream-chunk-separator +# traces-in-t-throws › throwsAsync +not ok 21 - traces-in-t-throws › throwsAsync + --- + name: AssertionError + assertion: throwsAsync + values: + 'Function threw synchronously. Use `t.throws()` instead:': |- + Error { + message: 'uh-oh', + } + at: >- + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + + t.throwsAsync.instanceOf + (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + + async Promise.all (index 3) + ... +---tty-stream-chunk-separator +# traces-in-t-throws › throwsAsync different error +not ok 22 - traces-in-t-throws › throwsAsync different error + --- + name: AssertionError + assertion: throwsAsync + values: + 'Returned promise rejected with unexpected exception:': |- + Error { + message: 'uh-oh', + } + 'Expected instance of:': 'Function TypeError {}' + at: >- + returnRejectedPromise + (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + + async Promise.all (index 4) + ... +---tty-stream-chunk-separator +# uncaught-exception › passes +ok 23 - uncaught-exception › passes +---tty-stream-chunk-separator +# Error: Can’t catch me +not ok 24 - Error: Can’t catch me + --- + name: Error + message: Can’t catch me + at: |- + test-tap/fixture/report/regular/uncaught-exception.js:5:9 + internal/timers.js:537:17 + internal/timers.js:481:7 + ... +---tty-stream-chunk-separator +# uncaught-exception.js exited with a non-zero exit code: 1 +not ok 25 - uncaught-exception.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator +# unhandled-rejection › passes +ok 26 - unhandled-rejection › passes +---tty-stream-chunk-separator +# unhandled-rejection › unhandled non-error rejection +ok 27 - unhandled-rejection › unhandled non-error rejection +---tty-stream-chunk-separator +# Error: Can’t catch me +not ok 28 - Error: Can’t catch me + --- + name: Error + message: Can’t catch me + at: |- + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + async Promise.all (index 0) + ... +---tty-stream-chunk-separator +# unhandled-rejection +not ok 29 - unhandled-rejection + --- + message: Non-error object + formatted: 'null' + ... +---tty-stream-chunk-separator + +1..23 +# tests 22 +# pass 7 +# skip 1 +# fail 21 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.edgecases.log b/test-tap/reporters/verbose.edgecases.v10.log similarity index 100% rename from test-tap/reporters/verbose.edgecases.log rename to test-tap/reporters/verbose.edgecases.v10.log diff --git a/test-tap/reporters/verbose.edgecases.v12.log b/test-tap/reporters/verbose.edgecases.v12.log new file mode 100644 index 000000000..94794e3c5 --- /dev/null +++ b/test-tap/reporters/verbose.edgecases.v12.log @@ -0,0 +1,41 @@ + +---tty-stream-chunk-separator + ✖ No tests found in ava-import-no-test-declaration.js +---tty-stream-chunk-separator + + Uncaught exception in import-and-use-test-member.js + + import-and-use-test-member.js:3 + + 2: +  3: test('pass', t => t.pass()); + 4: + + TypeError: test is not a function + + test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + +---tty-stream-chunk-separator + ✖ import-and-use-test-member.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file +---tty-stream-chunk-separator + + Uncaught exception in throws.js + + throws.js:1 + +  1: throw new Error('throws'); + 2: + + Error: throws + + test-tap/fixture/report/edgecases/throws.js:1:7 + +---tty-stream-chunk-separator + ✖ throws.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + + 2 uncaught exceptions + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.edgecases.v13.log b/test-tap/reporters/verbose.edgecases.v13.log new file mode 100644 index 000000000..94794e3c5 --- /dev/null +++ b/test-tap/reporters/verbose.edgecases.v13.log @@ -0,0 +1,41 @@ + +---tty-stream-chunk-separator + ✖ No tests found in ava-import-no-test-declaration.js +---tty-stream-chunk-separator + + Uncaught exception in import-and-use-test-member.js + + import-and-use-test-member.js:3 + + 2: +  3: test('pass', t => t.pass()); + 4: + + TypeError: test is not a function + + test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + +---tty-stream-chunk-separator + ✖ import-and-use-test-member.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✖ No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file +---tty-stream-chunk-separator + + Uncaught exception in throws.js + + throws.js:1 + +  1: throw new Error('throws'); + 2: + + Error: throws + + test-tap/fixture/report/edgecases/throws.js:1:7 + +---tty-stream-chunk-separator + ✖ throws.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + + 2 uncaught exceptions + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.failfast.v10.log b/test-tap/reporters/verbose.failfast.v10.log new file mode 100644 index 000000000..9b4323574 --- /dev/null +++ b/test-tap/reporters/verbose.failfast.v10.log @@ -0,0 +1,25 @@ + +---tty-stream-chunk-separator + ✖ a › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail()); + 4: + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast/a.js:3:22 + internal/process/next_tick.js:68:7 + + + + `--fail-fast` is on. 1 test file was skipped. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.failfast.log b/test-tap/reporters/verbose.failfast.v12.log similarity index 100% rename from test-tap/reporters/verbose.failfast.log rename to test-tap/reporters/verbose.failfast.v12.log diff --git a/test-tap/reporters/verbose.failfast.v13.log b/test-tap/reporters/verbose.failfast.v13.log new file mode 100644 index 000000000..a8abb4d8e --- /dev/null +++ b/test-tap/reporters/verbose.failfast.v13.log @@ -0,0 +1,25 @@ + +---tty-stream-chunk-separator + ✖ a › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail()); + 4: + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast/a.js:3:22 + async Promise.all (index 1) + + + + `--fail-fast` is on. 1 test file was skipped. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.failfast2.v10.log b/test-tap/reporters/verbose.failfast2.v10.log new file mode 100644 index 000000000..840818c08 --- /dev/null +++ b/test-tap/reporters/verbose.failfast2.v10.log @@ -0,0 +1,25 @@ + +---tty-stream-chunk-separator + ✖ a › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail());  + 4: test('passes', t => t.pass()); + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast2/a.js:3:22 + internal/process/next_tick.js:68:7 + + + + `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.failfast2.log b/test-tap/reporters/verbose.failfast2.v12.log similarity index 100% rename from test-tap/reporters/verbose.failfast2.log rename to test-tap/reporters/verbose.failfast2.v12.log diff --git a/test-tap/reporters/verbose.failfast2.v13.log b/test-tap/reporters/verbose.failfast2.v13.log new file mode 100644 index 000000000..b316262da --- /dev/null +++ b/test-tap/reporters/verbose.failfast2.v13.log @@ -0,0 +1,25 @@ + +---tty-stream-chunk-separator + ✖ a › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + + 1 test failed + + a › fails + + a.js:3 + + 2: +  3: test('fails', t => t.fail());  + 4: test('passes', t => t.pass()); + + Test failed via `t.fail()` + + test-tap/fixture/report/failfast2/a.js:3:22 + async Promise.all (index 1) + + + + `--fail-fast` is on. At least 1 test was skipped, as well as 1 test file. + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.js b/test-tap/reporters/verbose.js index ff6f0f8d7..452b791d7 100644 --- a/test-tap/reporters/verbose.js +++ b/test-tap/reporters/verbose.js @@ -9,7 +9,7 @@ const VerboseReporter = require('../../lib/reporters/verbose'); const run = (type, sanitizers = []) => t => { t.plan(1); - const logFile = path.join(__dirname, `verbose.${type.toLowerCase()}.log`); + const logFile = path.join(__dirname, `verbose.${type.toLowerCase()}.${process.version.split('.')[0]}.log`); const tty = new TTYStream({ columns: 200, diff --git a/test-tap/reporters/verbose.only.log b/test-tap/reporters/verbose.only.v10.log similarity index 100% rename from test-tap/reporters/verbose.only.log rename to test-tap/reporters/verbose.only.v10.log diff --git a/test-tap/reporters/verbose.only.v12.log b/test-tap/reporters/verbose.only.v12.log new file mode 100644 index 000000000..67c5e210e --- /dev/null +++ b/test-tap/reporters/verbose.only.v12.log @@ -0,0 +1,10 @@ + +---tty-stream-chunk-separator + ✔ a › only +---tty-stream-chunk-separator + ✔ b › passes +---tty-stream-chunk-separator + + 2 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.only.v13.log b/test-tap/reporters/verbose.only.v13.log new file mode 100644 index 000000000..67c5e210e --- /dev/null +++ b/test-tap/reporters/verbose.only.v13.log @@ -0,0 +1,10 @@ + +---tty-stream-chunk-separator + ✔ a › only +---tty-stream-chunk-separator + ✔ b › passes +---tty-stream-chunk-separator + + 2 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.regular.v10.log b/test-tap/reporters/verbose.regular.v10.log new file mode 100644 index 000000000..bde79216d --- /dev/null +++ b/test-tap/reporters/verbose.regular.v10.log @@ -0,0 +1,413 @@ + +---tty-stream-chunk-separator + Uncaught exception in bad-test-chain.js + + bad-test-chain.js:3 + + 2: +  3: test.serial.test('passes', t => t.pass()); + 4: + + TypeError: test.serial.test is not a function + + test-tap/fixture/report/regular/bad-test-chain.js:3:13 + +---tty-stream-chunk-separator + ✖ bad-test-chain.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + output-in-hook › before hook + ℹ before +---tty-stream-chunk-separator + output-in-hook › beforeEach hook for passing test + ℹ beforeEach +---tty-stream-chunk-separator + output-in-hook › beforeEach hook for failing test + ℹ beforeEach +---tty-stream-chunk-separator + ✔ output-in-hook › passing test +---tty-stream-chunk-separator + ✖ output-in-hook › failing test Test failed via `t.fail()` +---tty-stream-chunk-separator + output-in-hook › afterEach hook for passing test + ℹ afterEach +---tty-stream-chunk-separator + output-in-hook › afterEach.always hook for failing test + ℹ afterEachAlways +---tty-stream-chunk-separator + output-in-hook › afterEach.always hook for passing test + ℹ afterEachAlways +---tty-stream-chunk-separator + output-in-hook › cleanup + ℹ afterAlways +---tty-stream-chunk-separator + ✔ slow › slow (000ms) +---tty-stream-chunk-separator + - test › skip +---tty-stream-chunk-separator + - test › todo +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + ✖ test › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + ✔ test › known failure +---tty-stream-chunk-separator + ✖ test › no longer failing Test was expected to fail, but succeeded, you should stop marking the test as failing +---tty-stream-chunk-separator + ✖ test › logs Test failed via `t.fail()` + ℹ hello + ℹ world +---tty-stream-chunk-separator + ✖ test › formatted +---tty-stream-chunk-separator + ✖ test › power-assert +---tty-stream-chunk-separator + ✖ test › bad throws Improper usage of `t.throws()` detected +---tty-stream-chunk-separator + ✖ test › bad notThrows Improper usage of `t.notThrows()` detected +---tty-stream-chunk-separator + ✖ test › implementation throws non-error Error thrown in test +---tty-stream-chunk-separator + ✖ traces-in-t-throws › throws +---tty-stream-chunk-separator + ✖ traces-in-t-throws › notThrows +---tty-stream-chunk-separator + ✖ traces-in-t-throws › notThrowsAsync +---tty-stream-chunk-separator + ✖ traces-in-t-throws › throwsAsync +---tty-stream-chunk-separator + ✖ traces-in-t-throws › throwsAsync different error +---tty-stream-chunk-separator + ✔ uncaught-exception › passes +---tty-stream-chunk-separator + + Uncaught exception in uncaught-exception.js + + uncaught-exception.js:5 + + 4: setTimeout(() => { +  5: throw new Error('Can’t catch me'); + 6: }); + + Error: Can’t catch me + + test-tap/fixture/report/regular/uncaught-exception.js:5:9 + timers.js:436:11 + timers.js:300:5 + timers.js:263:5 + timers.js:223:10 + +---tty-stream-chunk-separator + ✖ uncaught-exception.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✔ unhandled-rejection › passes +---tty-stream-chunk-separator + ✔ unhandled-rejection › unhandled non-error rejection +---tty-stream-chunk-separator + + Unhandled rejection in unhandled-rejection.js + + unhandled-rejection.js:4 + + 3: const passes = t => { +  4: Promise.reject(new Error('Can’t catch me')); + 5: t.pass(); + + Error: Can’t catch me + + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + internal/process/next_tick.js:68:7 + +---tty-stream-chunk-separator + Unhandled rejection in unhandled-rejection.js + + null + +---tty-stream-chunk-separator + + 14 tests failed + 1 known failure + 1 test skipped + 1 test todo + 2 unhandled rejections + 2 uncaught exceptions + + test › known failure + + output-in-hook › failing test + + output-in-hook.js:34 + + 33: test('failing test', t => { +  34: t.fail();  + 35: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/output-in-hook.js:34:4 + internal/process/next_tick.js:68:7 + + + + test › fails + + test.js:9 + + 8: +  9: test('fails', t => t.fail()); + 10: + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:9:22 + internal/process/next_tick.js:68:7 + + + + test › no longer failing + + + Error: Test was expected to fail, but succeeded, you should stop marking the test as failing + + new Promise () + internal/process/next_tick.js:68:7 + + + + test › logs + ℹ hello + ℹ world + + test.js:18 + + 17: t.log('world'); +  18: t.fail();  + 19: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:18:4 + internal/process/next_tick.js:68:7 + + + + test › formatted + + test.js:22 + + 21: test('formatted', t => { +  22: t.deepEqual('foo', 'bar'); + 23: }); + + Difference: + + - 'foo' + + 'bar' + + test-tap/fixture/report/regular/test.js:22:4 + internal/process/next_tick.js:68:7 + + + + test › power-assert + + test.js:27 + + 26: const foo = ''; +  27: t.assert(foo);  + 28: }); + + Value is not truthy: + + '' + + foo + => '' + + test-tap/fixture/report/regular/test.js:27:4 + internal/process/next_tick.js:68:7 + + + + test › bad throws + + test.js:35 + + 34: +  35: t.throws(fn()); + 36: }); + + Improper usage of `t.throws()` detected + + The following error was thrown, possibly before `t.throws()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.throws()` in a function: + + t.throws(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + internal/process/next_tick.js:68:7 + + + + test › bad notThrows + + test.js:43 + + 42: +  43: t.notThrows(fn()); + 44: }); + + Improper usage of `t.notThrows()` detected + + The following error was thrown, possibly before `t.notThrows()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.notThrows()` in a function: + + t.notThrows(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + internal/process/next_tick.js:68:7 + + + + test › implementation throws non-error + + + Error thrown in test: + + null + + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › throws + + traces-in-t-throws.js:12 + + 11: test('throws', t => { +  12: t.throws(() => throwError(), {instanceOf: TypeError}); + 13: }); + + Function threw unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › notThrows + + traces-in-t-throws.js:16 + + 15: test('notThrows', t => { +  16: t.notThrows(() => throwError()); + 17: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › notThrowsAsync + + traces-in-t-throws.js:20 + + 19: test('notThrowsAsync', t => { +  20: t.notThrowsAsync(() => throwError()); + 21: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › throwsAsync + + traces-in-t-throws.js:24 + + 23: test('throwsAsync', t => { +  24: t.throwsAsync(() => throwError(), {instanceOf: TypeError}); + 25: }); + + Function threw synchronously. Use `t.throws()` instead: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + internal/process/next_tick.js:68:7 + + + + traces-in-t-throws › throwsAsync different error + + traces-in-t-throws.js:28 + + 27: test('throwsAsync different error', t => { +  28: return t.throwsAsync(returnRejectedPromise, {instanceOf: TypeError}); + 29: }); + + Returned promise rejected with unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + internal/process/next_tick.js:68:7 + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.regular.log b/test-tap/reporters/verbose.regular.v12.log similarity index 100% rename from test-tap/reporters/verbose.regular.log rename to test-tap/reporters/verbose.regular.v12.log diff --git a/test-tap/reporters/verbose.regular.v13.log b/test-tap/reporters/verbose.regular.v13.log new file mode 100644 index 000000000..509d62e5b --- /dev/null +++ b/test-tap/reporters/verbose.regular.v13.log @@ -0,0 +1,411 @@ + +---tty-stream-chunk-separator + Uncaught exception in bad-test-chain.js + + bad-test-chain.js:3 + + 2: +  3: test.serial.test('passes', t => t.pass()); + 4: + + TypeError: test.serial.test is not a function + + test-tap/fixture/report/regular/bad-test-chain.js:3:13 + +---tty-stream-chunk-separator + ✖ bad-test-chain.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + output-in-hook › before hook + ℹ before +---tty-stream-chunk-separator + output-in-hook › beforeEach hook for passing test + ℹ beforeEach +---tty-stream-chunk-separator + output-in-hook › beforeEach hook for failing test + ℹ beforeEach +---tty-stream-chunk-separator + ✔ output-in-hook › passing test +---tty-stream-chunk-separator + ✖ output-in-hook › failing test Test failed via `t.fail()` +---tty-stream-chunk-separator + output-in-hook › afterEach hook for passing test + ℹ afterEach +---tty-stream-chunk-separator + output-in-hook › afterEach.always hook for failing test + ℹ afterEachAlways +---tty-stream-chunk-separator + output-in-hook › afterEach.always hook for passing test + ℹ afterEachAlways +---tty-stream-chunk-separator + output-in-hook › cleanup + ℹ afterAlways +---tty-stream-chunk-separator + ✔ slow › slow (000ms) +---tty-stream-chunk-separator + - test › skip +---tty-stream-chunk-separator + - test › todo +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + ✖ test › fails Test failed via `t.fail()` +---tty-stream-chunk-separator + ✔ test › known failure +---tty-stream-chunk-separator + ✖ test › no longer failing Test was expected to fail, but succeeded, you should stop marking the test as failing +---tty-stream-chunk-separator + ✖ test › logs Test failed via `t.fail()` + ℹ hello + ℹ world +---tty-stream-chunk-separator + ✖ test › formatted +---tty-stream-chunk-separator + ✖ test › power-assert +---tty-stream-chunk-separator + ✖ test › bad throws Improper usage of `t.throws()` detected +---tty-stream-chunk-separator + ✖ test › bad notThrows Improper usage of `t.notThrows()` detected +---tty-stream-chunk-separator + ✖ test › implementation throws non-error Error thrown in test +---tty-stream-chunk-separator + ✖ traces-in-t-throws › throws +---tty-stream-chunk-separator + ✖ traces-in-t-throws › notThrows +---tty-stream-chunk-separator + ✖ traces-in-t-throws › notThrowsAsync +---tty-stream-chunk-separator + ✖ traces-in-t-throws › throwsAsync +---tty-stream-chunk-separator + ✖ traces-in-t-throws › throwsAsync different error +---tty-stream-chunk-separator + ✔ uncaught-exception › passes +---tty-stream-chunk-separator + + Uncaught exception in uncaught-exception.js + + uncaught-exception.js:5 + + 4: setTimeout(() => { +  5: throw new Error('Can’t catch me'); + 6: }); + + Error: Can’t catch me + + test-tap/fixture/report/regular/uncaught-exception.js:5:9 + internal/timers.js:537:17 + internal/timers.js:481:7 + +---tty-stream-chunk-separator + ✖ uncaught-exception.js exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + ✔ unhandled-rejection › passes +---tty-stream-chunk-separator + ✔ unhandled-rejection › unhandled non-error rejection +---tty-stream-chunk-separator + + Unhandled rejection in unhandled-rejection.js + + unhandled-rejection.js:4 + + 3: const passes = t => { +  4: Promise.reject(new Error('Can’t catch me')); + 5: t.pass(); + + Error: Can’t catch me + + test-tap/fixture/report/regular/unhandled-rejection.js:4:17 + async Promise.all (index 0) + +---tty-stream-chunk-separator + Unhandled rejection in unhandled-rejection.js + + null + +---tty-stream-chunk-separator + + 14 tests failed + 1 known failure + 1 test skipped + 1 test todo + 2 unhandled rejections + 2 uncaught exceptions + + test › known failure + + output-in-hook › failing test + + output-in-hook.js:34 + + 33: test('failing test', t => { +  34: t.fail();  + 35: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/output-in-hook.js:34:4 + async Promise.all (index 1) + + + + test › fails + + test.js:9 + + 8: +  9: test('fails', t => t.fail()); + 10: + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:9:22 + async Promise.all (index 1) + + + + test › no longer failing + + + Error: Test was expected to fail, but succeeded, you should stop marking the test as failing + + new Promise () + async Promise.all (index 3) + + + + test › logs + ℹ hello + ℹ world + + test.js:18 + + 17: t.log('world'); +  18: t.fail();  + 19: }); + + Test failed via `t.fail()` + + test-tap/fixture/report/regular/test.js:18:4 + async Promise.all (index 4) + + + + test › formatted + + test.js:22 + + 21: test('formatted', t => { +  22: t.deepEqual('foo', 'bar'); + 23: }); + + Difference: + + - 'foo' + + 'bar' + + test-tap/fixture/report/regular/test.js:22:4 + async Promise.all (index 5) + + + + test › power-assert + + test.js:27 + + 26: const foo = ''; +  27: t.assert(foo);  + 28: }); + + Value is not truthy: + + '' + + foo + => '' + + test-tap/fixture/report/regular/test.js:27:4 + async Promise.all (index 6) + + + + test › bad throws + + test.js:35 + + 34: +  35: t.throws(fn()); + 36: }); + + Improper usage of `t.throws()` detected + + The following error was thrown, possibly before `t.throws()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.throws()` in a function: + + t.throws(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:32:9 + test-tap/fixture/report/regular/test.js:35:11 + async Promise.all (index 7) + + + + test › bad notThrows + + test.js:43 + + 42: +  43: t.notThrows(fn()); + 44: }); + + Improper usage of `t.notThrows()` detected + + The following error was thrown, possibly before `t.notThrows()` could be called: + + Error { + message: 'err', + } + + Try wrapping the first argument to `t.notThrows()` in a function: + + t.notThrows(() => { /* your code here */ }) + + Visit the following URL for more details: + + https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message + + test-tap/fixture/report/regular/test.js:40:9 + test-tap/fixture/report/regular/test.js:43:14 + async Promise.all (index 8) + + + + test › implementation throws non-error + + + Error thrown in test: + + null + + async Promise.all (index 9) + + + + traces-in-t-throws › throws + + traces-in-t-throws.js:12 + + 11: test('throws', t => { +  12: t.throws(() => throwError(), {instanceOf: TypeError}); + 13: }); + + Function threw unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 + test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 + async Promise.all (index 0) + + + + traces-in-t-throws › notThrows + + traces-in-t-throws.js:16 + + 15: test('notThrows', t => { +  16: t.notThrows(() => throwError()); + 17: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 + async Promise.all (index 1) + + + + traces-in-t-throws › notThrowsAsync + + traces-in-t-throws.js:20 + + 19: test('notThrowsAsync', t => { +  20: t.notThrowsAsync(() => throwError()); + 21: }); + + Function threw: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 + async Promise.all (index 2) + + + + traces-in-t-throws › throwsAsync + + traces-in-t-throws.js:24 + + 23: test('throwsAsync', t => { +  24: t.throwsAsync(() => throwError(), {instanceOf: TypeError}); + 25: }); + + Function threw synchronously. Use `t.throws()` instead: + + Error { + message: 'uh-oh', + } + + test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 + test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 + async Promise.all (index 3) + + + + traces-in-t-throws › throwsAsync different error + + traces-in-t-throws.js:28 + + 27: test('throwsAsync different error', t => { +  28: return t.throwsAsync(returnRejectedPromise, {instanceOf: TypeError}); + 29: }); + + Returned promise rejected with unexpected exception: + + Error { + message: 'uh-oh', + } + + Expected instance of: + + Function TypeError {} + + test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 + test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + async Promise.all (index 4) + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.timeoutinmultiplefiles.log b/test-tap/reporters/verbose.timeoutinmultiplefiles.v10.log similarity index 100% rename from test-tap/reporters/verbose.timeoutinmultiplefiles.log rename to test-tap/reporters/verbose.timeoutinmultiplefiles.v10.log diff --git a/test-tap/reporters/verbose.timeoutinmultiplefiles.v12.log b/test-tap/reporters/verbose.timeoutinmultiplefiles.v12.log new file mode 100644 index 000000000..f23ce9614 --- /dev/null +++ b/test-tap/reporters/verbose.timeoutinmultiplefiles.v12.log @@ -0,0 +1,33 @@ + +---tty-stream-chunk-separator + ✔ a › a passes +---tty-stream-chunk-separator + ✔ a › a passes two +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 2 tests were pending in a.js + + ◌ a › a slow + ◌ a › a slow two + +---tty-stream-chunk-separator + ✔ b › b passes +---tty-stream-chunk-separator + ✔ b › b passes two +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 3 tests were pending in b.js + + ◌ b › b slow + ◌ b › b slow two + ◌ b › b slow three + +---tty-stream-chunk-separator + + 4 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.timeoutinmultiplefiles.v13.log b/test-tap/reporters/verbose.timeoutinmultiplefiles.v13.log new file mode 100644 index 000000000..f23ce9614 --- /dev/null +++ b/test-tap/reporters/verbose.timeoutinmultiplefiles.v13.log @@ -0,0 +1,33 @@ + +---tty-stream-chunk-separator + ✔ a › a passes +---tty-stream-chunk-separator + ✔ a › a passes two +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 2 tests were pending in a.js + + ◌ a › a slow + ◌ a › a slow two + +---tty-stream-chunk-separator + ✔ b › b passes +---tty-stream-chunk-separator + ✔ b › b passes two +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 3 tests were pending in b.js + + ◌ b › b slow + ◌ b › b slow two + ◌ b › b slow three + +---tty-stream-chunk-separator + + 4 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.timeoutinsinglefile.log b/test-tap/reporters/verbose.timeoutinsinglefile.v10.log similarity index 100% rename from test-tap/reporters/verbose.timeoutinsinglefile.log rename to test-tap/reporters/verbose.timeoutinsinglefile.v10.log diff --git a/test-tap/reporters/verbose.timeoutinsinglefile.v12.log b/test-tap/reporters/verbose.timeoutinsinglefile.v12.log new file mode 100644 index 000000000..e7edb7d8d --- /dev/null +++ b/test-tap/reporters/verbose.timeoutinsinglefile.v12.log @@ -0,0 +1,19 @@ + +---tty-stream-chunk-separator + ✔ passes +---tty-stream-chunk-separator + ✔ passes two +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 2 tests were pending in a.js + + ◌ slow + ◌ slow two + +---tty-stream-chunk-separator + + 2 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.timeoutinsinglefile.v13.log b/test-tap/reporters/verbose.timeoutinsinglefile.v13.log new file mode 100644 index 000000000..e7edb7d8d --- /dev/null +++ b/test-tap/reporters/verbose.timeoutinsinglefile.v13.log @@ -0,0 +1,19 @@ + +---tty-stream-chunk-separator + ✔ passes +---tty-stream-chunk-separator + ✔ passes two +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 2 tests were pending in a.js + + ◌ slow + ◌ slow two + +---tty-stream-chunk-separator + + 2 tests passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.timeoutwithmatch.log b/test-tap/reporters/verbose.timeoutwithmatch.v10.log similarity index 100% rename from test-tap/reporters/verbose.timeoutwithmatch.log rename to test-tap/reporters/verbose.timeoutwithmatch.v10.log diff --git a/test-tap/reporters/verbose.timeoutwithmatch.v12.log b/test-tap/reporters/verbose.timeoutwithmatch.v12.log new file mode 100644 index 000000000..2de6713d7 --- /dev/null +++ b/test-tap/reporters/verbose.timeoutwithmatch.v12.log @@ -0,0 +1,17 @@ + +---tty-stream-chunk-separator + ✔ passes needle +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 2 tests were pending in a.js + + ◌ slow needle + ◌ slow three needle + +---tty-stream-chunk-separator + + 1 test passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.timeoutwithmatch.v13.log b/test-tap/reporters/verbose.timeoutwithmatch.v13.log new file mode 100644 index 000000000..2de6713d7 --- /dev/null +++ b/test-tap/reporters/verbose.timeoutwithmatch.v13.log @@ -0,0 +1,17 @@ + +---tty-stream-chunk-separator + ✔ passes needle +---tty-stream-chunk-separator +  + ✖ Timed out while running tests + + 2 tests were pending in a.js + + ◌ slow needle + ◌ slow three needle + +---tty-stream-chunk-separator + + 1 test passed + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.typescript.log b/test-tap/reporters/verbose.typescript.v10.log similarity index 100% rename from test-tap/reporters/verbose.typescript.log rename to test-tap/reporters/verbose.typescript.v10.log diff --git a/test-tap/reporters/verbose.typescript.v12.log b/test-tap/reporters/verbose.typescript.v12.log new file mode 100644 index 000000000..6c9bdf684 --- /dev/null +++ b/test-tap/reporters/verbose.typescript.v12.log @@ -0,0 +1,14 @@ + +---tty-stream-chunk-separator + Uncaught exception in build-error.ts + + build-error.ts(1,1): error TS2304: Cannot find name 'trigger'. + build-error.ts(2,1): error TS2304: Cannot find name 'lets'. + +---tty-stream-chunk-separator + ✖ build-error.ts exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + + 1 uncaught exception + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.typescript.v13.log b/test-tap/reporters/verbose.typescript.v13.log new file mode 100644 index 000000000..6c9bdf684 --- /dev/null +++ b/test-tap/reporters/verbose.typescript.v13.log @@ -0,0 +1,14 @@ + +---tty-stream-chunk-separator + Uncaught exception in build-error.ts + + build-error.ts(1,1): error TS2304: Cannot find name 'trigger'. + build-error.ts(2,1): error TS2304: Cannot find name 'lets'. + +---tty-stream-chunk-separator + ✖ build-error.ts exited with a non-zero exit code: 1 +---tty-stream-chunk-separator + + 1 uncaught exception + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.watch.log b/test-tap/reporters/verbose.watch.v10.log similarity index 100% rename from test-tap/reporters/verbose.watch.log rename to test-tap/reporters/verbose.watch.v10.log diff --git a/test-tap/reporters/verbose.watch.v12.log b/test-tap/reporters/verbose.watch.v12.log new file mode 100644 index 000000000..31689cbd4 --- /dev/null +++ b/test-tap/reporters/verbose.watch.v12.log @@ -0,0 +1,29 @@ + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + + 1 test passed [17:19:12] + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + + 1 test passed [17:19:12] + 2 previous failures in test files that were not rerun + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + + 1 test passed [17:19:12] + +---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.watch.v13.log b/test-tap/reporters/verbose.watch.v13.log new file mode 100644 index 000000000..31689cbd4 --- /dev/null +++ b/test-tap/reporters/verbose.watch.v13.log @@ -0,0 +1,29 @@ + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + + 1 test passed [17:19:12] + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + + 1 test passed [17:19:12] + 2 previous failures in test files that were not rerun + +---tty-stream-chunk-separator +──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── +---tty-stream-chunk-separator + +---tty-stream-chunk-separator + ✔ test › passes +---tty-stream-chunk-separator + + 1 test passed [17:19:12] + +---tty-stream-chunk-separator From 4bf273fb71a0a81e215297c4aefec0a424d98263 Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Tue, 14 Apr 2020 09:36:21 +0000 Subject: [PATCH 05/14] Bugfix: support windows --- lib/serialize-error.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/serialize-error.js b/lib/serialize-error.js index c30dbd9b7..99c3e9975 100644 --- a/lib/serialize-error.js +++ b/lib/serialize-error.js @@ -27,7 +27,9 @@ function extractSource(stack, testFile) { const callSite = stackUtils.parseLine(line.replace('file:///', '/')); // Assume the CWD is the project directory (see function `buildSource()` // and assume `testFile` is a absolute path. - if (callSite.file === path.relative(process.cwd(), testFile)) { + // The `callSite.file` property is platform independent (with '/' as directory separator) + // and `testFile` is platform dependent (on win32 with '\' as directory separator). + if (callSite.file === path.relative(process.cwd(), testFile).split(path.sep).join('/')) { result = callSite; } } catch (_) { From 7c5ebac7adb4183393d02ee6e6f5b237e5f6aa1e Mon Sep 17 00:00:00 2001 From: Bunyanuch Saengnet Date: Tue, 14 Apr 2020 17:49:32 +0000 Subject: [PATCH 06/14] unit-test: create separate log-files for node v13.5.0 --- test-tap/reporters/mini.regular.v13.log | 4 ++-- test-tap/reporters/tap.regular.v13.log | 4 ++-- test-tap/reporters/verbose.regular.v13.log | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test-tap/reporters/mini.regular.v13.log b/test-tap/reporters/mini.regular.v13.log index f1a5120f8..dc1d23897 100644 --- a/test-tap/reporters/mini.regular.v13.log +++ b/test-tap/reporters/mini.regular.v13.log @@ -474,8 +474,8 @@ Error: Can’t catch me test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:537:17 - internal/timers.js:481:7 + internal/timers.js:549:17 + internal/timers.js:492:7 diff --git a/test-tap/reporters/tap.regular.v13.log b/test-tap/reporters/tap.regular.v13.log index 05a5ab6d5..0abb3fce0 100644 --- a/test-tap/reporters/tap.regular.v13.log +++ b/test-tap/reporters/tap.regular.v13.log @@ -284,8 +284,8 @@ not ok 24 - Error: Can’t catch me message: Can’t catch me at: |- test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:537:17 - internal/timers.js:481:7 + internal/timers.js:549:17 + internal/timers.js:492:7 ... ---tty-stream-chunk-separator # uncaught-exception.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/verbose.regular.v13.log b/test-tap/reporters/verbose.regular.v13.log index 509d62e5b..1ac6f9a39 100644 --- a/test-tap/reporters/verbose.regular.v13.log +++ b/test-tap/reporters/verbose.regular.v13.log @@ -92,8 +92,8 @@ Error: Can’t catch me test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:537:17 - internal/timers.js:481:7 + internal/timers.js:549:17 + internal/timers.js:492:7 ---tty-stream-chunk-separator ✖ uncaught-exception.js exited with a non-zero exit code: 1 From 84af368d1b3d74de5ac02058cb918cce389e4b3c Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sat, 18 Apr 2020 16:57:04 +0200 Subject: [PATCH 07/14] Update readme for reporter tests --- test-tap/reporters/readme.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/test-tap/reporters/readme.md b/test-tap/reporters/readme.md index 9f2dbd9ac..485a32395 100644 --- a/test-tap/reporters/readme.md +++ b/test-tap/reporters/readme.md @@ -1,8 +1,13 @@ -# Upgrade reporter test -There are separate log-files for every supported -major node version. -To upgrade to a new major node version, install -the new node version with [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md), -and run `npm run test`. -This command creates a new set of log-files, that -you should add to the git repository. +# Rebuilding reporter log files + +`*.log` files contain reporter output. There are separate files for every supported Node.js version. + +To update a specific set of files you can run: + +```console +UPDATE_REPORTER_LOG=1 npx tap -j3 test-tap/reporters/{mini,verbose,tap}.js +``` + +You'll need to run this for each supported (major) Node.js version. Use your favorite Node.js version manager, such as [nvm](https://github.com/nvm-sh/nvm/) or [nodenv](https://github.com/nodenv/nodenv). + +Make sure to commit any new files, and of course changed ones. From c4b7af5a49016b15f5901a9b19f82cf31acdd401 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 19 Apr 2020 13:32:54 +0200 Subject: [PATCH 08/14] Simplify source extraction --- lib/serialize-error.js | 33 +++++++++++++------------------- test-tap/serialize-error.js | 38 ++----------------------------------- 2 files changed, 15 insertions(+), 56 deletions(-) diff --git a/lib/serialize-error.js b/lib/serialize-error.js index 99c3e9975..a88e146a4 100644 --- a/lib/serialize-error.js +++ b/lib/serialize-error.js @@ -21,27 +21,20 @@ function extractSource(stack, testFile) { return null; } - let result = null; - stack.split('\n').forEach(line => { + // Normalize the test file so it matches `callSite.file`. + const posixTestFile = path.posix.relative(process.cwd(), testFile); + for (const line of stack.split('\n')) { try { - const callSite = stackUtils.parseLine(line.replace('file:///', '/')); - // Assume the CWD is the project directory (see function `buildSource()` - // and assume `testFile` is a absolute path. - // The `callSite.file` property is platform independent (with '/' as directory separator) - // and `testFile` is platform dependent (on win32 with '\' as directory separator). - if (callSite.file === path.relative(process.cwd(), testFile).split(path.sep).join('/')) { - result = callSite; + const callSite = stackUtils.parseLine(line); + if (callSite.file === posixTestFile) { + return { + isDependency: false, + isWithinProject: true, + file: path.resolve(process.cwd(), callSite.file), + line: callSite.line + }; } - } catch (_) { - } - }); - if (result) { - return { - isDependency: false, - isWithinProject: true, - file: path.resolve(process.cwd(), result.file), - line: result.line - }; + } catch {} } return null; @@ -162,7 +155,7 @@ function serializeError(origin, shouldBeautifyStack, err, testFile) { try { return trySerializeError(err, shouldBeautifyStack, testFile); - } catch (_) { + } catch { const replacement = new Error(`${origin}: Could not serialize error`); return { avaAssertionError: false, diff --git a/test-tap/serialize-error.js b/test-tap/serialize-error.js index cd27f2718..69f372470 100644 --- a/test-tap/serialize-error.js +++ b/test-tap/serialize-error.js @@ -2,21 +2,15 @@ require('../lib/chalk').set(); require('../lib/worker/options').set({}); -const path = require('path'); -const sourceMapFixtures = require('source-map-fixtures'); -const sourceMapSupport = require('source-map-support'); const {test} = require('tap'); const avaAssert = require('../lib/assert'); const serializeError = require('../lib/serialize-error'); -const serialize = error => serializeError('Test', true, error, path.resolve('test-tap', 'serialize-error.js')); - -// Needed to test stack traces from source map fixtures. -sourceMapSupport.install({environment: 'node'}); +const serialize = error => serializeError('Test', true, error, __filename); test('serialize standard props', t => { const error = new Error('Hello'); - const serializedError = serialize(error, true); + const serializedError = serialize(error); t.is(Object.keys(serializedError).length, 9); t.is(serializedError.avaAssertionError, false); @@ -48,18 +42,6 @@ test('source file is an absolute path', t => { t.end(); }); -test('source file is an absolute path, after source map correction', t => { - const fixture = sourceMapFixtures.mapFile('throws'); - try { - fixture.require().run(); - t.fail('Fixture should have thrown'); - } catch (error) { - const serializedError = serialize(error); - t.is(serializedError.source.file, __filename); - t.end(); - } -}); - test('sets avaAssertionError to true if indeed an assertion error', t => { const error = new avaAssert.AssertionError({}); const serializedError = serialize(error); @@ -124,19 +106,3 @@ test('skips esm enhancement lines when finding the summary', t => { t.is(serializedError.summary, 'First line\nSecond line'); t.end(); }); - -test('works around esm’s insertion of file:// urls', t => { - const fixture = sourceMapFixtures.mapFile('throws'); - try { - fixture.require().run(); - t.fail('Fixture should have thrown'); - } catch (error) { - const expected = serialize(error); - Object.defineProperty(error, 'stack', { - value: error.stack.split('\n').map(line => line.replace('(/', '(file:///')).join('\n') - }); - const serializedError = serialize(error); - t.is(serializedError.source.file, expected.source.file); - t.end(); - } -}); From 204305712196866cb61ba7b99985030575a880ba Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 19 Apr 2020 14:41:03 +0200 Subject: [PATCH 09/14] Simplify stack beautification * Use the ignoredPackages option from stack-utils * Ignore all cjs internals * Keep ignoring some Node.js internals (there's useful stuff here: https://github.com/tapjs/stack-utils/blob/d3c7ee2a7d46744c271a36ce3acfd69465f36df5/index.js#L12-L18) * Return an array of lines * Remove dedicated tests, rely on reporter integration tests instead --- lib/reporters/beautify-stack.js | 44 ++++++------- lib/reporters/mini.js | 15 ++--- lib/reporters/tap.js | 2 +- lib/reporters/verbose.js | 13 ++-- test-tap/reporters/beautify-stack.js | 97 ---------------------------- 5 files changed, 36 insertions(+), 135 deletions(-) delete mode 100644 test-tap/reporters/beautify-stack.js diff --git a/lib/reporters/beautify-stack.js b/lib/reporters/beautify-stack.js index 5c7d9b0ad..6a8cbaba6 100644 --- a/lib/reporters/beautify-stack.js +++ b/lib/reporters/beautify-stack.js @@ -1,21 +1,26 @@ 'use strict'; const StackUtils = require('stack-utils'); -const debug = require('debug')('ava'); -// Ignore unimportant stack trace lines -const ignoreStackLines = []; - -const avaInternals = /\/ava\/(?:lib\/|lib\/worker\/)?[\w-]+\.js:\d+:\d+\)?$/; -const avaDependencies = /\/node_modules\/(?:@ava\/babel|@ava\/require-precompiled|append-transform|empower-core|nyc|require-precompiled|(?:ava\/node_modules\/)?(?:babel-runtime|core-js))\//; - -if (!debug.enabled) { - ignoreStackLines.push(avaInternals); - ignoreStackLines.push(avaDependencies); - ignoreStackLines.push(/\(internal\/process\/task_queues\.js:\d+:\d+\)$/); - ignoreStackLines.push(/\(internal\/modules\/cjs\/loader\.js:\d+:\d+\)$/); -} - -const stackUtils = new StackUtils({internals: ignoreStackLines}); +const stackUtils = new StackUtils({ + ignoredPackages: [ + '@ava/babel', + '@ava/require-precompiled', + '@ava/typescript', + 'append-transform', + 'ava', + 'empower-core', + 'esm', + 'nyc' + ], + internals: [ + // AVA internals, which ignoredPackages don't ignore when we run our own unit tests. + /\/ava\/(?:lib\/|lib\/worker\/)?[\w-]+\.js:\d+:\d+\)?$/, + // Only ignore Node.js internals that really are not useful for debugging. + ...StackUtils.nodeInternals().filter(regexp => !/\(internal/.test(regexp.source)), + /\(internal\/process\/task_queues\.js:\d+:\d+\)$/, + /\(internal\/modules\/cjs\/.+?\.js:\d+:\d+\)$/ + ] +}); /* * Given a string value of the format generated for the `stack` property of a @@ -55,13 +60,8 @@ const stackUtils = new StackUtils({internals: ignoreStackLines}); */ module.exports = stack => { if (!stack) { - return ''; + return []; } - return stackUtils.clean(stack) - // Remove the trailing newline inserted by the `stack-utils` module - .trim() - // Remove remaining file:// prefixes, inserted by `esm`, that are not - // cleaned up by `stack-utils` - .split('\n').map(line => line.replace(/\(file:\/\/(?[^/].+:\d+:\d+)\)$/, '($)')).join('\n'); + return stackUtils.clean(stack).trim().split('\n'); }; diff --git a/lib/reporters/mini.js b/lib/reporters/mini.js index a270839c6..385e315d2 100644 --- a/lib/reporters/mini.js +++ b/lib/reporters/mini.js @@ -334,14 +334,13 @@ class MiniReporter { formatErrorStack(error) { if (error.shouldBeautifyStack) { - return beautifyStack(error.stack).split('\n') - .map(line => { - if (nodeInternals.some(internal => internal.test(line))) { - return colors.errorStack(line); - } - - return line; - }).join('\n'); + return beautifyStack(error.stack).map(line => { + if (nodeInternals.some(internal => internal.test(line))) { + return colors.errorStack(line); + } + + return line; + }).join('\n'); } return error.stack; diff --git a/lib/reporters/tap.js b/lib/reporters/tap.js index f3dd2dfad..ac2929e5c 100644 --- a/lib/reporters/tap.js +++ b/lib/reporters/tap.js @@ -43,7 +43,7 @@ function dumpError(error) { } if (error.stack) { - object.at = error.shouldBeautifyStack ? beautifyStack(error.stack) : error.stack; + object.at = error.shouldBeautifyStack ? beautifyStack(error.stack).join('\n') : error.stack; } return object; diff --git a/lib/reporters/verbose.js b/lib/reporters/verbose.js index af8255664..e312fd4ca 100644 --- a/lib/reporters/verbose.js +++ b/lib/reporters/verbose.js @@ -273,14 +273,13 @@ class VerboseReporter { formatErrorStack(error) { if (error.shouldBeautifyStack) { - return beautifyStack(error.stack).split('\n') - .map(line => { - if (nodeInternals.some(internal => internal.test(line))) { - return colors.errorStack(line); - } + return beautifyStack(error.stack).map(line => { + if (nodeInternals.some(internal => internal.test(line))) { + return colors.errorStack(line); + } - return line; - }).join('\n'); + return line; + }).join('\n'); } return error.stack; diff --git a/test-tap/reporters/beautify-stack.js b/test-tap/reporters/beautify-stack.js deleted file mode 100644 index 381b7a99e..000000000 --- a/test-tap/reporters/beautify-stack.js +++ /dev/null @@ -1,97 +0,0 @@ -'use strict'; -require('../../lib/chalk').set(); -require('../../lib/worker/options').set({}); - -const path = require('path'); -const proxyquire = require('proxyquire').noPreserveCache(); -const {test} = require('tap'); -const Runner = require('../../lib/runner'); - -const beautifyStack = proxyquire('../../lib/reporters/beautify-stack', { - debug() { - return { - enabled: false - }; - } -}); - -function fooFunc() { - barFunc(); -} - -function barFunc() { - throw new Error(); // eslint-disable-line unicorn/error-message -} - -test('does not strip ava internals and dependencies from stack trace with debug enabled', t => { - const beautify = proxyquire('../../lib/reporters/beautify-stack', { - debug() { - return { - enabled: true - }; - } - }); - - const result = beautify( - 'Error: TypeError\n' + - 'at null._onTimeout (node_modules/ava/cli.js:27:11)\n' + - 'at Stub.listOnTimeout (timers.js:119:15)\n' - ); - - t.true(result.includes('ava/cli.js')); - t.end(); -}); - -test('strips ava internals and dependencies from stack trace with debug disabled', t => { - const result = beautifyStack( - 'Error: TypeError\n' + - 'at null._onTimeout (node_modules/ava/cli.js:27:11)\n' + - 'at Stub.listOnTimeout (timers.js:119:15)\n' - ); - - t.false(result.includes('ava/cli.js')); - t.end(); -}); - -test('returns empty string without any arguments', t => { - t.is(beautifyStack(), ''); - t.end(); -}); - -test('beautify stack - removes uninteresting lines', async t => { - try { - const runner = new Runner(); - await runner.runSingle({ - run() { - fooFunc(); - } - }); - } catch (error) { - const stack = beautifyStack(error.stack); - t.notMatch(stack, /Error\n/); - t.match(stack, /fooFunc/); - t.match(stack, /barFunc/); - // The runSingle line is introduced by Runner. It's internal so it should - // be stripped. - t.match(error.stack, /runSingle/); - t.notMatch(stack, /runSingle/); - t.end(); - } -}); - -test('beautify stack - don’t remove node internals', async t => { - try { - const runner = new Runner(); - await runner.runSingle({ - run() { - path.resolve({root: '..'}); - } - }); - } catch (error) { - const stack = beautifyStack(error.stack); - t.match(stack, /path.js/); - t.match(error.stack, /runSingle/); - t.notMatch(stack, /runSingle/); - t.end(); - } -}); From 3a56b4aab80d83e5c9fe699804552590b19d1e0d Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 19 Apr 2020 14:44:18 +0200 Subject: [PATCH 10/14] Tweak stack formatting Dim internal lines, leave normal lines as grey. Add a pointer so it looks a bit more like a list of lines --- lib/reporters/colors.js | 1 + lib/reporters/mini.js | 4 ++-- lib/reporters/verbose.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/reporters/colors.js b/lib/reporters/colors.js index a03dbaead..31d0ec912 100644 --- a/lib/reporters/colors.js +++ b/lib/reporters/colors.js @@ -11,6 +11,7 @@ module.exports = { duration: chalk.gray.dim, errorSource: chalk.gray, errorStack: chalk.gray, + errorStackInternal: chalk.gray.dim, stack: chalk.red, information: chalk.magenta }; diff --git a/lib/reporters/mini.js b/lib/reporters/mini.js index 385e315d2..dd39f9dcf 100644 --- a/lib/reporters/mini.js +++ b/lib/reporters/mini.js @@ -336,10 +336,10 @@ class MiniReporter { if (error.shouldBeautifyStack) { return beautifyStack(error.stack).map(line => { if (nodeInternals.some(internal => internal.test(line))) { - return colors.errorStack(line); + return colors.errorStackInternal(`${figures.pointerSmall} ${line}`); } - return line; + return colors.errorStack(`${figures.pointerSmall} ${line}`); }).join('\n'); } diff --git a/lib/reporters/verbose.js b/lib/reporters/verbose.js index e312fd4ca..35a511bdd 100644 --- a/lib/reporters/verbose.js +++ b/lib/reporters/verbose.js @@ -275,10 +275,10 @@ class VerboseReporter { if (error.shouldBeautifyStack) { return beautifyStack(error.stack).map(line => { if (nodeInternals.some(internal => internal.test(line))) { - return colors.errorStack(line); + return colors.errorStackInternal(`${figures.pointerSmall} ${line}`); } - return line; + return colors.errorStack(`${figures.pointerSmall} ${line}`); }).join('\n'); } From 88a22e9e1a0e936f68b916c70e964128f9b966c7 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 19 Apr 2020 14:45:24 +0200 Subject: [PATCH 11/14] Remove some reporter sanitizers now we report by Node.js version --- test-tap/helper/report.js | 2 -- test-tap/reporters/mini.js | 2 +- test-tap/reporters/tap.js | 2 +- test-tap/reporters/verbose.js | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test-tap/helper/report.js b/test-tap/helper/report.js index 109adcbe6..7b79c733a 100644 --- a/test-tap/helper/report.js +++ b/test-tap/helper/report.js @@ -62,8 +62,6 @@ exports.sanitizers = { lineEndings: string => replaceString(string, '\r\n', '\n'), posix: string => replaceString(string, '\\', '/'), slow: string => string.replace(/(?slow.+?)\(\d+m?s\)/g, '$ (000ms)'), - timeout: string => replaceString(string, 'Timeout._onTimeout', 'Timeout.setTimeout'), - traces: string => string.replace(/(\[...)?[^\s'[]+\s\((.+\.js:\d+:\d+)\)/g, '$1$2'), version: string => replaceString(string, `v${pkg.version}`, 'v1.0.0-beta.5.1') }; diff --git a/test-tap/reporters/mini.js b/test-tap/reporters/mini.js index 780637b1c..68ea0e1da 100644 --- a/test-tap/reporters/mini.js +++ b/test-tap/reporters/mini.js @@ -19,7 +19,7 @@ const run = (type, sanitizers = []) => t => { const tty = new TTYStream({ columns: 200, - sanitizers: [...sanitizers, report.sanitizers.cwd, report.sanitizers.experimentalWarning, report.sanitizers.posix, report.sanitizers.traces, report.sanitizers.version] + sanitizers: [...sanitizers, report.sanitizers.cwd, report.sanitizers.experimentalWarning, report.sanitizers.posix, report.sanitizers.version] }); const reporter = new MiniReporter({ projectDir: report.projectDir(type), diff --git a/test-tap/reporters/tap.js b/test-tap/reporters/tap.js index 30363d740..4290bc361 100644 --- a/test-tap/reporters/tap.js +++ b/test-tap/reporters/tap.js @@ -14,7 +14,7 @@ const run = (type, sanitizers = []) => t => { const tty = new TTYStream({ columns: 200, - sanitizers: [...sanitizers, report.sanitizers.cwd, report.sanitizers.experimentalWarning, report.sanitizers.posix, report.sanitizers.timeout, report.sanitizers.traces] + sanitizers: [...sanitizers, report.sanitizers.cwd, report.sanitizers.experimentalWarning, report.sanitizers.posix] }); const reporter = new TapReporter({ projectDir: report.projectDir(type), diff --git a/test-tap/reporters/verbose.js b/test-tap/reporters/verbose.js index 472d3ee36..167f68410 100644 --- a/test-tap/reporters/verbose.js +++ b/test-tap/reporters/verbose.js @@ -13,7 +13,7 @@ const run = (type, sanitizers = []) => t => { const tty = new TTYStream({ columns: 200, - sanitizers: [...sanitizers, report.sanitizers.cwd, report.sanitizers.experimentalWarning, report.sanitizers.posix, report.sanitizers.slow, report.sanitizers.traces, report.sanitizers.version] + sanitizers: [...sanitizers, report.sanitizers.cwd, report.sanitizers.experimentalWarning, report.sanitizers.posix, report.sanitizers.slow, report.sanitizers.version] }); const reporter = new VerboseReporter({ projectDir: report.projectDir(type), From bd2ccf6f7219173a0bfe56ff86ef08a0810898d9 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 19 Apr 2020 14:50:40 +0200 Subject: [PATCH 12/14] Remove low-level promise stuff from stacks --- lib/reporters/beautify-stack.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/reporters/beautify-stack.js b/lib/reporters/beautify-stack.js index 6a8cbaba6..858da35e0 100644 --- a/lib/reporters/beautify-stack.js +++ b/lib/reporters/beautify-stack.js @@ -18,7 +18,9 @@ const stackUtils = new StackUtils({ // Only ignore Node.js internals that really are not useful for debugging. ...StackUtils.nodeInternals().filter(regexp => !/\(internal/.test(regexp.source)), /\(internal\/process\/task_queues\.js:\d+:\d+\)$/, - /\(internal\/modules\/cjs\/.+?\.js:\d+:\d+\)$/ + /\(internal\/modules\/cjs\/.+?\.js:\d+:\d+\)$/, + /async Promise\.all \(index/, + /new Promise \(\)/ ] }); From 7568f2a3a14d580a1592e31d9d81eb7e8fd41883 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 19 Apr 2020 14:51:29 +0200 Subject: [PATCH 13/14] Update reporter logs --- test-tap/reporters/mini.edgecases.v10.log | 4 +- test-tap/reporters/mini.edgecases.v12.log | 4 +- test-tap/reporters/mini.edgecases.v13.log | 4 +- test-tap/reporters/mini.failfast.v10.log | 4 +- test-tap/reporters/mini.failfast.v12.log | 3 +- test-tap/reporters/mini.failfast.v13.log | 3 +- test-tap/reporters/mini.failfast2.v10.log | 4 +- test-tap/reporters/mini.failfast2.v12.log | 3 +- test-tap/reporters/mini.failfast2.v13.log | 3 +- test-tap/reporters/mini.regular.v10.log | 87 +++++++++----------- test-tap/reporters/mini.regular.v12.log | 74 +++++++---------- test-tap/reporters/mini.regular.v13.log | 74 +++++++---------- test-tap/reporters/tap.edgecases.v10.log | 2 +- test-tap/reporters/tap.edgecases.v12.log | 2 +- test-tap/reporters/tap.edgecases.v13.log | 2 +- test-tap/reporters/tap.failfast.v10.log | 4 +- test-tap/reporters/tap.failfast.v12.log | 4 +- test-tap/reporters/tap.failfast.v13.log | 4 +- test-tap/reporters/tap.failfast2.v10.log | 4 +- test-tap/reporters/tap.failfast2.v12.log | 4 +- test-tap/reporters/tap.failfast2.v13.log | 4 +- test-tap/reporters/tap.regular.v10.log | 87 +++++++++----------- test-tap/reporters/tap.regular.v12.log | 60 ++++---------- test-tap/reporters/tap.regular.v13.log | 60 ++++---------- test-tap/reporters/verbose.edgecases.v10.log | 4 +- test-tap/reporters/verbose.edgecases.v12.log | 4 +- test-tap/reporters/verbose.edgecases.v13.log | 4 +- test-tap/reporters/verbose.failfast.v10.log | 4 +- test-tap/reporters/verbose.failfast.v12.log | 3 +- test-tap/reporters/verbose.failfast.v13.log | 3 +- test-tap/reporters/verbose.failfast2.v10.log | 4 +- test-tap/reporters/verbose.failfast2.v12.log | 3 +- test-tap/reporters/verbose.failfast2.v13.log | 3 +- test-tap/reporters/verbose.regular.v10.log | 87 +++++++++----------- test-tap/reporters/verbose.regular.v12.log | 74 +++++++---------- test-tap/reporters/verbose.regular.v13.log | 74 +++++++---------- 36 files changed, 317 insertions(+), 454 deletions(-) diff --git a/test-tap/reporters/mini.edgecases.v10.log b/test-tap/reporters/mini.edgecases.v10.log index 9402a70d2..0a481d9dd 100644 --- a/test-tap/reporters/mini.edgecases.v10.log +++ b/test-tap/reporters/mini.edgecases.v10.log @@ -25,7 +25,7 @@ TypeError: test is not a function - test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) @@ -38,6 +38,6 @@ Error: throws - test-tap/fixture/report/edgecases/throws.js:1:7 + › Object. (test-tap/fixture/report/edgecases/throws.js:1:7) ---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.edgecases.v12.log b/test-tap/reporters/mini.edgecases.v12.log index 9402a70d2..0a481d9dd 100644 --- a/test-tap/reporters/mini.edgecases.v12.log +++ b/test-tap/reporters/mini.edgecases.v12.log @@ -25,7 +25,7 @@ TypeError: test is not a function - test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) @@ -38,6 +38,6 @@ Error: throws - test-tap/fixture/report/edgecases/throws.js:1:7 + › Object. (test-tap/fixture/report/edgecases/throws.js:1:7) ---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.edgecases.v13.log b/test-tap/reporters/mini.edgecases.v13.log index 9402a70d2..0a481d9dd 100644 --- a/test-tap/reporters/mini.edgecases.v13.log +++ b/test-tap/reporters/mini.edgecases.v13.log @@ -25,7 +25,7 @@ TypeError: test is not a function - test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) @@ -38,6 +38,6 @@ Error: throws - test-tap/fixture/report/edgecases/throws.js:1:7 + › Object. (test-tap/fixture/report/edgecases/throws.js:1:7) ---tty-stream-chunk-separator diff --git a/test-tap/reporters/mini.failfast.v10.log b/test-tap/reporters/mini.failfast.v10.log index de4d9e6f0..9aff997b2 100644 --- a/test-tap/reporters/mini.failfast.v10.log +++ b/test-tap/reporters/mini.failfast.v10.log @@ -20,8 +20,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast/a.js:3:22 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/failfast/a.js:3:22) + › process._tickCallback (internal/process/next_tick.js:68:7) diff --git a/test-tap/reporters/mini.failfast.v12.log b/test-tap/reporters/mini.failfast.v12.log index a1d0c8fcb..f85522dd9 100644 --- a/test-tap/reporters/mini.failfast.v12.log +++ b/test-tap/reporters/mini.failfast.v12.log @@ -20,8 +20,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast/a.js:3:22 diff --git a/test-tap/reporters/mini.failfast.v13.log b/test-tap/reporters/mini.failfast.v13.log index a1d0c8fcb..f85522dd9 100644 --- a/test-tap/reporters/mini.failfast.v13.log +++ b/test-tap/reporters/mini.failfast.v13.log @@ -20,8 +20,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast/a.js:3:22 diff --git a/test-tap/reporters/mini.failfast2.v10.log b/test-tap/reporters/mini.failfast2.v10.log index 6fef68ca4..d132dab14 100644 --- a/test-tap/reporters/mini.failfast2.v10.log +++ b/test-tap/reporters/mini.failfast2.v10.log @@ -20,8 +20,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast2/a.js:3:22 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/failfast2/a.js:3:22) + › process._tickCallback (internal/process/next_tick.js:68:7) diff --git a/test-tap/reporters/mini.failfast2.v12.log b/test-tap/reporters/mini.failfast2.v12.log index 497b880b6..763b0e57b 100644 --- a/test-tap/reporters/mini.failfast2.v12.log +++ b/test-tap/reporters/mini.failfast2.v12.log @@ -20,8 +20,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast2/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast2/a.js:3:22 diff --git a/test-tap/reporters/mini.failfast2.v13.log b/test-tap/reporters/mini.failfast2.v13.log index 497b880b6..763b0e57b 100644 --- a/test-tap/reporters/mini.failfast2.v13.log +++ b/test-tap/reporters/mini.failfast2.v13.log @@ -20,8 +20,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast2/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast2/a.js:3:22 diff --git a/test-tap/reporters/mini.regular.v10.log b/test-tap/reporters/mini.regular.v10.log index 4b20d2008..973f9a818 100644 --- a/test-tap/reporters/mini.regular.v10.log +++ b/test-tap/reporters/mini.regular.v10.log @@ -181,8 +181,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/output-in-hook.js:34:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/output-in-hook.js:34:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -196,8 +196,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:9:22 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:9:22) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -206,8 +206,7 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing - new Promise () - internal/process/next_tick.js:68:7 + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -223,8 +222,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:18:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:18:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -241,8 +240,8 @@ - 'foo' + 'bar' - test-tap/fixture/report/regular/test.js:22:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:22:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -261,8 +260,8 @@ foo => '' - test-tap/fixture/report/regular/test.js:27:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:27:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -290,9 +289,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:32:9 - test-tap/fixture/report/regular/test.js:35:11 - internal/process/next_tick.js:68:7 + › fn (test-tap/fixture/report/regular/test.js:32:9) + › t (test-tap/fixture/report/regular/test.js:35:11) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -320,9 +319,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:40:9 - test-tap/fixture/report/regular/test.js:43:14 - internal/process/next_tick.js:68:7 + › fn (test-tap/fixture/report/regular/test.js:40:9) + › t (test-tap/fixture/report/regular/test.js:43:14) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -333,7 +332,7 @@ null - internal/process/next_tick.js:68:7 + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -355,10 +354,10 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throws (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:12:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -376,10 +375,10 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.notThrows (test-tap/fixture/report/regular/traces-in-t-throws.js:16:20) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:16:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -397,10 +396,10 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.notThrowsAsync (test-tap/fixture/report/regular/traces-in-t-throws.js:20:25) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:20:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -418,10 +417,10 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throwsAsync (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:24:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -443,9 +442,9 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 - test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - internal/process/next_tick.js:68:7 + › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:28:11) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -459,7 +458,7 @@ TypeError: test.serial.test is not a function - test-tap/fixture/report/regular/bad-test-chain.js:3:13 + › Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13) @@ -473,11 +472,7 @@ Error: Can’t catch me - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - timers.js:436:11 - timers.js:300:5 - timers.js:263:5 - timers.js:223:10 + › Timeout.setTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) @@ -491,8 +486,8 @@ Error: Can’t catch me - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - internal/process/next_tick.js:68:7 + › passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17) + › process._tickCallback (internal/process/next_tick.js:68:7) diff --git a/test-tap/reporters/mini.regular.v12.log b/test-tap/reporters/mini.regular.v12.log index dc1d23897..833953736 100644 --- a/test-tap/reporters/mini.regular.v12.log +++ b/test-tap/reporters/mini.regular.v12.log @@ -181,8 +181,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/output-in-hook.js:34:4 - async Promise.all (index 1) + › test-tap/fixture/report/regular/output-in-hook.js:34:4 @@ -196,8 +195,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:9:22 - async Promise.all (index 1) + › test-tap/fixture/report/regular/test.js:9:22 @@ -206,8 +204,7 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing - new Promise () - async Promise.all (index 3) + ›  @@ -223,8 +220,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:18:4 - async Promise.all (index 4) + › test-tap/fixture/report/regular/test.js:18:4 @@ -241,8 +237,7 @@ - 'foo' + 'bar' - test-tap/fixture/report/regular/test.js:22:4 - async Promise.all (index 5) + › test-tap/fixture/report/regular/test.js:22:4 @@ -261,8 +256,7 @@ foo => '' - test-tap/fixture/report/regular/test.js:27:4 - async Promise.all (index 6) + › test-tap/fixture/report/regular/test.js:27:4 @@ -290,9 +284,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:32:9 - test-tap/fixture/report/regular/test.js:35:11 - async Promise.all (index 7) + › fn (test-tap/fixture/report/regular/test.js:32:9) + › test-tap/fixture/report/regular/test.js:35:11 @@ -320,9 +313,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:40:9 - test-tap/fixture/report/regular/test.js:43:14 - async Promise.all (index 8) + › fn (test-tap/fixture/report/regular/test.js:40:9) + › test-tap/fixture/report/regular/test.js:43:14 @@ -333,7 +325,7 @@ null - async Promise.all (index 9) + ›  @@ -355,10 +347,9 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - async Promise.all (index 0) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + › test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 @@ -376,10 +367,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - async Promise.all (index 1) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 @@ -397,10 +387,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - async Promise.all (index 2) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 @@ -418,10 +407,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - async Promise.all (index 3) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + › test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 @@ -443,9 +431,8 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 - test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - async Promise.all (index 4) + › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + › test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 @@ -459,7 +446,7 @@ TypeError: test.serial.test is not a function - test-tap/fixture/report/regular/bad-test-chain.js:3:13 + › Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13) @@ -473,9 +460,9 @@ Error: Can’t catch me - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:549:17 - internal/timers.js:492:7 + › Timeout._onTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) + › listOnTimeout (internal/timers.js:549:17) + › processTimers (internal/timers.js:492:7) @@ -489,8 +476,7 @@ Error: Can’t catch me - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - async Promise.all (index 0) + › passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17) diff --git a/test-tap/reporters/mini.regular.v13.log b/test-tap/reporters/mini.regular.v13.log index dc1d23897..833953736 100644 --- a/test-tap/reporters/mini.regular.v13.log +++ b/test-tap/reporters/mini.regular.v13.log @@ -181,8 +181,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/output-in-hook.js:34:4 - async Promise.all (index 1) + › test-tap/fixture/report/regular/output-in-hook.js:34:4 @@ -196,8 +195,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:9:22 - async Promise.all (index 1) + › test-tap/fixture/report/regular/test.js:9:22 @@ -206,8 +204,7 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing - new Promise () - async Promise.all (index 3) + ›  @@ -223,8 +220,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:18:4 - async Promise.all (index 4) + › test-tap/fixture/report/regular/test.js:18:4 @@ -241,8 +237,7 @@ - 'foo' + 'bar' - test-tap/fixture/report/regular/test.js:22:4 - async Promise.all (index 5) + › test-tap/fixture/report/regular/test.js:22:4 @@ -261,8 +256,7 @@ foo => '' - test-tap/fixture/report/regular/test.js:27:4 - async Promise.all (index 6) + › test-tap/fixture/report/regular/test.js:27:4 @@ -290,9 +284,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:32:9 - test-tap/fixture/report/regular/test.js:35:11 - async Promise.all (index 7) + › fn (test-tap/fixture/report/regular/test.js:32:9) + › test-tap/fixture/report/regular/test.js:35:11 @@ -320,9 +313,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:40:9 - test-tap/fixture/report/regular/test.js:43:14 - async Promise.all (index 8) + › fn (test-tap/fixture/report/regular/test.js:40:9) + › test-tap/fixture/report/regular/test.js:43:14 @@ -333,7 +325,7 @@ null - async Promise.all (index 9) + ›  @@ -355,10 +347,9 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - async Promise.all (index 0) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + › test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 @@ -376,10 +367,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - async Promise.all (index 1) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 @@ -397,10 +387,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - async Promise.all (index 2) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 @@ -418,10 +407,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - async Promise.all (index 3) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + › test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 @@ -443,9 +431,8 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 - test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - async Promise.all (index 4) + › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + › test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 @@ -459,7 +446,7 @@ TypeError: test.serial.test is not a function - test-tap/fixture/report/regular/bad-test-chain.js:3:13 + › Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13) @@ -473,9 +460,9 @@ Error: Can’t catch me - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:549:17 - internal/timers.js:492:7 + › Timeout._onTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) + › listOnTimeout (internal/timers.js:549:17) + › processTimers (internal/timers.js:492:7) @@ -489,8 +476,7 @@ Error: Can’t catch me - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - async Promise.all (index 0) + › passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17) diff --git a/test-tap/reporters/tap.edgecases.v10.log b/test-tap/reporters/tap.edgecases.v10.log index a6b6943c7..838ef9d3a 100644 --- a/test-tap/reporters/tap.edgecases.v10.log +++ b/test-tap/reporters/tap.edgecases.v10.log @@ -24,7 +24,7 @@ not ok 5 - Error: throws --- name: Error message: throws - at: 'test-tap/fixture/report/edgecases/throws.js:1:7' + at: 'Object. (test-tap/fixture/report/edgecases/throws.js:1:7)' ... ---tty-stream-chunk-separator # throws.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/tap.edgecases.v12.log b/test-tap/reporters/tap.edgecases.v12.log index a6b6943c7..838ef9d3a 100644 --- a/test-tap/reporters/tap.edgecases.v12.log +++ b/test-tap/reporters/tap.edgecases.v12.log @@ -24,7 +24,7 @@ not ok 5 - Error: throws --- name: Error message: throws - at: 'test-tap/fixture/report/edgecases/throws.js:1:7' + at: 'Object. (test-tap/fixture/report/edgecases/throws.js:1:7)' ... ---tty-stream-chunk-separator # throws.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/tap.edgecases.v13.log b/test-tap/reporters/tap.edgecases.v13.log index a6b6943c7..838ef9d3a 100644 --- a/test-tap/reporters/tap.edgecases.v13.log +++ b/test-tap/reporters/tap.edgecases.v13.log @@ -24,7 +24,7 @@ not ok 5 - Error: throws --- name: Error message: throws - at: 'test-tap/fixture/report/edgecases/throws.js:1:7' + at: 'Object. (test-tap/fixture/report/edgecases/throws.js:1:7)' ... ---tty-stream-chunk-separator # throws.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/tap.failfast.v10.log b/test-tap/reporters/tap.failfast.v10.log index 28339aa5f..e20ac8df8 100644 --- a/test-tap/reporters/tap.failfast.v10.log +++ b/test-tap/reporters/tap.failfast.v10.log @@ -7,8 +7,8 @@ not ok 1 - a › fails message: Test failed via `t.fail()` assertion: fail at: |- - test-tap/fixture/report/failfast/a.js:3:22 - internal/process/next_tick.js:68:7 + t (test-tap/fixture/report/failfast/a.js:3:22) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast.v12.log b/test-tap/reporters/tap.failfast.v12.log index 11941af1e..a38a7d8ef 100644 --- a/test-tap/reporters/tap.failfast.v12.log +++ b/test-tap/reporters/tap.failfast.v12.log @@ -6,9 +6,7 @@ not ok 1 - a › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/failfast/a.js:3:22 - async Promise.all (index 1) + at: 'test-tap/fixture/report/failfast/a.js:3:22' ... ---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast.v13.log b/test-tap/reporters/tap.failfast.v13.log index 11941af1e..a38a7d8ef 100644 --- a/test-tap/reporters/tap.failfast.v13.log +++ b/test-tap/reporters/tap.failfast.v13.log @@ -6,9 +6,7 @@ not ok 1 - a › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/failfast/a.js:3:22 - async Promise.all (index 1) + at: 'test-tap/fixture/report/failfast/a.js:3:22' ... ---tty-stream-chunk-separator diff --git a/test-tap/reporters/tap.failfast2.v10.log b/test-tap/reporters/tap.failfast2.v10.log index e38f9897f..3cf71cff0 100644 --- a/test-tap/reporters/tap.failfast2.v10.log +++ b/test-tap/reporters/tap.failfast2.v10.log @@ -7,8 +7,8 @@ not ok 1 - a › fails message: Test failed via `t.fail()` assertion: fail at: |- - test-tap/fixture/report/failfast2/a.js:3:22 - internal/process/next_tick.js:68:7 + t (test-tap/fixture/report/failfast2/a.js:3:22) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # 1 test remaining in a.js diff --git a/test-tap/reporters/tap.failfast2.v12.log b/test-tap/reporters/tap.failfast2.v12.log index 3c40115e4..4300019d7 100644 --- a/test-tap/reporters/tap.failfast2.v12.log +++ b/test-tap/reporters/tap.failfast2.v12.log @@ -6,9 +6,7 @@ not ok 1 - a › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/failfast2/a.js:3:22 - async Promise.all (index 1) + at: 'test-tap/fixture/report/failfast2/a.js:3:22' ... ---tty-stream-chunk-separator # 1 test remaining in a.js diff --git a/test-tap/reporters/tap.failfast2.v13.log b/test-tap/reporters/tap.failfast2.v13.log index 3c40115e4..4300019d7 100644 --- a/test-tap/reporters/tap.failfast2.v13.log +++ b/test-tap/reporters/tap.failfast2.v13.log @@ -6,9 +6,7 @@ not ok 1 - a › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/failfast2/a.js:3:22 - async Promise.all (index 1) + at: 'test-tap/fixture/report/failfast2/a.js:3:22' ... ---tty-stream-chunk-separator # 1 test remaining in a.js diff --git a/test-tap/reporters/tap.regular.v10.log b/test-tap/reporters/tap.regular.v10.log index 89838910c..2f5e85438 100644 --- a/test-tap/reporters/tap.regular.v10.log +++ b/test-tap/reporters/tap.regular.v10.log @@ -5,7 +5,7 @@ not ok 1 - TypeError: test.serial.test is not a function --- name: TypeError message: test.serial.test is not a function - at: 'test-tap/fixture/report/regular/bad-test-chain.js:3:13' + at: 'Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13)' ... ---tty-stream-chunk-separator # bad-test-chain.js exited with a non-zero exit code: 1 @@ -35,8 +35,8 @@ not ok 4 - output-in-hook › failing test message: Test failed via `t.fail()` assertion: fail at: |- - test-tap/fixture/report/regular/output-in-hook.js:34:4 - internal/process/next_tick.js:68:7 + t (test-tap/fixture/report/regular/output-in-hook.js:34:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # output-in-hook › afterEach hook for passing test @@ -74,8 +74,8 @@ not ok 9 - test › fails message: Test failed via `t.fail()` assertion: fail at: |- - test-tap/fixture/report/regular/test.js:9:22 - internal/process/next_tick.js:68:7 + t (test-tap/fixture/report/regular/test.js:9:22) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # test › known failure @@ -88,9 +88,7 @@ not ok 11 - test › no longer failing message: >- Test was expected to fail, but succeeded, you should stop marking the test as failing - at: |- - new Promise () - internal/process/next_tick.js:68:7 + at: 'process._tickCallback (internal/process/next_tick.js:68:7)' ... ---tty-stream-chunk-separator # test › logs @@ -102,8 +100,8 @@ not ok 12 - test › logs message: Test failed via `t.fail()` assertion: fail at: |- - test-tap/fixture/report/regular/test.js:18:4 - internal/process/next_tick.js:68:7 + t (test-tap/fixture/report/regular/test.js:18:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # test › formatted @@ -116,8 +114,8 @@ not ok 13 - test › formatted - 'foo' + 'bar' at: |- - test-tap/fixture/report/regular/test.js:22:4 - internal/process/next_tick.js:68:7 + t (test-tap/fixture/report/regular/test.js:22:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # test › power-assert @@ -129,8 +127,8 @@ not ok 14 - test › power-assert values: 'Value is not truthy:': '''''' at: |- - test-tap/fixture/report/regular/test.js:27:4 - internal/process/next_tick.js:68:7 + t (test-tap/fixture/report/regular/test.js:27:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # test › bad throws @@ -145,9 +143,9 @@ not ok 15 - test › bad throws message: 'err', } at: |- - test-tap/fixture/report/regular/test.js:32:9 - test-tap/fixture/report/regular/test.js:35:11 - internal/process/next_tick.js:68:7 + fn (test-tap/fixture/report/regular/test.js:32:9) + t (test-tap/fixture/report/regular/test.js:35:11) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # test › bad notThrows @@ -162,9 +160,9 @@ not ok 16 - test › bad notThrows message: 'err', } at: |- - test-tap/fixture/report/regular/test.js:40:9 - test-tap/fixture/report/regular/test.js:43:14 - internal/process/next_tick.js:68:7 + fn (test-tap/fixture/report/regular/test.js:40:9) + t (test-tap/fixture/report/regular/test.js:43:14) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # test › implementation throws non-error @@ -174,7 +172,7 @@ not ok 17 - test › implementation throws non-error message: Error thrown in test values: 'Error thrown in test:': 'null' - at: 'internal/process/next_tick.js:68:7' + at: 'process._tickCallback (internal/process/next_tick.js:68:7)' ... ---tty-stream-chunk-separator # traces-in-t-throws › throws @@ -189,10 +187,10 @@ not ok 18 - traces-in-t-throws › throws } 'Expected instance of:': 'Function TypeError {}' at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - internal/process/next_tick.js:68:7 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + t.throws (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + t (test-tap/fixture/report/regular/traces-in-t-throws.js:12:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrows @@ -206,10 +204,10 @@ not ok 19 - traces-in-t-throws › notThrows message: 'uh-oh', } at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - internal/process/next_tick.js:68:7 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + t.notThrows (test-tap/fixture/report/regular/traces-in-t-throws.js:16:20) + t (test-tap/fixture/report/regular/traces-in-t-throws.js:16:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrowsAsync @@ -223,10 +221,10 @@ not ok 20 - traces-in-t-throws › notThrowsAsync message: 'uh-oh', } at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - internal/process/next_tick.js:68:7 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + t.notThrowsAsync (test-tap/fixture/report/regular/traces-in-t-throws.js:20:25) + t (test-tap/fixture/report/regular/traces-in-t-throws.js:20:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync @@ -240,10 +238,10 @@ not ok 21 - traces-in-t-throws › throwsAsync message: 'uh-oh', } at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - internal/process/next_tick.js:68:7 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + t.throwsAsync (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + t (test-tap/fixture/report/regular/traces-in-t-throws.js:24:4) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync different error @@ -261,9 +259,9 @@ not ok 22 - traces-in-t-throws › throwsAsync different erro returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) - test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 + t (test-tap/fixture/report/regular/traces-in-t-throws.js:28:11) - internal/process/next_tick.js:68:7 + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # uncaught-exception › passes @@ -274,12 +272,7 @@ not ok 24 - Error: Can’t catch me --- name: Error message: Can’t catch me - at: |- - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - timers.js:436:11 - timers.js:300:5 - timers.js:263:5 - timers.js:223:10 + at: 'Timeout.setTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9)' ... ---tty-stream-chunk-separator # uncaught-exception.js exited with a non-zero exit code: 1 @@ -297,8 +290,8 @@ not ok 28 - Error: Can’t catch me name: Error message: Can’t catch me at: |- - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - internal/process/next_tick.js:68:7 + passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17) + process._tickCallback (internal/process/next_tick.js:68:7) ... ---tty-stream-chunk-separator # unhandled-rejection diff --git a/test-tap/reporters/tap.regular.v12.log b/test-tap/reporters/tap.regular.v12.log index 0abb3fce0..6d5c17e7f 100644 --- a/test-tap/reporters/tap.regular.v12.log +++ b/test-tap/reporters/tap.regular.v12.log @@ -5,7 +5,7 @@ not ok 1 - TypeError: test.serial.test is not a function --- name: TypeError message: test.serial.test is not a function - at: 'test-tap/fixture/report/regular/bad-test-chain.js:3:13' + at: 'Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13)' ... ---tty-stream-chunk-separator # bad-test-chain.js exited with a non-zero exit code: 1 @@ -34,9 +34,7 @@ not ok 4 - output-in-hook › failing test name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/regular/output-in-hook.js:34:4 - async Promise.all (index 1) + at: 'test-tap/fixture/report/regular/output-in-hook.js:34:4' ... ---tty-stream-chunk-separator # output-in-hook › afterEach hook for passing test @@ -73,9 +71,7 @@ not ok 9 - test › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/regular/test.js:9:22 - async Promise.all (index 1) + at: 'test-tap/fixture/report/regular/test.js:9:22' ... ---tty-stream-chunk-separator # test › known failure @@ -88,9 +84,7 @@ not ok 11 - test › no longer failing message: >- Test was expected to fail, but succeeded, you should stop marking the test as failing - at: |- - new Promise () - async Promise.all (index 3) + at: '' ... ---tty-stream-chunk-separator # test › logs @@ -101,9 +95,7 @@ not ok 12 - test › logs name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/regular/test.js:18:4 - async Promise.all (index 4) + at: 'test-tap/fixture/report/regular/test.js:18:4' ... ---tty-stream-chunk-separator # test › formatted @@ -115,9 +107,7 @@ not ok 13 - test › formatted 'Difference:': |- - 'foo' + 'bar' - at: |- - test-tap/fixture/report/regular/test.js:22:4 - async Promise.all (index 5) + at: 'test-tap/fixture/report/regular/test.js:22:4' ... ---tty-stream-chunk-separator # test › power-assert @@ -128,9 +118,7 @@ not ok 14 - test › power-assert operator: '!!' values: 'Value is not truthy:': '''''' - at: |- - test-tap/fixture/report/regular/test.js:27:4 - async Promise.all (index 6) + at: 'test-tap/fixture/report/regular/test.js:27:4' ... ---tty-stream-chunk-separator # test › bad throws @@ -145,9 +133,8 @@ not ok 15 - test › bad throws message: 'err', } at: |- - test-tap/fixture/report/regular/test.js:32:9 + fn (test-tap/fixture/report/regular/test.js:32:9) test-tap/fixture/report/regular/test.js:35:11 - async Promise.all (index 7) ... ---tty-stream-chunk-separator # test › bad notThrows @@ -162,9 +149,8 @@ not ok 16 - test › bad notThrows message: 'err', } at: |- - test-tap/fixture/report/regular/test.js:40:9 + fn (test-tap/fixture/report/regular/test.js:40:9) test-tap/fixture/report/regular/test.js:43:14 - async Promise.all (index 8) ... ---tty-stream-chunk-separator # test › implementation throws non-error @@ -174,7 +160,7 @@ not ok 17 - test › implementation throws non-error message: Error thrown in test values: 'Error thrown in test:': 'null' - at: async Promise.all (index 9) + at: '' ... ---tty-stream-chunk-separator # traces-in-t-throws › throws @@ -189,14 +175,12 @@ not ok 18 - traces-in-t-throws › throws } 'Expected instance of:': 'Function TypeError {}' at: >- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - - async Promise.all (index 0) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrows @@ -210,10 +194,9 @@ not ok 19 - traces-in-t-throws › notThrows message: 'uh-oh', } at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - async Promise.all (index 1) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrowsAsync @@ -227,10 +210,9 @@ not ok 20 - traces-in-t-throws › notThrowsAsync message: 'uh-oh', } at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - async Promise.all (index 2) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync @@ -244,14 +226,12 @@ not ok 21 - traces-in-t-throws › throwsAsync message: 'uh-oh', } at: >- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - - async Promise.all (index 3) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync different error @@ -270,8 +250,6 @@ not ok 22 - traces-in-t-throws › throwsAsync different erro (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - - async Promise.all (index 4) ... ---tty-stream-chunk-separator # uncaught-exception › passes @@ -283,9 +261,9 @@ not ok 24 - Error: Can’t catch me name: Error message: Can’t catch me at: |- - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:549:17 - internal/timers.js:492:7 + Timeout._onTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) + listOnTimeout (internal/timers.js:549:17) + processTimers (internal/timers.js:492:7) ... ---tty-stream-chunk-separator # uncaught-exception.js exited with a non-zero exit code: 1 @@ -302,9 +280,7 @@ not ok 28 - Error: Can’t catch me --- name: Error message: Can’t catch me - at: |- - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - async Promise.all (index 0) + at: 'passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17)' ... ---tty-stream-chunk-separator # unhandled-rejection diff --git a/test-tap/reporters/tap.regular.v13.log b/test-tap/reporters/tap.regular.v13.log index 0abb3fce0..6d5c17e7f 100644 --- a/test-tap/reporters/tap.regular.v13.log +++ b/test-tap/reporters/tap.regular.v13.log @@ -5,7 +5,7 @@ not ok 1 - TypeError: test.serial.test is not a function --- name: TypeError message: test.serial.test is not a function - at: 'test-tap/fixture/report/regular/bad-test-chain.js:3:13' + at: 'Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13)' ... ---tty-stream-chunk-separator # bad-test-chain.js exited with a non-zero exit code: 1 @@ -34,9 +34,7 @@ not ok 4 - output-in-hook › failing test name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/regular/output-in-hook.js:34:4 - async Promise.all (index 1) + at: 'test-tap/fixture/report/regular/output-in-hook.js:34:4' ... ---tty-stream-chunk-separator # output-in-hook › afterEach hook for passing test @@ -73,9 +71,7 @@ not ok 9 - test › fails name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/regular/test.js:9:22 - async Promise.all (index 1) + at: 'test-tap/fixture/report/regular/test.js:9:22' ... ---tty-stream-chunk-separator # test › known failure @@ -88,9 +84,7 @@ not ok 11 - test › no longer failing message: >- Test was expected to fail, but succeeded, you should stop marking the test as failing - at: |- - new Promise () - async Promise.all (index 3) + at: '' ... ---tty-stream-chunk-separator # test › logs @@ -101,9 +95,7 @@ not ok 12 - test › logs name: AssertionError message: Test failed via `t.fail()` assertion: fail - at: |- - test-tap/fixture/report/regular/test.js:18:4 - async Promise.all (index 4) + at: 'test-tap/fixture/report/regular/test.js:18:4' ... ---tty-stream-chunk-separator # test › formatted @@ -115,9 +107,7 @@ not ok 13 - test › formatted 'Difference:': |- - 'foo' + 'bar' - at: |- - test-tap/fixture/report/regular/test.js:22:4 - async Promise.all (index 5) + at: 'test-tap/fixture/report/regular/test.js:22:4' ... ---tty-stream-chunk-separator # test › power-assert @@ -128,9 +118,7 @@ not ok 14 - test › power-assert operator: '!!' values: 'Value is not truthy:': '''''' - at: |- - test-tap/fixture/report/regular/test.js:27:4 - async Promise.all (index 6) + at: 'test-tap/fixture/report/regular/test.js:27:4' ... ---tty-stream-chunk-separator # test › bad throws @@ -145,9 +133,8 @@ not ok 15 - test › bad throws message: 'err', } at: |- - test-tap/fixture/report/regular/test.js:32:9 + fn (test-tap/fixture/report/regular/test.js:32:9) test-tap/fixture/report/regular/test.js:35:11 - async Promise.all (index 7) ... ---tty-stream-chunk-separator # test › bad notThrows @@ -162,9 +149,8 @@ not ok 16 - test › bad notThrows message: 'err', } at: |- - test-tap/fixture/report/regular/test.js:40:9 + fn (test-tap/fixture/report/regular/test.js:40:9) test-tap/fixture/report/regular/test.js:43:14 - async Promise.all (index 8) ... ---tty-stream-chunk-separator # test › implementation throws non-error @@ -174,7 +160,7 @@ not ok 17 - test › implementation throws non-error message: Error thrown in test values: 'Error thrown in test:': 'null' - at: async Promise.all (index 9) + at: '' ... ---tty-stream-chunk-separator # traces-in-t-throws › throws @@ -189,14 +175,12 @@ not ok 18 - traces-in-t-throws › throws } 'Expected instance of:': 'Function TypeError {}' at: >- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - - async Promise.all (index 0) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrows @@ -210,10 +194,9 @@ not ok 19 - traces-in-t-throws › notThrows message: 'uh-oh', } at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - async Promise.all (index 1) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrowsAsync @@ -227,10 +210,9 @@ not ok 20 - traces-in-t-throws › notThrowsAsync message: 'uh-oh', } at: |- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - async Promise.all (index 2) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync @@ -244,14 +226,12 @@ not ok 21 - traces-in-t-throws › throwsAsync message: 'uh-oh', } at: >- - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 + throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - - async Promise.all (index 3) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync different error @@ -270,8 +250,6 @@ not ok 22 - traces-in-t-throws › throwsAsync different erro (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - - async Promise.all (index 4) ... ---tty-stream-chunk-separator # uncaught-exception › passes @@ -283,9 +261,9 @@ not ok 24 - Error: Can’t catch me name: Error message: Can’t catch me at: |- - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:549:17 - internal/timers.js:492:7 + Timeout._onTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) + listOnTimeout (internal/timers.js:549:17) + processTimers (internal/timers.js:492:7) ... ---tty-stream-chunk-separator # uncaught-exception.js exited with a non-zero exit code: 1 @@ -302,9 +280,7 @@ not ok 28 - Error: Can’t catch me --- name: Error message: Can’t catch me - at: |- - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - async Promise.all (index 0) + at: 'passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17)' ... ---tty-stream-chunk-separator # unhandled-rejection diff --git a/test-tap/reporters/verbose.edgecases.v10.log b/test-tap/reporters/verbose.edgecases.v10.log index 94794e3c5..c46f3ad2e 100644 --- a/test-tap/reporters/verbose.edgecases.v10.log +++ b/test-tap/reporters/verbose.edgecases.v10.log @@ -13,7 +13,7 @@ TypeError: test is not a function - test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) ---tty-stream-chunk-separator ✖ import-and-use-test-member.js exited with a non-zero exit code: 1 @@ -30,7 +30,7 @@ Error: throws - test-tap/fixture/report/edgecases/throws.js:1:7 + › Object. (test-tap/fixture/report/edgecases/throws.js:1:7) ---tty-stream-chunk-separator ✖ throws.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/verbose.edgecases.v12.log b/test-tap/reporters/verbose.edgecases.v12.log index 94794e3c5..c46f3ad2e 100644 --- a/test-tap/reporters/verbose.edgecases.v12.log +++ b/test-tap/reporters/verbose.edgecases.v12.log @@ -13,7 +13,7 @@ TypeError: test is not a function - test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) ---tty-stream-chunk-separator ✖ import-and-use-test-member.js exited with a non-zero exit code: 1 @@ -30,7 +30,7 @@ Error: throws - test-tap/fixture/report/edgecases/throws.js:1:7 + › Object. (test-tap/fixture/report/edgecases/throws.js:1:7) ---tty-stream-chunk-separator ✖ throws.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/verbose.edgecases.v13.log b/test-tap/reporters/verbose.edgecases.v13.log index 94794e3c5..c46f3ad2e 100644 --- a/test-tap/reporters/verbose.edgecases.v13.log +++ b/test-tap/reporters/verbose.edgecases.v13.log @@ -13,7 +13,7 @@ TypeError: test is not a function - test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1 + › Object. (test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1) ---tty-stream-chunk-separator ✖ import-and-use-test-member.js exited with a non-zero exit code: 1 @@ -30,7 +30,7 @@ Error: throws - test-tap/fixture/report/edgecases/throws.js:1:7 + › Object. (test-tap/fixture/report/edgecases/throws.js:1:7) ---tty-stream-chunk-separator ✖ throws.js exited with a non-zero exit code: 1 diff --git a/test-tap/reporters/verbose.failfast.v10.log b/test-tap/reporters/verbose.failfast.v10.log index 9b4323574..b486f10f3 100644 --- a/test-tap/reporters/verbose.failfast.v10.log +++ b/test-tap/reporters/verbose.failfast.v10.log @@ -15,8 +15,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast/a.js:3:22 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/failfast/a.js:3:22) + › process._tickCallback (internal/process/next_tick.js:68:7) diff --git a/test-tap/reporters/verbose.failfast.v12.log b/test-tap/reporters/verbose.failfast.v12.log index a8abb4d8e..a20425d12 100644 --- a/test-tap/reporters/verbose.failfast.v12.log +++ b/test-tap/reporters/verbose.failfast.v12.log @@ -15,8 +15,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast/a.js:3:22 diff --git a/test-tap/reporters/verbose.failfast.v13.log b/test-tap/reporters/verbose.failfast.v13.log index a8abb4d8e..a20425d12 100644 --- a/test-tap/reporters/verbose.failfast.v13.log +++ b/test-tap/reporters/verbose.failfast.v13.log @@ -15,8 +15,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast/a.js:3:22 diff --git a/test-tap/reporters/verbose.failfast2.v10.log b/test-tap/reporters/verbose.failfast2.v10.log index 840818c08..44a7443b7 100644 --- a/test-tap/reporters/verbose.failfast2.v10.log +++ b/test-tap/reporters/verbose.failfast2.v10.log @@ -15,8 +15,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast2/a.js:3:22 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/failfast2/a.js:3:22) + › process._tickCallback (internal/process/next_tick.js:68:7) diff --git a/test-tap/reporters/verbose.failfast2.v12.log b/test-tap/reporters/verbose.failfast2.v12.log index b316262da..f91d476d3 100644 --- a/test-tap/reporters/verbose.failfast2.v12.log +++ b/test-tap/reporters/verbose.failfast2.v12.log @@ -15,8 +15,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast2/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast2/a.js:3:22 diff --git a/test-tap/reporters/verbose.failfast2.v13.log b/test-tap/reporters/verbose.failfast2.v13.log index b316262da..f91d476d3 100644 --- a/test-tap/reporters/verbose.failfast2.v13.log +++ b/test-tap/reporters/verbose.failfast2.v13.log @@ -15,8 +15,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/failfast2/a.js:3:22 - async Promise.all (index 1) + › test-tap/fixture/report/failfast2/a.js:3:22 diff --git a/test-tap/reporters/verbose.regular.v10.log b/test-tap/reporters/verbose.regular.v10.log index bde79216d..5b19aef56 100644 --- a/test-tap/reporters/verbose.regular.v10.log +++ b/test-tap/reporters/verbose.regular.v10.log @@ -10,7 +10,7 @@ TypeError: test.serial.test is not a function - test-tap/fixture/report/regular/bad-test-chain.js:3:13 + › Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13) ---tty-stream-chunk-separator ✖ bad-test-chain.js exited with a non-zero exit code: 1 @@ -91,11 +91,7 @@ Error: Can’t catch me - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - timers.js:436:11 - timers.js:300:5 - timers.js:263:5 - timers.js:223:10 + › Timeout.setTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) ---tty-stream-chunk-separator ✖ uncaught-exception.js exited with a non-zero exit code: 1 @@ -115,8 +111,8 @@ Error: Can’t catch me - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - internal/process/next_tick.js:68:7 + › passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17) + › process._tickCallback (internal/process/next_tick.js:68:7) ---tty-stream-chunk-separator Unhandled rejection in unhandled-rejection.js @@ -144,8 +140,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/output-in-hook.js:34:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/output-in-hook.js:34:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -159,8 +155,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:9:22 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:9:22) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -169,8 +165,7 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing - new Promise () - internal/process/next_tick.js:68:7 + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -186,8 +181,8 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:18:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:18:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -204,8 +199,8 @@ - 'foo' + 'bar' - test-tap/fixture/report/regular/test.js:22:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:22:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -224,8 +219,8 @@ foo => '' - test-tap/fixture/report/regular/test.js:27:4 - internal/process/next_tick.js:68:7 + › t (test-tap/fixture/report/regular/test.js:27:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -253,9 +248,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:32:9 - test-tap/fixture/report/regular/test.js:35:11 - internal/process/next_tick.js:68:7 + › fn (test-tap/fixture/report/regular/test.js:32:9) + › t (test-tap/fixture/report/regular/test.js:35:11) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -283,9 +278,9 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:40:9 - test-tap/fixture/report/regular/test.js:43:14 - internal/process/next_tick.js:68:7 + › fn (test-tap/fixture/report/regular/test.js:40:9) + › t (test-tap/fixture/report/regular/test.js:43:14) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -296,7 +291,7 @@ null - internal/process/next_tick.js:68:7 + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -318,10 +313,10 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throws (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:12:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -339,10 +334,10 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.notThrows (test-tap/fixture/report/regular/traces-in-t-throws.js:16:20) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:16:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -360,10 +355,10 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.notThrowsAsync (test-tap/fixture/report/regular/traces-in-t-throws.js:20:25) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:20:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -381,10 +376,10 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - internal/process/next_tick.js:68:7 + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throwsAsync (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:24:4) + › process._tickCallback (internal/process/next_tick.js:68:7) @@ -406,8 +401,8 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 - test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - internal/process/next_tick.js:68:7 + › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + › t (test-tap/fixture/report/regular/traces-in-t-throws.js:28:11) + › process._tickCallback (internal/process/next_tick.js:68:7) ---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.regular.v12.log b/test-tap/reporters/verbose.regular.v12.log index 1ac6f9a39..2331d55ec 100644 --- a/test-tap/reporters/verbose.regular.v12.log +++ b/test-tap/reporters/verbose.regular.v12.log @@ -10,7 +10,7 @@ TypeError: test.serial.test is not a function - test-tap/fixture/report/regular/bad-test-chain.js:3:13 + › Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13) ---tty-stream-chunk-separator ✖ bad-test-chain.js exited with a non-zero exit code: 1 @@ -91,9 +91,9 @@ Error: Can’t catch me - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:549:17 - internal/timers.js:492:7 + › Timeout._onTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) + › listOnTimeout (internal/timers.js:549:17) + › processTimers (internal/timers.js:492:7) ---tty-stream-chunk-separator ✖ uncaught-exception.js exited with a non-zero exit code: 1 @@ -113,8 +113,7 @@ Error: Can’t catch me - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - async Promise.all (index 0) + › passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17) ---tty-stream-chunk-separator Unhandled rejection in unhandled-rejection.js @@ -142,8 +141,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/output-in-hook.js:34:4 - async Promise.all (index 1) + › test-tap/fixture/report/regular/output-in-hook.js:34:4 @@ -157,8 +155,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:9:22 - async Promise.all (index 1) + › test-tap/fixture/report/regular/test.js:9:22 @@ -167,8 +164,7 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing - new Promise () - async Promise.all (index 3) + ›  @@ -184,8 +180,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:18:4 - async Promise.all (index 4) + › test-tap/fixture/report/regular/test.js:18:4 @@ -202,8 +197,7 @@ - 'foo' + 'bar' - test-tap/fixture/report/regular/test.js:22:4 - async Promise.all (index 5) + › test-tap/fixture/report/regular/test.js:22:4 @@ -222,8 +216,7 @@ foo => '' - test-tap/fixture/report/regular/test.js:27:4 - async Promise.all (index 6) + › test-tap/fixture/report/regular/test.js:27:4 @@ -251,9 +244,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:32:9 - test-tap/fixture/report/regular/test.js:35:11 - async Promise.all (index 7) + › fn (test-tap/fixture/report/regular/test.js:32:9) + › test-tap/fixture/report/regular/test.js:35:11 @@ -281,9 +273,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:40:9 - test-tap/fixture/report/regular/test.js:43:14 - async Promise.all (index 8) + › fn (test-tap/fixture/report/regular/test.js:40:9) + › test-tap/fixture/report/regular/test.js:43:14 @@ -294,7 +285,7 @@ null - async Promise.all (index 9) + ›  @@ -316,10 +307,9 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - async Promise.all (index 0) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + › test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 @@ -337,10 +327,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - async Promise.all (index 1) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 @@ -358,10 +347,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - async Promise.all (index 2) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 @@ -379,10 +367,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - async Promise.all (index 3) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + › test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 @@ -404,8 +391,7 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 - test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - async Promise.all (index 4) + › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + › test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 ---tty-stream-chunk-separator diff --git a/test-tap/reporters/verbose.regular.v13.log b/test-tap/reporters/verbose.regular.v13.log index 1ac6f9a39..2331d55ec 100644 --- a/test-tap/reporters/verbose.regular.v13.log +++ b/test-tap/reporters/verbose.regular.v13.log @@ -10,7 +10,7 @@ TypeError: test.serial.test is not a function - test-tap/fixture/report/regular/bad-test-chain.js:3:13 + › Object. (test-tap/fixture/report/regular/bad-test-chain.js:3:13) ---tty-stream-chunk-separator ✖ bad-test-chain.js exited with a non-zero exit code: 1 @@ -91,9 +91,9 @@ Error: Can’t catch me - test-tap/fixture/report/regular/uncaught-exception.js:5:9 - internal/timers.js:549:17 - internal/timers.js:492:7 + › Timeout._onTimeout (test-tap/fixture/report/regular/uncaught-exception.js:5:9) + › listOnTimeout (internal/timers.js:549:17) + › processTimers (internal/timers.js:492:7) ---tty-stream-chunk-separator ✖ uncaught-exception.js exited with a non-zero exit code: 1 @@ -113,8 +113,7 @@ Error: Can’t catch me - test-tap/fixture/report/regular/unhandled-rejection.js:4:17 - async Promise.all (index 0) + › passes (test-tap/fixture/report/regular/unhandled-rejection.js:4:17) ---tty-stream-chunk-separator Unhandled rejection in unhandled-rejection.js @@ -142,8 +141,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/output-in-hook.js:34:4 - async Promise.all (index 1) + › test-tap/fixture/report/regular/output-in-hook.js:34:4 @@ -157,8 +155,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:9:22 - async Promise.all (index 1) + › test-tap/fixture/report/regular/test.js:9:22 @@ -167,8 +164,7 @@ Error: Test was expected to fail, but succeeded, you should stop marking the test as failing - new Promise () - async Promise.all (index 3) + ›  @@ -184,8 +180,7 @@ Test failed via `t.fail()` - test-tap/fixture/report/regular/test.js:18:4 - async Promise.all (index 4) + › test-tap/fixture/report/regular/test.js:18:4 @@ -202,8 +197,7 @@ - 'foo' + 'bar' - test-tap/fixture/report/regular/test.js:22:4 - async Promise.all (index 5) + › test-tap/fixture/report/regular/test.js:22:4 @@ -222,8 +216,7 @@ foo => '' - test-tap/fixture/report/regular/test.js:27:4 - async Promise.all (index 6) + › test-tap/fixture/report/regular/test.js:27:4 @@ -251,9 +244,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:32:9 - test-tap/fixture/report/regular/test.js:35:11 - async Promise.all (index 7) + › fn (test-tap/fixture/report/regular/test.js:32:9) + › test-tap/fixture/report/regular/test.js:35:11 @@ -281,9 +273,8 @@ https://github.com/avajs/ava/blob/v1.0.0-beta.5.1/docs/03-assertions.md#throwsfn-expected-message - test-tap/fixture/report/regular/test.js:40:9 - test-tap/fixture/report/regular/test.js:43:14 - async Promise.all (index 8) + › fn (test-tap/fixture/report/regular/test.js:40:9) + › test-tap/fixture/report/regular/test.js:43:14 @@ -294,7 +285,7 @@ null - async Promise.all (index 9) + ›  @@ -316,10 +307,9 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:17 - test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 - async Promise.all (index 0) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throws.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:12:17) + › test-tap/fixture/report/regular/traces-in-t-throws.js:12:4 @@ -337,10 +327,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 - test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 - async Promise.all (index 1) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:20 + › test-tap/fixture/report/regular/traces-in-t-throws.js:16:4 @@ -358,10 +347,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 - test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 - async Promise.all (index 2) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:25 + › test-tap/fixture/report/regular/traces-in-t-throws.js:20:4 @@ -379,10 +367,9 @@ message: 'uh-oh', } - test-tap/fixture/report/regular/traces-in-t-throws.js:4:8 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:22 - test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 - async Promise.all (index 3) + › throwError (test-tap/fixture/report/regular/traces-in-t-throws.js:4:8) + › t.throwsAsync.instanceOf (test-tap/fixture/report/regular/traces-in-t-throws.js:24:22) + › test-tap/fixture/report/regular/traces-in-t-throws.js:24:4 @@ -404,8 +391,7 @@ Function TypeError {} - test-tap/fixture/report/regular/traces-in-t-throws.js:8:24 - test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 - async Promise.all (index 4) + › returnRejectedPromise (test-tap/fixture/report/regular/traces-in-t-throws.js:8:24) + › test-tap/fixture/report/regular/traces-in-t-throws.js:28:11 ---tty-stream-chunk-separator From ee9ddebf026f8366ba73c6d2a59527ea20c6d728 Mon Sep 17 00:00:00 2001 From: Mark Wubben Date: Sun, 19 Apr 2020 15:10:38 +0200 Subject: [PATCH 14/14] =?UTF-8?q?Windows=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/serialize-error.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/serialize-error.js b/lib/serialize-error.js index a88e146a4..3a6e24078 100644 --- a/lib/serialize-error.js +++ b/lib/serialize-error.js @@ -3,6 +3,7 @@ const path = require('path'); const cleanYamlObject = require('clean-yaml-object'); const concordance = require('concordance'); const isError = require('is-error'); +const slash = require('slash'); const StackUtils = require('stack-utils'); const assert = require('./assert'); const concordanceOptions = require('./concordance-options').default; @@ -22,11 +23,12 @@ function extractSource(stack, testFile) { } // Normalize the test file so it matches `callSite.file`. - const posixTestFile = path.posix.relative(process.cwd(), testFile); + const relFile = path.relative(process.cwd(), testFile); + const normalizedFile = process.platform === 'win32' ? slash(relFile) : relFile; for (const line of stack.split('\n')) { try { const callSite = stackUtils.parseLine(line); - if (callSite.file === posixTestFile) { + if (callSite.file === normalizedFile) { return { isDependency: false, isWithinProject: true,