forked from honojs/hono
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
30 lines (29 loc) · 879 Bytes
/
vitest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/// <reference types="vitest" />
import { configDefaults, defineConfig } from 'vitest/config'
export default defineConfig({
esbuild: {
jsx: 'automatic',
jsxImportSource: __dirname + '/../src/jsx',
},
test: {
globals: true,
include: ['**/src/**/(*.)+(spec|test).+(ts|tsx|js)'],
exclude: [...configDefaults.exclude, '**/sandbox/**', '**/*.case.test.+(ts|tsx|js)'],
setupFiles: ['./src/test-utils/setup-vitest.ts'],
coverage: {
enabled: true,
provider: 'v8',
reportsDirectory: './coverage/raw/default',
reporter: ['json'],
exclude: [
...(configDefaults.coverage.exclude ?? []),
'benchmarks',
'runtime_tests',
'build.ts',
'src/test-utils',
'src/**/types.ts', // types are compile-time only, so their coverage cannot be measured
]
},
pool: 'forks',
},
})