-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.mts
44 lines (42 loc) · 1.19 KB
/
vitest.config.mts
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
import { fileURLToPath } from 'node:url'
import { mergeConfig } from 'vite'
import { configDefaults, defineConfig } from 'vitest/config'
import viteConfig from './vite.config.mts'
export default mergeConfig(
viteConfig,
defineConfig({
test: {
setupFiles: ['jsdom-worker', './src/vitest.setup.ts'],
server: {
deps: {
inline: ['vuetify', 'vitest-canvas-mock']
}
},
coverage: {
all: true,
provider: 'istanbul',
reporter: ['text', 'html', 'clover', 'json'],
include: [
'src/router/**/*.ts',
'src/router/*.ts',
'src/lib/**/*.ts',
'src/lib/*/*.ts',
'src/stores/**/*.ts',
'src/stores/*/*.ts',
'src/components/**/*.{vue,ts}',
'src/components/*/*.ts',
'src/views/**/*.{vue,ts}',
'src/views/*/*.ts'
],
exclude: ['**/*.spec.ts', '**/*.stories.ts']
},
environment: 'jsdom',
exclude: [...configDefaults.exclude, 'e2e/*'],
root: fileURLToPath(new URL('./', import.meta.url)),
testTransformMode: {
web: ['**/*.{jsx,tsx}']
},
testTimeout: 10000
}
}) as typeof viteConfig
)