forked from code-pushup/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.unit.ts
31 lines (30 loc) · 1019 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
31
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import { tsconfigPathAliases } from '../../tools/vitest-tsconfig-path-aliases';
export default defineConfig({
cacheDir: '../../node_modules/.vite/utils',
test: {
reporters: ['basic'],
globals: true,
cache: {
dir: '../../node_modules/.vitest',
},
alias: tsconfigPathAliases(),
pool: 'threads',
poolOptions: { threads: { singleThread: true } },
coverage: {
reporter: ['text', 'lcov'],
reportsDirectory: '../../coverage/utils/unit-tests',
exclude: ['mocks/**', 'perf/**', '**/types.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/cliui.mock.ts',
'../../testing/test-setup/src/lib/fs.mock.ts',
'../../testing/test-setup/src/lib/console.mock.ts',
'../../testing/test-setup/src/lib/reset.mocks.ts',
],
},
});