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 all 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: 2 additions & 1 deletion lib/reporters/default.js
Expand Up @@ -515,7 +515,8 @@ export default class Reporter {

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

if (!event.logs || event.logs.length === 0) {
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.

}

Expand Down
4 changes: 0 additions & 4 deletions test-tap/reporters/default.regular.v12.log
Expand Up @@ -204,10 +204,6 @@


test › logs

ℹ hello
ℹ world

test.cjs:18

17: t.log('world');
Expand Down
4 changes: 0 additions & 4 deletions test-tap/reporters/default.regular.v14.log
Expand Up @@ -204,10 +204,6 @@


test › logs

ℹ hello
ℹ world

test.cjs:18

17: t.log('world');
Expand Down
4 changes: 0 additions & 4 deletions test-tap/reporters/default.regular.v16.log
Expand Up @@ -204,10 +204,6 @@


test › logs

ℹ hello
ℹ world

test.cjs:18

17: t.log('world');
Expand Down
4 changes: 0 additions & 4 deletions test-tap/reporters/default.regular.v17.log
Expand Up @@ -204,10 +204,6 @@


test › logs

ℹ hello
ℹ world

test.cjs:18

17: t.log('world');
Expand Down