-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
test: pretty test output #1085
test: pretty test output #1085
Conversation
Problem: On hangs, test output is hard to read. Solution: Print test name before starting. Bonus: Also print an approximation of how long each test takes to run. For markedjs#1084.
I or @UziTech (most likely) would like to maybe start contributing directly to this PR - unless you would like to continue working on it yourself. Therefore, I'm curious, would you be okay with us working directly on it; or, is the intention for us to review it and you update it?? |
Additional contributions here are welcome. I do not plan to make further additions to this PR. I'll keep poking at #1083 as needed. |
Actually, now that I've actually done the review, seems like you've covered all the bases and then some (whitespacing over). Well done! |
// returns time to millisecond granularity | ||
function prettyElapsedTime(hrtimeElapsed) { | ||
var seconds = hrtimeElapsed[0]; | ||
var fracInMs = Math.round(hrtimeElapsed[1] / 1e6); |
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.
Not sure how hard up we are for the ms
instead of seconds. Can we go to the second or third floating point??
0.001
LGTM! Not a lot of possibility for negative impact. Merging. |
test: pretty test output
Description
Problem:
On hangs, test output is hard to read.
Solution:
Print test name before starting.
Bonus:
Also print an approximation of how long each test takes to run.
Fixes #1084.
Submitter
package.json
has been updated (see RELEASE.md).marked.min.js
has been updated; or,Reviewer
@joshbruce @UziTech