Open AndreaPontrandolfo opened 1 month ago
We break these up into two different commands since a bare vitest
command has different behavior in different environments, as you've noted. That means we need two separate turbo
tasks, as noted on the documentation.
You're right that the vitest
invocations could be updated for better clarity! We can also add a link to the storing of coverage files documentation, since that's a common ask.
Let's avoid linking to that caching doc, since it looks like that happens by default, and I don't want to confuse folks about Turborepo caching vs. Vitest caching. Power users can reach for Vitest's caching options if they need them.
I'm happy to review a PR for this, if you'd like to make one! If not, I can get it handled but not sure if it will be soon. Let me know. 👍
What is the improvement or update you wish to see?
Fix docs around vitest CLI and improve docs around caching and file storing.
Is there any context that might help us understand?
In the Turborepo x Vitest there are these commands:
Which are wrong.
vitest
does watch the files, whilevitest run
run the tests and then stop (thus being suitable for CI). Reference.Am i misunderstanding something?
Also, vitest has docs for caching and docs for storing output files and coverage files.
it would be nice if Turborepo mentioned and gave guidance about these docs, here.
Does the docs page already exist? Please link to it.
https://turbo.build/repo/docs/guides/tools/vitest