-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathvitest.config.ts
More file actions
55 lines (54 loc) · 1.54 KB
/
vitest.config.ts
File metadata and controls
55 lines (54 loc) · 1.54 KB
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
45
46
47
48
49
50
51
52
53
54
55
/// <reference types="vitest" />
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import path from 'path'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './renderer/src'),
'@common': path.resolve(__dirname, './common'),
'@utils': path.resolve(__dirname, './utils'),
'@mocks': path.resolve(__dirname, './renderer/src/common/mocks'),
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: path.resolve(__dirname, './vitest.setup.ts'),
env: {
VITE_BASE_API_URL: 'https://foo.bar.com',
},
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
'e2e-tests/**/*',
],
css: false,
coverage: {
provider: 'v8',
reporter: ['text', 'lcov', 'json-summary', 'json'],
reportsDirectory: './coverage',
include: ['renderer/src/**/*.{ts,tsx}', 'main/src/**/*.ts'],
exclude: [
'node_modules/**',
'common/api/generated/**',
'renderer/src/common/mocks/**',
'**/*.d.ts',
'**/*.test.{ts,tsx}',
'**/*.spec.{ts,tsx}',
'**/__tests__/**',
'**/test-utils.tsx',
'**/*.stories.tsx',
'vitest.setup.ts',
'vitest.config.ts',
'e2e-tests/**',
'main/src/csp.ts',
'main/src/logger.ts',
'main/src/headers.ts',
],
},
},
})