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
The walk stopped after 200 commits: lines older than f0b094d point at it.
Merge commit from forkYusuke Wadabefore adoptionf0b094d
lines 1–72why, one step back1import { configDefaults, defineConfig } from 'vitest/config'23export default defineConfig({4 test: {5 globals: true,6 coverage: {7 enabled: true,8 provider: 'v8',9 reportsDirectory: './coverage/raw/default',10 reporter: ['json', 'text', 'html'],11 exclude: [12 ...(configDefaults.coverage.exclude ?? []),13 'benchmarks',14 'runtime-tests',15 'src/test-utils',16 'perf-measures',1718 // types are compile-time only, so their coverage cannot be measured19 'src/**/types.ts',20 'src/jsx/intrinsic-elements.ts',21 'src/utils/http-status.ts',22 ],23 },24 projects: [25 './runtime-tests/*/vitest.config.ts',26 {27 oxc: {28 jsx: {29 runtime: 'automatic',30 importSource: './src/jsx',31 },32 },33 extends: true,34 test: {35 exclude: [...configDefaults.exclude, '**/sandbox/**', '**/*.case.test.*'],36 include: [37 'src/**/(*.)+(spec|test).+(ts|tsx|js)',38 'scripts/**/(*.)+(spec|test).+(ts|tsx|js)',39 'build/**/(*.)+(spec|test).+(ts|tsx|js)',40 ],41 name: 'main',42 },43 },44 {45 oxc: {46 jsx: {47 runtime: 'automatic',48 importSource: './src/jsx',49 },50 },51 extends: true,52 test: {53 include: ['src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', 'src/jsx/hooks/dom.test.tsx'],54 name: 'jsx-runtime-default',55 },56 },57 {58 oxc: {59 jsx: {60 runtime: 'automatic',61 importSource: './src/jsx/dom',62 },63 },64 extends: true,65 test: {66 include: ['src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', 'src/jsx/hooks/dom.test.tsx'],67 name: 'jsx-runtime-dom',68 },69 },70 ],71 },72})