forked from code-pushup/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.unit.ts
30 lines (29 loc) · 974 Bytes
/
vite.config.unit.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
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases';
export default defineConfig({
cacheDir: '../../node_modules/.vite/models',
test: {
reporters: ['basic'],
globals: true,
cache: {
dir: '../../node_modules/.vitest',
},
alias: tsconfigPathAliases(),
pool: 'threads',
poolOptions: { threads: { singleThread: true } },
coverage: {
reporter: ['text', 'lcov'],
reportsDirectory: '../../coverage/models/unit-tests',
exclude: ['mocks/**', '**/types.ts', 'zod2md.config.ts'],
},
environment: 'node',
include: ['src/**/*.unit.test.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
globalSetup: ['../../global-setup.ts'],
setupFiles: [
'../../testing/test-setup/src/lib/fs.mock.ts',
'../../testing/test-setup/src/lib/console.mock.ts',
'../../testing/test-setup/src/lib/reset.mocks.ts',
],
},
});