-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
62 lines (57 loc) · 1.4 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import { fileURLToPath } from 'node:url';
import {
configDefaults,
defineConfig,
// mergeConfig,
} from 'vitest/config';
import vue from "@vitejs/plugin-vue";
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify';
// import viteConfig from './vite.config';
/**
* Vitest Configure
*
* @see {@link https://vitest.dev/config/}
*/
// export default mergeConfig(
// viteConfig({ command: 'serve', mode: '' }),
// defineConfig({
// ...
// })
// );
export default defineConfig({
// Resolver
resolve: {
// https://vitest.dev/config/#alias
alias: {
'@': fileURLToPath(new URL('./pages/.vitepress', import.meta.url)),
'~': fileURLToPath(new URL('./node_modules', import.meta.url)),
},
extensions: ['.js', '.json', '.jsx', '.mjs', '.ts', '.tsx', '.vue'],
},
test: {
environment: 'happy-dom',
exclude: [...configDefaults.exclude],
globals: true,
root: fileURLToPath(new URL('./', import.meta.url)),
// https://vuetifyjs.com/en/getting-started/unit-testing/
server: {
deps: {
inline: ['vuetify'],
},
},
},
plugins: [
vue({
template: { transformAssetUrls }
}),
vuetify({ autoImport: true }),
],
// css: {
// preprocessorOptions: {
// scss: {
// api: 'modern-compiler',
// additionalData: `@import "./pages/.vitepress/theme/variables.scss";`,
// },
// },
// },
})