1+ import { defineConfig } from 'vitest/config' ;
2+ import path from 'path' ;
3+
4+ export default defineConfig ( {
5+ test : {
6+ globals : true ,
7+ environment : 'jsdom' ,
8+ include : [ 'test/unit/**/*.test.js' ] ,
9+ exclude : [
10+ 'test/*.test.js' ,
11+ 'test/e2e/**/*' ,
12+ 'node_modules/**/*'
13+ ] ,
14+ coverage : {
15+ provider : 'v8' ,
16+ reporter : [ 'text' , 'json' , 'html' , 'lcov' ] ,
17+ reportsDirectory : './coverage' ,
18+ exclude : [
19+ 'node_modules/' ,
20+ 'test/' ,
21+ 'webpack/' ,
22+ 'dist/' ,
23+ 'lib/' ,
24+ 'docs/' ,
25+ '*.config.js' ,
26+ '.config/'
27+ ]
28+ } ,
29+ testTimeout : 10000 ,
30+ hookTimeout : 10000 ,
31+ } ,
32+ resolve : {
33+ alias : {
34+ '@' : path . resolve ( process . cwd ( ) , './src' ) ,
35+ 'src' : path . resolve ( process . cwd ( ) , './src' ) ,
36+ 'assets' : path . resolve ( process . cwd ( ) , './src/assets' ) ,
37+ 'utils' : path . resolve ( process . cwd ( ) , './src/utils' ) ,
38+ 'components' : path . resolve ( process . cwd ( ) , './src/components' ) ,
39+ 'plugins' : path . resolve ( process . cwd ( ) , './src/plugins' ) ,
40+ 'config' : path . resolve ( process . cwd ( ) , './src/config' ) ,
41+ 'validators' : path . resolve ( process . cwd ( ) , './src/validators' ) ,
42+ 'extended-events' : path . resolve ( process . cwd ( ) , './src/extended-events.js' ) ,
43+ 'video-player.const' : path . resolve ( process . cwd ( ) , './src/video-player.const.js' ) ,
44+ }
45+ }
46+ } ) ;
0 commit comments