Files
crewli/apps/portal/vitest.config.ts
bert.hausmans 79954aace6 refactor(forms): move packages/form-schema → apps/app/src/composables/forms
Inlines the form-schema source folder (no package.json, alias-only)
into apps/app/src/composables/forms. Drops the @form-schema alias
from apps/app/vite.config.ts (replaced by @/composables/forms via
the existing @ alias). apps/portal vite + vitest configs keep
@form-schema as a temporary alias pointing at the new location so
portal tests/build keep working until apps/portal is removed at the
end of this PR. Two pure-logic form-schema tests moved alongside.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 18:50:52 +02:00

37 lines
1.4 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)),
// Temporary alias during WS-3 PR-B1 transition; portal is deleted at PR end.
'@form-schema': fileURLToPath(new URL('../app/src/composables/forms', import.meta.url)),
},
},
test: {
environment: 'jsdom',
globals: true,
include: ['tests/**/*.{test,spec}.ts'],
setupFiles: ['./tests/setup.ts'],
},
})