-
-
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
docs: docs for options lack clarity #7296
Comments
Something that might be worth mentioning in the migration guide for Vitest 3 is that Vitest 2 seems to have an infinite default timeout whereas Vitest 3 has a 5 second default timeout. I had to set the timeout option a bunch of places to get longer running tests passing with Vitest 3 |
To be fair, the first section of the page has this with examples:
The assumption is that users understand the difference between I guess, we can also mention double syntax everywhere? Seems a bit of an overkill |
Vitest always had a 5 seconds timeout |
Ah, I didn't see that there was more than one example until reading your reply here as I didn't notice that you had to tab to the second example. I don't think you need to repeat it everywhere, but I couldn't find it at all. It might help to show the first example and then say "or you can also do..." and then show the second example so that the second one is showing by default. Or show the options example first because there's already plenty of docs for things like Not sure about the timeout issue, but we had lots of tests going way past the 5 second timeout. Whatever the issue was it seems to be working with vitest 3, so not sure it's worth much time debugging it, but we did have to reconfigure the timeouts now that they're getting applied: sveltejs/kit#13330 |
Ah, I see. Synchronous functions were bugged and never timeout out, you are right, this was one of the fixes in Vitest 3 |
Describe the bug
https://vitest.dev/api/#test does not show if any options can be used with the
test
functionThe only place options are shown as being used is https://vitest.dev/api/#describe-only which says the options may be a number, but it gives no description of what the number represents. It also says the options are the third argument and I wonder if this is correct since the migration guide suggests that you need to migrate from it being the third argument to it being the second argument (https://vitest.dev/guide/migration#test-options-as-a-third-argument) for the
test
function and it would be surprising iftest
anddescribe.only
took arguments in different ordersReproduction
https://vitest.dev/api/
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: