Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"lint:fix": "oxlint --fix packages tests",
"test:types": "tsc -p tests/tsconfig.json --noEmit",
"test:unit": "vitest --coverage --run",
"test:unit:report": "cross-env VITEST_HTML_REPORT=true vitest --coverage --run",
"test:unit:ui": "vitest --coverage --ui",
"test:unit:watch": "vitest --coverage --watch",
"test.local.init": "rimraf localBaseline && SAVE_ACTUAL=true wdio ./tests/configs/wdio.local.init.conf.ts",
Expand Down
5 changes: 4 additions & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import { defineConfig, coverageConfigDefaults, defaultExclude } from 'vitest/con
export default defineConfig({
test: {
include: ['./packages/**/(tests|src)/**/*.test.ts'],
reporters: ['default', ['html', { outputDir: '.vitest-ui' }]],
// The static HTML report (.vitest-ui/) is written only on request (`pnpm test:unit:report`), not on every run
reporters: process.env.VITEST_HTML_REPORT === 'true'
? ['default', ['html', { outputDir: '.vitest-ui' }]]
: ['default'],
coverage: {
// Vitest 4 removed `coverage.all`: without `include`, only the files that the tests load are reported
include: ['packages/*/src/**/*.{ts,tsx}'],
Expand Down
Loading