-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.ts
49 lines (48 loc) · 1.35 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
import path from 'path'
import { defineConfig } from 'vitest/config'
import vue from '@vitejs/plugin-vue'
import svgLoader from 'vite-svg-loader'
import Components from 'unplugin-vue-components/vite'
import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import AutoImport from 'unplugin-auto-import/vite'
const include = [/\.vue$/, /\.vue\?vue/, /\.stories\.ts$/, /\.[tj]s$/]
export default defineConfig({
resolve: {
alias: {
'~': path.resolve(__dirname)
}
},
plugins: [
vue(),
Components({
dirs: ['~/components'],
directoryAsNamespace: true,
resolvers: [NaiveUiResolver()],
include
}),
AutoImport({
include,
imports: ['vue', '@vueuse/head'],
dirs: ['~/composables'],
vueTemplate: true
}),
svgLoader()
],
test: {
globalSetup: ['./tests/setupSqliteDbEnv'],
globals: true,
environment: 'jsdom',
threads: false,
coverage: {
enabled: true,
// We want to catch all js/ts/... files, not only the ones imported in some tests
// see https://github.com/bcoe/c8#checking-for-full-source-coverage-using---all
all: true,
include: [
// Nuxt 3 framework folders and files sources from directory structure here: https://nuxt.com/docs/guide/directory-structure/nuxt
'components',
'composables'
]
}
}
})