Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove logs from test failure summary #3013

Merged
merged 9 commits into from May 16, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions lib/reporters/default.js
Expand Up @@ -515,9 +515,6 @@ export default class Reporter {

writeFailure(event) {
this.lineWriter.writeLine(colors.title(this.prefixTitle(event.testFile, event.title)));
if (!this.writeLogs(event, true)) {
this.lineWriter.writeLine();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the diff, I think we need this empty line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added the empty line. According to the existing logic, an empty line will be added when there are no logs.

}

this.writeErr(event);
}
Expand Down
23 changes: 0 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast.v12.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast.v14.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast.v16.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast.v17.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast2.v12.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast2.v14.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast2.v16.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
1 change: 0 additions & 1 deletion test-tap/reporters/default.failfast2.v17.log
Expand Up @@ -5,7 +5,6 @@
─

a › fails

a.cjs:3

2:
Expand Down
16 changes: 0 additions & 16 deletions test-tap/reporters/default.regular.v12.log
Expand Up @@ -118,7 +118,6 @@
─

nested-objects › format with max depth 4

nested-objects.cjs:29

28: };
Expand Down Expand Up @@ -147,7 +146,6 @@


nested-objects › format like with max depth 4

nested-objects.cjs:55

54: };
Expand All @@ -170,7 +168,6 @@


output-in-hook › failing test

output-in-hook.cjs:34

33: test('failing test', t => {
Expand All @@ -184,7 +181,6 @@


test › fails

test.cjs:9

8:
Expand All @@ -198,16 +194,11 @@


test › no longer failing

Error: Test was expected to fail, but succeeded, you should stop marking the test as failing



test › logs

ℹ hello
ℹ world

test.cjs:18

17: t.log('world');
Expand All @@ -221,7 +212,6 @@


test › formatted

test.cjs:22

21: test('formatted', t => {
Expand All @@ -238,15 +228,13 @@


test › implementation throws non-error

Error thrown in test:

null



traces-in-t-throws › throws

traces-in-t-throws.cjs:12

11: test('throws', t => {
Expand All @@ -270,7 +258,6 @@


traces-in-t-throws › notThrows

traces-in-t-throws.cjs:16

15: test('notThrows', t => {
Expand All @@ -290,7 +277,6 @@


traces-in-t-throws › notThrowsAsync

traces-in-t-throws.cjs:20

19: test('notThrowsAsync', t => {
Expand All @@ -310,7 +296,6 @@


traces-in-t-throws › throwsAsync

traces-in-t-throws.cjs:24

23: test('throwsAsync', t => {
Expand All @@ -330,7 +315,6 @@


traces-in-t-throws › throwsAsync different error

traces-in-t-throws.cjs:27

26:
Expand Down
16 changes: 0 additions & 16 deletions test-tap/reporters/default.regular.v14.log
Expand Up @@ -118,7 +118,6 @@
─

nested-objects › format with max depth 4

nested-objects.cjs:29

28: };
Expand Down Expand Up @@ -147,7 +146,6 @@


nested-objects › format like with max depth 4

nested-objects.cjs:55

54: };
Expand All @@ -170,7 +168,6 @@


output-in-hook › failing test

output-in-hook.cjs:34

33: test('failing test', t => {
Expand All @@ -184,7 +181,6 @@


test › fails

test.cjs:9

8:
Expand All @@ -198,16 +194,11 @@


test › no longer failing

Error: Test was expected to fail, but succeeded, you should stop marking the test as failing



test › logs

ℹ hello
ℹ world

test.cjs:18

17: t.log('world');
Expand All @@ -221,7 +212,6 @@


test › formatted

test.cjs:22

21: test('formatted', t => {
Expand All @@ -238,15 +228,13 @@


test › implementation throws non-error

Error thrown in test:

null



traces-in-t-throws › throws

traces-in-t-throws.cjs:12

11: test('throws', t => {
Expand All @@ -270,7 +258,6 @@


traces-in-t-throws › notThrows

traces-in-t-throws.cjs:16

15: test('notThrows', t => {
Expand All @@ -290,7 +277,6 @@


traces-in-t-throws › notThrowsAsync

traces-in-t-throws.cjs:20

19: test('notThrowsAsync', t => {
Expand All @@ -310,7 +296,6 @@


traces-in-t-throws › throwsAsync

traces-in-t-throws.cjs:24

23: test('throwsAsync', t => {
Expand All @@ -330,7 +315,6 @@


traces-in-t-throws › throwsAsync different error

traces-in-t-throws.cjs:27

26:
Expand Down