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)'],
|
2024-07-19 17:02:35 +02:00
|
|
|
setupFiles: ['./.vitest.config/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',
|
2024-06-06 15:25:38 +02:00
|
|
|
reporter: ['json', 'text', 'html'],
|
2024-05-31 21:17:47 +02:00
|
|
|
exclude: [
|
|
|
|
...(configDefaults.coverage.exclude ?? []),
|
|
|
|
'benchmarks',
|
2024-09-17 07:51:43 +02:00
|
|
|
'runtime-tests',
|
2024-05-31 21:17:47 +02:00
|
|
|
'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-06-06 15:25:38 +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
|
|
|
},
|
|
|
|
})
|