0
0
mirror of https://github.com/honojs/hono.git synced 2024-11-24 19:26:56 +01:00
hono/vitest.config.ts
m-shaka 66df4e1296
ci: Type check perf (#3406)
* chore: add scripts to monitor type check performance

* chore: add jobs for type-check-perf-monitoring

* chore: rm a comment

* refactor: mv type-check-perf perf-measures/type-check

* rm .eslintrc.cjs

* chore: ignore *result.txt
2024-09-22 18:11:32 +09:00

36 lines
1007 B
TypeScript

/// <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: ['./.vitest.config/setup-vitest.ts'],
coverage: {
enabled: true,
provider: 'v8',
reportsDirectory: './coverage/raw/default',
reporter: ['json', 'text', 'html'],
exclude: [
...(configDefaults.coverage.exclude ?? []),
'benchmarks',
'runtime-tests',
'build.ts',
'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',
],
},
pool: 'forks',
},
})