Skip to content

Commit

Permalink
reporter: update to use TAP 13
Browse files Browse the repository at this point in the history
Use yamlish instead of # to match community:
nodejs/node#9262
  • Loading branch information
George Adams committed Nov 21, 2016
1 parent a7346e3 commit 53796bd
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
6 changes: 5 additions & 1 deletion lib/reporter/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ');
}

Expand Down
8 changes: 6 additions & 2 deletions test/fixtures/test-out-tap-failing.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion test/fixtures/test-out-tap-passing-append.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion test/fixtures/test-out-tap-passing.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 53796bd

Please sign in to comment.