salix-front/vitest.config.mjs

35 lines
1015 B
JavaScript

import { defineConfig } from 'vitest/config';
import vue from '@vitejs/plugin-vue';
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
import jsconfigPaths from 'vite-jsconfig-paths';
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
import path from 'path';
export default defineConfig({
test: {
environment: 'happy-dom',
setupFiles: 'test/vitest/setup-file.js',
include: [
'test/vitest/__tests__/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
},
plugins: [
vue({
template: {
transformAssetUrls,
},
}),
quasar({
autoImportComponentCase: 'pascal',
sassVariables: 'src/quasar-variables.scss',
}),
VueI18nPlugin({
include: [
path.resolve(__dirname, 'src/i18n/**'),
path.resolve(__dirname, 'src/pages/**/locale/**'),
],
}),
jsconfigPaths(),
],
});