-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Remove timestamp from non-watch test runs #838
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
Conversation
Yea. Having to add the time in all those tests should've been a clue that time was being output too much. Passing the boolean is a bit awkward, but I think it's OK. Ideally the logger understands test runs, so we don't have to interact with it as precisely as we do in the watcher. |
Fixed tests. |
Can probably move these two lines into the new test now. LGTMO! |
I think we should pass an options object to the reporter constructor with static details/config like It definitely shouldn't be a boolean param. |
Good idea—just pushed some changes to make that work. |
cli.js
Outdated
reporter = verboseReporter(); | ||
} else { | ||
reporter = miniReporter(); | ||
reporter = miniReporter({isWatching: cli.flags.watch}); |
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.
isWatching
=> watching
Just so we're all on the same page about reporter constructor options. IMO, I think the reporters should avoid maintaining any mutable state, especially as it relates to the test run status. We are violating that rule in a couple spots now (my fault, I was supposed to follow up after merging the PR that introduced I do think it's fine to pass immutable config values that will never change during the test run (i.e. |
Pushed the changes (and thanks for the explanation, makes sense). |
Move the two lines @novemberborn talked about here into the test that uses it. Once you've done that (and tests pass), go ahead and merge. |
Fixes #775.
WIP because I need to add some tests + need more review especially for testing. Would it be better to remove the
time
from all the modified tests if I have some specific tests that do test time on watch?