-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: fix error when foo in path to git clone #14506
Closed
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0bd6ac8
"test: fix error when foo in path to git clone
SwimmingSage 8d7445c
"test assert: edit to regex error when foo in path to git clone
SwimmingSage 8bcca8f
"test assert: edit to test case when foo is in path to git clone
SwimmingSage ed89e4b
"test assert: update to prior commit, more specific regex
SwimmingSage 441a7b4
"test assert: update to previous commit of regex
SwimmingSage File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
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.
This is enough to cover
/path/with/foo/node
, but it wouldn’t catch e.g./path/with/foo-bar/node
(or, for that matter, Windows paths that use\
), right?It still looks good to me as it’s strictly an improvement, but maybe there are better options.
It might be enough if the regex checks for
(whitespace)at foo
, because that’s how the function names show up?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.
Ok, I was unsure of what this error would actually look like, as the error message I received was in this block:
So I simply tried to catch for that case, would you happen to know by chance where in that block foo would be mentioned if an actual error went off? I didn't want to be too specific as I was worried about interfering when there actually should be an error. But I definitely agree that this can be made more specific
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.
Oh sorry, I just saw that you did in fact mention that, my apologies, I will edit it for:
(whitespace)at foo
Thank your for your feedback!
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.
What this part of the test verifies is that the last argument to
assert.fail
infunction foo() { assert.fail('first', 'second', 'message', '!==', foo); },
(the, foo
one) is not ignored. If you remove that bit, you’ll see something like an additionalat foo
line near the top.(Since this is obviously not obvious, you could add a comment here that explains what the test does as well?)
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.
Ok, will do, thanks!
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.
BTW, it seems that
/m
flag is redundant here, as it is useful only if^$
symbols are used.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.
Ok, I'll get rid of that then, thank you for the feedback!