-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
vitest imports file from cwd directy instead of node module if the names are identical #4860
Comments
This is an issue with how Vite resolves modules. I opened an issue at vitejs/vite#15500 |
After more investigation, I didn't find any errors: It prints: tsoa {
Deprecated: [Getter],
Example: [Getter],
Body: [Getter],
BodyProp: [Getter],
... |
Hello @ValentinGurkov. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
I've also run this again and the issue did not reproduce. |
Describe the bug
In the first example below you will see a test file that imports the
tsoa
library andconsole.log
s everything inside it.Due to a
tsoa.json
existing at the root, the file is read instead and its' contents logged into the console instead of the package's contents.In the second example
tsoa.json
is renamed totsoa.config.json
. Since the names are no longer identical, the package contents are logged instead of JSON files.#2788 already reported something similar but was closed by the author.
For what it's worth, I'm migrating from
jest
and the same scenario is not reproducible there.Reproduction
With identical name
npm run test
in the terminalWhen the names are not identical
npm run test
in the terminalSystem Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: