-
-
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
Adding ANY config fails all tests #4937
Comments
This is not what you are literally doing, and you can see that if you literally did that. Please provide a minimal reproduction. |
Hello @thany. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
https://github.com/thany/vitest-error Make sure you're on Node.js 20.10. It should succeed. But then, try uncommenting the config in |
Hey, thanks for the repro. It looks like you're using This documentation might help you understand the difference: |
I see. Whoops. But you've got to admit, the error you get is pretty obscure, isn't it? It doesn't look like it has anything to do with where it expects (or doesn't expect) a config to be placed. On a related note: isn't it possible then, to separate Vite and Vitest configs into different files? Apparently the setup file is not the right place, so does it look for a different one in addition? |
its literally in the docs |
I get that it's obscure but I think that error is happening due to Closing since this is working intended. To separate configs, you can use |
Describe the bug
Adding any config in vitest.config.ts, will fail every single test. If I leave the file empty or non-existent, tests run normally.
Even exporting an empty config will fail all tests, like this:
Reproduction
Just add config. Sorry but that's literally what I'm doing.
or this:
It always makes them fail.
I do also have to have
import '@testing-library/jest-dom/vitest';
in there, but that one doesn't do anything with config.System Info
All packages are up to date to their latest stable versions.
The text was updated successfully, but these errors were encountered: