mirror of
https://github.com/honojs/hono.git
synced 2024-11-27 16:06:24 +01:00
a6ccfa29ca
* feat(build): for both exports to be the same * some fix * fix exclude of coverage * update * stylish error message and add comment * revert auto lint * chore: format
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
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)', '**/scripts/**/(*.)+(spec|test).+(ts|tsx|js)', '**/build/**/(*.)+(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/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',
|
|
},
|
|
})
|