-
Notifications
You must be signed in to change notification settings - Fork 5
/
vitest.config.ts
48 lines (46 loc) · 1.07 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
import vue from '@vitejs/plugin-vue';
import { defineConfig } from 'vitest/config';
const customElements = new Set(['ec-stub']);
export default defineConfig({
plugins: [vue({
template: {
compilerOptions: {
whitespace: 'condense',
isCustomElement: tag => customElements.has(tag),
comments: false,
},
},
})],
test: {
clearMocks: true,
restoreMocks: true,
unstubEnvs: true,
unstubGlobals: true,
environment: 'jsdom',
globals: true,
include: [
'./src/**/*.{test,spec}.?(c|m)[jt]s?(x)',
],
setupFiles: [
'./tests/setup/intl.ts',
'./tests/setup/after-env.ts',
'./tests/setup/chameleon-config.ts',
'./tests/setup/auto-unmount.ts',
'./tests/stubs/index.ts',
'./tests/mocks/index.ts',
],
coverage: {
include: [
'src/**',
'!src/**/*.story.?(c|m)[jt]s?(x)',
'!src/{icons,assets,eslint}/**',
'!**/index.{js,ts}',
'!**/types.ts',
'!src/main.ts',
],
thresholds: {
100: true,
},
},
},
});