-
Notifications
You must be signed in to change notification settings - Fork 10
/
vitest.config.ts
75 lines (74 loc) · 2.09 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
63
64
65
66
67
68
69
70
71
72
73
74
75
import { defineConfig } from 'vitest/config';
import path from "path";
import Vue from "@vitejs/plugin-vue";
import Jsx from "@vitejs/plugin-vue-jsx";
export default defineConfig({
plugins: [Vue(), Jsx()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['@vitest/web-worker'],
// 没用
// deps: {
// // >= 0.34
// optimizer: {
// web: {
// include: ['vitest-canvas-mock']
// }
// }
// },
// >= 0.1.0
// poolOptions: {
// forks: {
// singleFork: true,
// },
// },
// environmentOptions: {
// jsdom: {
// resources: 'usable',
// },
// },
coverage: {
provider: "v8",
exclude:[
"**/icons/**",
"**/__tests__/**",
"**/__test__/**",
"**/__stories__/**",
"storybook-static/**",
"docs/**",
".storybook/**",
"coverage/**",
"**/dist/**",
"**/locale/source/**",
"**/lib/**",
"**/scripts/**",
"script/**",
"**/stories/**",
"dist/**",
"packages/*/test{,s}/**",
"**/*.d.ts",
"cypress/**",
"test{,s}/**",
"test{,-*}.{js,cjs,mjs,ts,tsx,jsx}",
"**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
"**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}",
"**/__tests__/**",
"**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*",
"**/.{eslint,mocha,prettier}rc.{js,cjs,yml}",
"**/*.cjs",
"**/vite-plugin-semi-theme/**",
"**/main.ts",
"**/App.tsx"
]
},
},
resolve:{
alias:[
{find: '@kousum/semi-icons-vue', replacement: path.resolve('./packages/semi-icons-vue/src/icons/index')},
{find: '@kousum/semi-icons-lab-vue', replacement: path.resolve('./packages/semi-icons-lab-vue/src/icons/index')},
{find: '@kousum/semi-animation-vue', replacement: path.resolve('./packages/semi-animation-vue/index')},
{find: '@kousum/semi-illustrations-vue', replacement: path.resolve('./packages/semi-illustrations-vue/index')}
]
}
});