-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathvite.config.ts
41 lines (37 loc) · 1.23 KB
/
vite.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
/// <reference types="vitest" />
import * as dotenv from 'dotenv';
import path from 'path';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
dotenv.config();
export default defineConfig({
plugins: [tsconfigPaths()],
test: {
// Enables parallel lifecycle tests
setupFiles: [path.resolve(__dirname, './libs/model/src/vitest.setup.ts')],
poolMatchGlobs: [
// lifecycle tests in forks pool (uses node:child_process)
['**/libs/model/**/*-lifecycle.spec.ts', 'forks'],
// everything else runs in threads pool
],
poolOptions: {
threads: { minThreads: 1, maxThreads: 1 },
forks: { minForks: 1, maxForks: 5 },
},
fileParallelism: process.env.npm_package_name !== 'commonwealth',
testTimeout: 20_000,
// Disables parallel lifecycle tests
// fileParallelism: false,
sequence: { concurrent: false },
coverage: {
include: ['src/**/*.ts'],
exclude: ['src/**/*.d.ts', '**/migrations/**', '**/node_modules/**'],
provider: 'istanbul',
reporter:
process.env.CI === 'true'
? ['lcovonly']
: ['text', ['json', { file: 'coverage.json' }], 'html'],
reportsDirectory: './coverage',
},
},
});