Replies: 1 comment 1 reply
-
Sounds reasonable. You can create an enhancement issue, maybe someone will pick it up and create a PR. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
To me, it seems weird that paths provided on the CLI don't resolve relative to the working directory. Making it relative to "root" in the config file itself totally makes sense, but those aren't mutually exclusive.
The problem, in my opinion, is that basically every other CLI respects the working directory, so it is very unexpected for Vitest to behave differently.
This creates a lot of friction for me, because I need to know/look up the value of the "root" configuration every time I use the CLI in a different project. Usually when I provide a path on the CLI I am most likely not trying to talk about a root-relative path in my experience.
#2459 also shows that it might unnecessarily complicate integration with tools, because they would have to parse the config in an attempt to provide correctly resolved paths, or use absolute paths for everything as a workaround, potentially requiring special attention for Vitest as opposed to other tools.
I might have overlooked a particular reason for this design decision, so I would like to get some insight.
Beta Was this translation helpful? Give feedback.
All reactions