VueTorrent/vitest.config.ts

37 lines
941 B
TypeScript

import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue2'
import Components from 'unplugin-vue-components/vite'
import { VuetifyResolver } from 'unplugin-vue-components/resolvers'
import { fileURLToPath, URL } from 'node:url'
export default defineConfig({
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
'~': fileURLToPath(new URL('./node_modules', import.meta.url))
}
},
plugins: [
vue(),
Components({
dts: false,
directives: false,
resolvers: [VuetifyResolver()],
types: [
{
from: 'vue-router',
names: ['RouterLink', 'RouterView']
}
]
})
],
test: {
// https://vitest.dev/guide/#configuring-vitest
globals: true,
globalSetup: [fileURLToPath(new URL('./vitest/setup.ts', import.meta.url))],
environment: 'jsdom',
deps: {
inline: ['vuetify']
}
}
})