forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
44 lines (43 loc) · 1.12 KB
/
vitest.config.ts
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
export default defineConfig({
optimizeDeps: {
exclude: ['crypto', 'util', 'tty'],
include: ['@lobehub/tts'],
},
test: {
alias: {
'@': resolve(__dirname, './src'),
'~test-utils': resolve(__dirname, './tests/utils.tsx'),
},
coverage: {
all: false,
exclude: [
'__mocks__/**',
// just ignore the migration code
// we will use pglite in the future
// so the coverage of this file is not important
'src/database/client/core/db.ts',
'src/utils/fetch/fetchEventSource/*.ts',
],
provider: 'v8',
reporter: ['text', 'json', 'lcov', 'text-summary'],
reportsDirectory: './coverage/app',
},
environment: 'happy-dom',
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/build/**',
'src/database/server/**/**',
'src/database/repositories/dataImporter/**/**',
],
globals: true,
server: {
deps: {
inline: ['vitest-canvas-mock'],
},
},
setupFiles: './tests/setup.ts',
},
});