-
Notifications
You must be signed in to change notification settings - Fork 1.4k
remove color from test title in mini reporter #618
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,19 +70,16 @@ MiniReporter.prototype.prefix = function (str) { | |
| }; | ||
|
|
||
| MiniReporter.prototype._test = function (test) { | ||
| var title; | ||
| var title = test.title; | ||
|
|
||
| if (test.todo) { | ||
| title = colors.todo('- ' + test.title); | ||
| this.todoCount++; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't you keep the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No point. The test is not run anyways, so it finishes faster than a human could see.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If a human can not see
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But wait, if the next test is slow, user theoretically can actually see skip/todo tests. So I guess we should keep the prefix and color. Also, what about changing prefixes to these?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's what this PR does.
How about we just not show them all together? So if a slow test is running, the last actual test is shown, not todo/skip.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yep! |
||
| } else if (test.skip) { | ||
| title = colors.skip('- ' + test.title); | ||
| this.skipCount++; | ||
| } else if (test.error) { | ||
| title = colors.error(test.title); | ||
| this.failCount++; | ||
| } else { | ||
| title = colors.pass(test.title); | ||
| this.passCount++; | ||
| } | ||
|
|
||
|
|
||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we manually count these in the reporter? Shouldn't it be provided by the API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've wondered that too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, that should be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I recall, the API does track this, but it's not provided until the
finishevent. The mini reporter is the only reporter that cares about the live count.