-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Invalid config from browser creator #7403
Comments
vitest/packages/vitest/src/create/browser/creator.ts Lines 257 to 278 in c82387d
vitest/packages/vitest/src/create/browser/creator.ts Lines 292 to 310 in c82387d
|
Thanks, I read the source but forgot to include links. Is all that's needed a replacement of |
Yes, that should be all. But if you want to add the tests mentioned in |
I can't promise I'll have time to implement tests, but if you (or other maintainers) have any preferences among the types of tests I listed, I'm interested. FWIW I know the Vite community tends to prefer E2E tests, and that would probably be the most robust option. |
We prefer e2e-tests too. In these test cases we are running Vitest either via CLI bin or using the Vitest's Node API. For this bug we should add test case to vitest/test/cli/test/tty.test.ts Lines 4 to 5 in 191ef9e
|
Describe the bug
I was confused when trying to use
vitest init browser
because it writes a nonexistenttest.browser.configs
config option, producing an invalid config. It seems like this should betest.browser.instances
, though the documentation and TypeScript types are correct.Reproduction
Run
vitest init browser
with any options, then view the generated config.Config patch
Engineering note
There should probably be an end-to-end, smoke, or type test that asserts generated configs are valid.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: