diff --git a/lib/reporter/tap.js b/lib/reporter/tap.js index b424cd7bb..f21781f72 100644 --- a/lib/reporter/tap.js +++ b/lib/reporter/tap.js @@ -12,7 +12,11 @@ function generateTest(mod, count) { mod.error = mod.error.message; } var error = mod.error ? [directive, mod.error].join(' ') : ''; - var output = mod.testOutput ? '\n' + util.sanitizeOutput(mod.testOutput, '# ') : ''; + if (mod.testOutput && mod.testOutput.length > 0) { + var output = '\n ---\n' + util.sanitizeOutput(mod.testOutput, ' #') + '\n ...'; + } else { + output = ''; + } return [result, count + 1, '-', mod.name, 'v' + mod.version + error + output].join(' '); } diff --git a/test/fixtures/test-out-tap-failing.txt b/test/fixtures/test-out-tap-failing.txt index ba50f1a0f..43e93cfb0 100644 --- a/test/fixtures/test-out-tap-failing.txt +++ b/test/fixtures/test-out-tap-failing.txt @@ -1,7 +1,11 @@ TAP version 13 ok 1 - iPass v4.2.2 ok 2 - iFlakyFail v3.3.3 # SKIP I dun wurk -# Thanks for testing! + --- + # Thanks for testing! + ... not ok 3 - iFail v3.0.1 I dun wurk -# Thanks for testing! + --- + # Thanks for testing! + ... 1..3 diff --git a/test/fixtures/test-out-tap-passing-append.txt b/test/fixtures/test-out-tap-passing-append.txt index 407e0fdb3..591de7e9c 100644 --- a/test/fixtures/test-out-tap-passing-append.txt +++ b/test/fixtures/test-out-tap-passing-append.txt @@ -2,5 +2,7 @@ This is a test! TAP version 13 ok 1 - iPass v4.2.2 ok 2 - iFlakyPass v3.0.1 -# Thanks for testing! + --- + # Thanks for testing! + ... 1..2 diff --git a/test/fixtures/test-out-tap-passing.txt b/test/fixtures/test-out-tap-passing.txt index c77f22378..22e710bd0 100644 --- a/test/fixtures/test-out-tap-passing.txt +++ b/test/fixtures/test-out-tap-passing.txt @@ -1,5 +1,7 @@ TAP version 13 ok 1 - iPass v4.2.2 ok 2 - iFlakyPass v3.0.1 -# Thanks for testing! + --- + # Thanks for testing! + ... 1..2