-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathvitest.config.ts
More file actions
28 lines (26 loc) · 741 Bytes
/
vitest.config.ts
File metadata and controls
28 lines (26 loc) · 741 Bytes
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
import { defineConfig } from 'vitest/config'
import { loadEnv } from 'vite'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
const env = loadEnv('', process.cwd(), '')
const isCI = env.CI === 'true' || process.env.CI === 'true'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'bun:sqlite': resolve(__dirname, '__tests__/__mocks__/bun-sqlite.ts'),
},
},
test: {
globals: true,
environment: 'jsdom',
include: ['__tests__/**/*.{test,spec}.{ts,tsx}'],
reporters: isCI ? ['default'] : ['./__tests__/reporter.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
include: ['src/**/*.{ts,tsx}'],
exclude: ['src/**/*.d.ts', 'src/main.tsx'],
},
},
})