2023-09-08 10:42:28 +02:00
|
|
|
/// <reference types="vitest" />
|
2023-09-08 11:10:12 +02:00
|
|
|
import { configDefaults, defineConfig } from 'vitest/config'
|
2023-09-08 10:42:28 +02:00
|
|
|
|
|
|
|
export default defineConfig({
|
2024-05-24 10:47:28 +02:00
|
|
|
esbuild: {
|
|
|
|
jsx: 'automatic',
|
|
|
|
jsxImportSource: __dirname + '/../src/jsx',
|
|
|
|
},
|
2023-09-08 10:42:28 +02:00
|
|
|
test: {
|
|
|
|
globals: true,
|
|
|
|
include: ['**/src/**/(*.)+(spec|test).+(ts|tsx|js)'],
|
2024-02-24 04:28:59 +01:00
|
|
|
exclude: [...configDefaults.exclude, '**/sandbox/**', '**/*.case.test.+(ts|tsx|js)'],
|
2023-10-10 14:32:10 +02:00
|
|
|
setupFiles: ['./src/test-utils/setup-vitest.ts'],
|
2023-09-08 10:42:28 +02:00
|
|
|
coverage: {
|
2024-05-31 21:17:47 +02:00
|
|
|
enabled: true,
|
2023-09-08 10:42:28 +02:00
|
|
|
provider: 'v8',
|
2024-05-31 21:17:47 +02:00
|
|
|
reportsDirectory: './coverage/raw/default',
|
|
|
|
reporter: ['json'],
|
|
|
|
exclude: [
|
|
|
|
...(configDefaults.coverage.exclude ?? []),
|
|
|
|
'benchmarks',
|
|
|
|
'runtime_tests',
|
|
|
|
'build.ts',
|
|
|
|
'src/test-utils',
|
2024-06-02 17:19:33 +02:00
|
|
|
|
|
|
|
// types are compile-time only, so their coverage cannot be measured
|
|
|
|
'src/**/types.ts',
|
|
|
|
'src/jsx/intrinsic-elements.ts',
|
|
|
|
'src/utils/http-status.ts',
|
2024-05-31 21:17:47 +02:00
|
|
|
]
|
2023-09-08 10:42:28 +02:00
|
|
|
},
|
2024-01-27 06:32:49 +01:00
|
|
|
pool: 'forks',
|
2023-09-08 10:42:28 +02:00
|
|
|
},
|
|
|
|
})
|