-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathvitest.config.js
More file actions
33 lines (32 loc) · 834 Bytes
/
Copy pathvitest.config.js
File metadata and controls
33 lines (32 loc) · 834 Bytes
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
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
define: {
// 빌드 시 vite.config.js가 이 상수를 치환함. 테스트에서도 동일하게 정의해야 함.
'__FUNCTION_SUFFIX__': JSON.stringify('_test'),
'__APP_VERSION__': JSON.stringify('test'),
'__BUILD_TARGET__': JSON.stringify('nsis')
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.js'],
include: ['tests/**/*.test.{js,jsx}'],
coverage: {
provider: 'v8',
reporter: ['text', 'html'],
include: ['src/**/*.{js,jsx}'],
exclude: [
'src/main.jsx',
'src/firebase/config.js',
'src/stripe/**'
]
}
},
resolve: {
alias: {
'@': '/src'
}
}
})