-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.mjs
52 lines (46 loc) · 1.48 KB
/
vitest.config.mjs
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
import { configDefaults, defineConfig } from 'vitest/config';
import Vue from '@vitejs/plugin-vue';
import path from 'path';
export default defineConfig( {
plugins: [ Vue() ],
test: {
globals: false,
environmentMatchGlobs: [
[ 'test/unit/**', 'node' ],
[ 'test/integration/**', 'jsdom' ],
[ 'test/components/**', 'jsdom' ],
[ 'test/banners/**', 'jsdom' ]
],
coverage: {
exclude: [
...configDefaults.coverage.exclude,
// Ignore entry points, form items, event mappings and translations in each banner.
// The entry points are just factories, the other files are configurations written in TypeScript
'banners/*/*/{banner_ctrl,banner_var,form_items,form_items_var,event_map,event_map_var,messages,messages_var}.ts',
// Ignore translation files and Locale Factories
'src/**/messages/*',
'src/utils/LocaleFactory/*',
// Ignore environment-specific setup files
'src/environment/*',
// Additional non-banner files that are not relevant for coverage
'dashboard/*',
'dist/*',
'check-content-version.ts',
'stylelint.config.mjs',
'vitest.campaign.config.mjs',
'webpack/*',
'webpack.common.js',
'webpack.production.js',
'webpack.config.js',
]
}
},
resolve: {
alias: {
'@banners': path.resolve( __dirname, './banners' ),
'@src': path.resolve( __dirname, './src' ),
'@environment': path.resolve( __dirname, './src/environment/prod' ),
'@test': path.resolve( __dirname, './test' )
}
}
} );