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
Fix: newBasePath should be an absolute path (fixes #12850) #13078
Conversation
ef9da19
to
c4b191d
Compare
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.
Thank you for your work.
Hmm. It may be a different opinion from the other team members, but I think that we should not stub the internal of IgnorePattern
class.
Because we have CI for each environment, I think that the important here is to add tests for variable cases. For example,
- full different paths (
/aaa/foo.js
vs/bbb/bar.js
, orc:\foo.js
vsd:\bar.js
) - different paths except for the top-level directory (
/aaa/foo.js
vs/aaa/bar.js
, orc:\foo.js
vsc:\bar.js
)
If the drive letters are a special concept, we can add special tests only on the win32 platform, instead of mocking. (for example, (process.platform === "win32" ? describe : xdescribe)("Drive Letter", () => { /* special tests */ })
)
That said, if the other team members want it, I don't oppose stubbing.
@mysticatea thankyou for your feedback. The scenario of adding tests across patterns starting with root of the drive and without stubbing anything within IgnorePattern is already covered in the code i added at line 132 - additional coverage on Windows CI nodes has already been added for following paths by line 132: additional coverage on *nix CI nodes has already been added by line 132 for: I think this change has more then enough coverage added to both test the change and catch any future regressions. From my point of view there is nothing more to be done here. Let me know if you think otherwise. |
My intention isn't to hold up this PR. If we have adequate coverage and others are okay with the current tests, I'll defer to them. |
@nickharris as it seems several team members are a bit confused about what is covered, could you add some comments in the test file reiterating what you’ve explained in the comments on this PR? |
@nzakas sure thing - done in latest commit. Thanks all! |
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.
LGTM, thanks for sticking with this.
@kaicataldo no problems at all! |
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.
Awesome, thanks so much.
anything else required from me here? |
@nickharris - not at this time. We tend to leave PRs open a bit just to make sure other teams members get a chance to chime in, too. |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[X] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
What changes did you make? (Give an overview)
fixes #12850
Is there anything you'd like reviewers to focus on?