vitest.config.ts
This file
Path
vitest.config.ts
72 lines 路 1.8 KiB 路 TypeScript
Last changed by
chore: introduce Vite+ (#5444)Yusuke Wadabefore adoption5f31392
History of this fileTake it
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({ test: { globals: true, coverage: { enabled: true, provider: 'v8', reportsDirectory: './coverage/raw/default', reporter: ['json', 'text', 'html'], exclude: [ ...(configDefaults.coverage.exclude ?? []), 'benchmarks', 'runtime-tests', 'src/test-utils', 'perf-measures',
// types are compile-time only, so their coverage cannot be measured 'src/**/types.ts', 'src/jsx/intrinsic-elements.ts', 'src/utils/http-status.ts', ], }, projects: [ './runtime-tests/*/vitest.config.ts', { oxc: { jsx: { runtime: 'automatic', importSource: './src/jsx', }, }, extends: true, test: { exclude: [...configDefaults.exclude, '**/sandbox/**', '**/*.case.test.*'], include: [ 'src/**/(*.)+(spec|test).+(ts|tsx|js)', 'scripts/**/(*.)+(spec|test).+(ts|tsx|js)', 'build/**/(*.)+(spec|test).+(ts|tsx|js)', ], name: 'main', }, }, { oxc: { jsx: { runtime: 'automatic', importSource: './src/jsx', }, }, extends: true, test: { include: ['src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', 'src/jsx/hooks/dom.test.tsx'], name: 'jsx-runtime-default', }, }, { oxc: { jsx: { runtime: 'automatic', importSource: './src/jsx/dom', }, }, extends: true, test: { include: ['src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', 'src/jsx/hooks/dom.test.tsx'], name: 'jsx-runtime-dom', }, }, ], },})