-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Documentation is
- Missing
- Outdated
- Confusing
- Not sure?
Explain in Detail
I spent some time migrating our tests all the way from Vitest 2 to Vitest 4 and although everything was working in the tests and passing, I had a couple of issues
- The
vite.config.tsdidn't like thetestproperty even with<reference types="vitest/config" /> - Upon building the application we had a blank screen with a
tsliberror in the console.
This seems to be because we are on "vite": "^5.4.8" which is not supported but annoyingly I only spotted this after migrating fully, and then facing issues after building - and the only place I could find this information is on the GitHub repo's [README.md](https://github.com/AidanDaniel97/vitest/blob/main/README.md) and not in the migration guide
I'm happy to submit a PR for this, I think it's a necesarry addition for some clarity on what has changed. It may also be worth doing the same for the Vitest 3 migration guide.
Your Suggestion for Changes
Ideally if we can add warning banner at the top of the migration guide
::: warning Prerequisites
Vitest 4.0 requires **Vite >= 6.0.0** and **Node >= 20.0.0**.
:::
or more detailed
::: warning Prerequisites
Vitest 4.0 requires **Vite >= 6.0.0** and **Node >= 20.0.0**. Before proceeding
with any other migration steps, ensure your environment meets these requirements.
Running Vitest 4.0 on older versions of Vite or Node is not supported and will
likely result in unexpected errors.
:::