diff --git a/lib/reporters/tap.js b/lib/reporters/tap.js index 9955eed8e..1d89cdeff 100644 --- a/lib/reporters/tap.js +++ b/lib/reporters/tap.js @@ -41,7 +41,7 @@ function dumpError(error) { } if (error.stack) { - obj.at = error.stack.split('\n')[0]; + obj.at = error.stack; } return obj; diff --git a/test/reporters/tap.regular.log b/test/reporters/tap.regular.log index 40959800c..9e136cbc3 100644 --- a/test/reporters/tap.regular.log +++ b/test/reporters/tap.regular.log @@ -57,7 +57,10 @@ not ok 10 - traces-in-t-throws › throws message: 'uh-oh', } 'Expected instance of:': 'Function TypeError {}' - at: 'throwError (traces-in-t-throws.js:4:8)' + at: |- + throwError (traces-in-t-throws.js:4:8) + throwError (traces-in-t-throws.js:12:17) + throws (traces-in-t-throws.js:12:4) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrows @@ -70,7 +73,10 @@ not ok 11 - traces-in-t-throws › notThrows Error { message: 'uh-oh', } - at: 'throwError (traces-in-t-throws.js:4:8)' + at: |- + throwError (traces-in-t-throws.js:4:8) + throwError (traces-in-t-throws.js:16:20) + notThrows (traces-in-t-throws.js:16:4) ... ---tty-stream-chunk-separator # traces-in-t-throws › notThrowsAsync @@ -83,7 +89,10 @@ not ok 12 - traces-in-t-throws › notThrowsAsync Error { message: 'uh-oh', } - at: 'throwError (traces-in-t-throws.js:4:8)' + at: |- + throwError (traces-in-t-throws.js:4:8) + throwError (traces-in-t-throws.js:20:25) + notThrowsAsync (traces-in-t-throws.js:20:4) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync @@ -96,7 +105,10 @@ not ok 13 - traces-in-t-throws › throwsAsync Error { message: 'uh-oh', } - at: 'throwError (traces-in-t-throws.js:4:8)' + at: |- + throwError (traces-in-t-throws.js:4:8) + throwError (traces-in-t-throws.js:24:22) + throwsAsync (traces-in-t-throws.js:24:4) ... ---tty-stream-chunk-separator # traces-in-t-throws › throwsAsync different error @@ -110,7 +122,9 @@ not ok 14 - traces-in-t-throws › throwsAsync different erro message: 'uh-oh', } 'Expected instance of:': 'Function TypeError {}' - at: 'returnRejectedPromise (traces-in-t-throws.js:8:24)' + at: |- + returnRejectedPromise (traces-in-t-throws.js:8:24) + throwsAsync (traces-in-t-throws.js:28:11) ... ---tty-stream-chunk-separator stdout @@ -192,7 +206,9 @@ not ok 24 - test › bad throws Error { message: 'err', } - at: 'fn (test.js:35:9)' + at: |- + fn (test.js:35:9) + fn (test.js:38:11) ... ---tty-stream-chunk-separator # test › bad notThrows @@ -206,7 +222,9 @@ not ok 25 - test › bad notThrows Error { message: 'err', } - at: 'fn (test.js:43:9)' + at: |- + fn (test.js:43:9) + fn (test.js:46:14) ... ---tty-stream-chunk-separator # test › implementation throws non-error