Introduces vitest config, jsdom setup, and first suites covering FieldRenderer dispatch and useConditionalLogic evaluation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
35 lines
1.3 KiB
TypeScript
35 lines
1.3 KiB
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
// Dedicated Vitest config — intentionally trimmed down from vite.config.ts.
|
|
// We skip Vuetify / MetaLayouts / VueRouter plugins so unit tests run fast
|
|
// in jsdom without loading the full Vuexy bundle.
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
imports: ['vue', '@vueuse/core'],
|
|
dirs: ['./src/@core/utils', './src/@core/composable/', './src/composables/', './src/utils/'],
|
|
vueTemplate: true,
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
'@core': fileURLToPath(new URL('./src/@core', import.meta.url)),
|
|
'@layouts': fileURLToPath(new URL('./src/@layouts', import.meta.url)),
|
|
'@images': fileURLToPath(new URL('./src/assets/images/', import.meta.url)),
|
|
'@styles': fileURLToPath(new URL('./src/assets/styles/', import.meta.url)),
|
|
'@validators': fileURLToPath(new URL('./src/@core/utils/validators', import.meta.url)),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
include: ['tests/**/*.{test,spec}.ts'],
|
|
setupFiles: ['./tests/setup.ts'],
|
|
},
|
|
})
|