Draft
Conversation
Collaborator
|
Review requested:
|
Member
JakobJingleheimer
left a comment
There was a problem hiding this comment.
Looking good so far. I expected to see a loop somewhere; did you merely not get to that yet (since this is a draft) or did I miss some magic somewhere?
PS Sorry this took me a while to get to.
Comment on lines
74
to
+92
| @@ -87,6 +87,9 @@ function formatTestReport(type, data, showErrorDetails = true, prefix = '', inde | |||
| } | |||
| } else if (expectFailure !== undefined) { | |||
| title += ` # EXPECTED FAILURE`; | |||
| } else if (flaky !== undefined && flaky > 0) { | |||
| const retryText = flaky === 1 ? 're-try' : 're-tries'; | |||
| title += ` # FLAKY ${flaky} ${retryText}`; | |||
| let { fn, name, parent } = options; | ||
| const { concurrency, entryFile, expectFailure, loc, only, timeout, todo, skip, signal, plan } = options; | ||
|
|
||
| const { concurrency, entryFile, expectFailure, flaky, loc, only, timeout, todo, skip, signal, plan } = options; |
Member
There was a problem hiding this comment.
nit: this is getting really long
Suggested change
| const { concurrency, entryFile, expectFailure, flaky, loc, only, timeout, todo, skip, signal, plan } = options; | |
| const { | |
| entryFile, | |
| expectFailure, | |
| flaky, | |
| loc, | |
| only, | |
| plan, | |
| signal, | |
| skip, | |
| timeout, | |
| todo, | |
| concurrency, | |
| } = options; |
Member
There was a problem hiding this comment.
I think this should not be committed?
Comment on lines
68
to
+84
| @@ -78,6 +78,10 @@ function reportTest(nesting, testNumber, status, name, skip, todo, expectFailure | |||
| line += ` # TODO${typeof todo === 'string' && todo.length ? ` ${tapEscape(todo)}` : ''}`; | |||
| } else if (expectFailure !== undefined) { | |||
| line += ' # EXPECTED FAILURE'; | |||
| //should we use flaky >=0 here? for always printing 0 retries | |||
| } else if (flaky !== undefined && flaky > 0) { | |||
| const retryText = flaky === 1 ? 're-try' : 're-tries'; | |||
| line += ` # FLAKY ${flaky} ${retryText}`; | |||
Member
There was a problem hiding this comment.
In the feature proposal, the output cites the number of re-tries it took to succeed. So I think the name for flaky should be changed to something like flakyRetriedCount to disambiguate it with the maximum number of re-tries to attempt.
# FLAKY 42 re-tries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
nodejs/test-runner - Feature proposal:
flaky