24 lines
622 B
JavaScript
24 lines
622 B
JavaScript
|
|
import { fileURLToPath, URL } from 'node:url'
|
||
|
|
import { defineConfig } from 'vitest/config'
|
||
|
|
import vue from '@vitejs/plugin-vue'
|
||
|
|
|
||
|
|
// 단위/컴포넌트 테스트 전용 설정. (앱 빌드 설정은 vite.config.js)
|
||
|
|
export default defineConfig({
|
||
|
|
plugins: [vue()],
|
||
|
|
resolve: {
|
||
|
|
alias: {
|
||
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||
|
|
},
|
||
|
|
},
|
||
|
|
define: {
|
||
|
|
// 일부 컴포넌트가 참조하는 빌드타임 상수
|
||
|
|
__APP_VERSION__: JSON.stringify('test'),
|
||
|
|
},
|
||
|
|
test: {
|
||
|
|
environment: 'jsdom',
|
||
|
|
globals: true,
|
||
|
|
include: ['src/**/*.{spec,test}.{js,mjs}'],
|
||
|
|
clearMocks: true,
|
||
|
|
},
|
||
|
|
})
|