salix-front/vitest.config.js

35 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-12-22 12:46:43 +00:00
import { defineConfig } from 'vitest/config';
import vue from '@vitejs/plugin-vue';
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
import jsconfigPaths from 'vite-jsconfig-paths';
2023-01-04 07:23:02 +00:00
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite';
2023-01-03 13:17:22 +00:00
import path from 'path';
2022-12-22 12:46:43 +00:00
// https://vitejs.dev/config/
export default defineConfig({
test: {
environment: 'happy-dom',
setupFiles: 'test/vitest/setup-file.js',
include: [
// Matches vitest tests in any subfolder of 'src' or into 'test/vitest/__tests__'
// Matches all files with extension 'js', 'jsx', 'ts' and 'tsx'
'test/vitest/__tests__/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
},
plugins: [
vue({
2023-04-11 11:31:03 +00:00
template: {
transformAssetUrls,
2023-04-11 11:31:03 +00:00
},
2022-12-22 12:46:43 +00:00
}),
quasar({
2023-04-11 11:31:03 +00:00
autoImportComponentCase: 'pascal',
2022-12-22 12:46:43 +00:00
sassVariables: 'src/quasar-variables.scss',
}),
2023-01-04 07:23:02 +00:00
VueI18nPlugin({
2023-01-03 13:17:22 +00:00
include: path.resolve(__dirname, 'src/i18n/**'),
}),
2022-12-22 12:46:43 +00:00
jsconfigPaths(),
],
});