This repository demonstrates how to test file downloads using Vitest Browser mode.
demo.mp4
And an example of istanbul coverage report.
Read the blog post here.
- Run
pnpm install - Run
pnpm run devto see the downloads in action - Run
pnpm run testto see the test running in Chromium, Gecko and WebKit browsers.
To show coverage run npx vitest --browser.name chromium --coverage, add --ui if you want to see the Vitest UI with details on runtime & coverage.

