Repository navigation
test: write the Vitest HTML report only on request - #1297
Conversation
The html reporter ran on every unit test run, also in CI, and wrote a report of several MB to .vitest-ui/ that nobody opened there. It now runs only with the new test:unit:report script. test:unit:ui (the live Vitest UI) does not need it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Summary
The Vitest
htmlreporter ran on every unit test run, also in CI, and wrote a report of several MB to.vitest-ui/that nobody opened there. It now runs only on request.Changes
vitest.config.ts: thehtmlreporter is added only whenVITEST_HTML_REPORT=true; otherwise only thedefaultreporter runs.test:unit:report(cross-env VITEST_HTML_REPORT=true vitest --coverage --run) writes the static report to.vitest-ui/as before.test:unit:ui(the live Vitest UI) does not need thehtmlreporter and does not change.Test
pnpm test:unit: 1079 tests pass, no.vitest-ui/folder.pnpm test:unit:report: writes.vitest-ui/index.html; no.vitest/folder.🤖 Generated with Claude Code