File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { defineConfig } from 'vitest/config' ;
2- import base from './vitest.config' ;
1+ import { defineConfig , mergeConfig } from 'vitest/config' ;
2+ import baseConfig from './vitest.config' ;
33
44// CI/quality gate: enforce minimum coverage thresholds (global).
5- export default defineConfig ( {
6- ... ( base as unknown as Record < string , unknown > ) ,
7- test : {
8- // @ts -expect-error - base config shape is compatible at runtime
9- ... ( base . test ?? { } ) ,
10- coverage : {
11- // @ts -expect-error - base config shape is compatible at runtime
12- ... ( base . test ?. coverage ?? { } ) ,
13- thresholds : {
14- lines : 20 ,
15- functions : 20 ,
16- branches : 20 ,
17- statements : 20 ,
5+ export default mergeConfig (
6+ baseConfig ,
7+ defineConfig ( {
8+ test : {
9+ coverage : {
10+ // Re-declare provider to keep types narrow.
11+ provider : 'v8' ,
12+ thresholds : {
13+ lines : 20 ,
14+ functions : 20 ,
15+ branches : 20 ,
16+ statements : 20 ,
17+ } ,
1818 } ,
1919 } ,
20- } ,
21- } ) ;
20+ } )
21+ ) ;
2222
You can’t perform that action at this time.
0 commit comments