-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvitest.config.ts
44 lines (42 loc) · 1.03 KB
/
vitest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { quasar, transformAssetUrls } from '@quasar/vite-plugin';
import AutoImport from 'unplugin-auto-import/vite';
import tsconfigPaths from 'vite-tsconfig-paths';
// https://vitejs.dev/config/
export default defineConfig({
test: {
globals: true,
environment: 'happy-dom',
setupFiles: 'test/setup-file.ts',
},
plugins: [
vue({
template: { transformAssetUrls },
}),
AutoImport({
include: [
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/\.vue$/,
/\.vue\?vue/, // .vue
/\.md$/, // .md
],
dts: './test/auto-imports.d.ts',
imports: [
'vue',
'vue-router',
'pinia',
'quasar',
{
'@vue/test-utils': ['mount', 'flushPromises'],
'test/plugins': ['installQuasar', 'installPinia'],
},
],
}),
quasar({
sassVariables: 'src/quasar-variables.scss',
}),
tsconfigPaths(),
],
});