8000 Upgrade supertap and print `t.log` entries according to TAP diagnosti… · avajs/ava@99ab93a · GitHub
[go: up one dir, main page]

Skip to content

Commit 99ab93a

Browse files
tymfearDaudov, Tymurnovemberborn
authored
Upgrade supertap and print t.log entries according to TAP diagnostics spec
Co-authored-by: Daudov, Tymur <tymur.daudov@f-secure.com> Co-authored-by: Mark Wubben <mark@novemberborn.net>
1 parent 5d3b200 commit 99ab93a

23 files changed

+219
-346
lines changed

lib/reporters/tap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class TapReporter {
125125
this.reportStream.write(`# ${stripAnsi(title)}${os.EOL}`);
126126
if (evt.logs) {
127127
for (const log of evt.logs) {
128-
const logLines = indentString(log, 4).replace(/^ {4}/, ' # ');
128+
const logLines = indentString(log, 4).replace(/^ {4}/gm, '# ');
129129
this.reportStream.write(`${logLines}${os.EOL}`);
130130
}
131131
}

package-lock.json

Lines changed: 69 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"source-map-support": "^0.5.19",
107107
"stack-utils": "^2.0.3",
108108
"strip-ansi": "^6.0.0",
109-
"supertap": "^1.0.0",
109+
"supertap": "^2.0.0",
110110
"temp-dir": "^2.0.0",
111111
"trim-off-newlines": "^1.0.1",
112112
"update-notifier": "^5.0.1",

test-tap/reporters/tap.edgecases.v10.log

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
TAP version 13
22
---tty-stream-chunk-separator
3-
# No tests found in ava-import-no-test-declaration.js
43
not ok 1 - No tests found in ava-import-no-test-declaration.js
54
---tty-stream-chunk-separator
6-
# TypeError: test is not a function
75
not ok 2 - TypeError: test is not a function
86
---
97
name: TypeError
@@ -13,21 +11,17 @@ not ok 2 - TypeError: test is not a function
1311
(test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1)
1412
...
1513
---tty-stream-chunk-separator
16-
# import-and-use-test-member.js exited with a non-zero exit code: 1
1714
not ok 3 - import-and-use-test-member.js exited with a non-zero exit code: 1
1815
---tty-stream-chunk-separator
19-
# No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2016
not ok 4 - No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2117
---tty-stream-chunk-separator
22-
# Error: throws
2318
not ok 5 - Error: throws
2419
---
2520
name: Error
2621
message: throws
2722
at: 'Object.<anonymous> (test-tap/fixture/report/edgecases/throws.js:1:7)'
2823
...
2924
---tty-stream-chunk-separator
30-
# throws.js exited with a non-zero exit code: 1
3125
not ok 6 - throws.js exited with a non-zero exit code: 1
3226
---tty-stream-chunk-separator
3327

test-tap/reporters/tap.edgecases.v12.log

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
TAP version 13
22
---tty-stream-chunk-separator
3-
# No tests found in ava-import-no-test-declaration.js
43
not ok 1 - No tests found in ava-import-no-test-declaration.js
54
---tty-stream-chunk-separator
6-
# TypeError: test is not a function
75
not ok 2 - TypeError: test is not a function
86
---
97
name: TypeError
@@ -13,21 +11,17 @@ not ok 2 - TypeError: test is not a function
1311
(test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1)
1412
...
1513
---tty-stream-chunk-separator
16-
# import-and-use-test-member.js exited with a non-zero exit code: 1
1714
not ok 3 - import-and-use-test-member.js exited with a non-zero exit code: 1
1815
---tty-stream-chunk-separator
19-
# No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2016
not ok 4 - No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2117
---tty-stream-chunk-separator
22-
# Error: throws
2318
not ok 5 - Error: throws
2419
---
2520
name: Error
2621
message: throws
2722
at: 'Object.<anonymous> (test-tap/fixture/report/edgecases/throws.js:1:7)'
2823
...
2924
---tty-stream-chunk-separator
30-
# throws.js exited with a non-zero exit code: 1
3125
not ok 6 - throws.js exited with a non-zero exit code: 1
3226
---tty-stream-chunk-separator
3327

test-tap/reporters/tap.edgecases.v14.log

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
TAP version 13
22
---tty-stream-chunk-separator
3-
# No tests found in ava-import-no-test-declaration.js
43
not ok 1 - No tests found in ava-import-no-test-declaration.js
54
---tty-stream-chunk-separator
6-
# TypeError: test is not a function
75
not ok 2 - TypeError: test is not a function
86
---
97
name: TypeError
@@ -13,21 +11,17 @@ not ok 2 - TypeError: test is not a function
1311
(test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1)
1412
...
1513
---tty-stream-chunk-separator
16-
# import-and-use-test-member.js exited with a non-zero exit code: 1
1714
not ok 3 - import-and-use-test-member.js exited with a non-zero exit code: 1
1815
---tty-stream-chunk-separator
19-
# No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2016
not ok 4 - No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2117
---tty-stream-chunk-separator
22-
# Error: throws
2318
not ok 5 - Error: throws
2419
---
2520
name: Error
2621
message: throws
2722
at: 'Object.<anonymous> (test-tap/fixture/report/edgecases/throws.js:1:7)'
2823
...
2924
---tty-stream-chunk-separator
30-
# throws.js exited with a non-zero exit code: 1
3125
not ok 6 - throws.js exited with a non-zero exit code: 1
3226
---tty-stream-chunk-separator
3327

test-tap/reporters/tap.edgecases.v15.log

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
TAP version 13
22
---tty-stream-chunk-separator
3-
# No tests found in ava-import-no-test-declaration.js
43
not ok 1 - No tests found in ava-import-no-test-declaration.js
54
---tty-stream-chunk-separator
6-
# TypeError: test is not a function
75
not ok 2 - TypeError: test is not a function
86
---
97
name: TypeError
@@ -13,21 +11,17 @@ not ok 2 - TypeError: test is not a function
1311
(test-tap/fixture/report/edgecases/import-and-use-test-member.js:3:1)
1412
...
1513
---tty-stream-chunk-separator
16-
# import-and-use-test-member.js exited with a non-zero exit code: 1
1714
not ok 3 - import-and-use-test-member.js exited with a non-zero exit code: 1
1815
---tty-stream-chunk-separator
19-
# No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2016
not ok 4 - No tests found in no-ava-import.js, make sure to import "ava" at the top of your test file
2117
---tty-stream-chunk-separator
22-
# Error: throws
2318
not ok 5 - Error: throws
2419
---
2520
name: Error
2621
message: throws
2722
at: 'Object.<anonymous> (test-tap/fixture/report/edgecases/throws.js:1:7)'
2823
...
2924
---tty-stream-chunk-separator
30-
# throws.js exited with a non-zero exit code: 1
3125
not ok 6 - throws.js exited with a non-zero exit code: 1
3226
---tty-stream-chunk-separator
3327

test-tap/reporters/tap.failfast.v10.log

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
TAP version 13
22
---tty-stream-chunk-separator
3-
# a › fails
4-
not ok 1 - a › fails
3+
not ok 1 - a › fails
54
---
65
name: AssertionError
76
message: Test failed via `t.fail()`

test-tap/reporters/tap.failfast.v12.log

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
TAP version 13
22
---tty-stream-chunk-separator
3-
# a › fails
4-
not ok 1 - a › fails
3+
not ok 1 - a › fails
54
---
65
name: AssertionError
76
message: Test failed via `t.fail()`

test-tap/reporters/tap.failfast.v14.log

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
TAP version 13
22
---tty-stream-chunk-separator
3-
# a › fails
4-
not ok 1 - a › fails
3+
not ok 1 - a › fails
54
---
65
name: AssertionError
76
message: Test failed via `t.fail()`

0 commit comments

Comments
 (0)
0