@@ -485,15 +485,33 @@ describe('defaultAction', () => {
485485 } ) ;
486486 } ) ;
487487
488+ it ( 'should handle custom force include patterns' , async ( ) => {
489+ const options : CliOptions = {
490+ forceInclude : 'coverage/*.json,test-results/*.xml' ,
491+ } ;
492+
493+ await runDefaultAction ( [ '.' ] , process . cwd ( ) , options ) ;
494+
495+ expect ( configLoader . mergeConfigs ) . toHaveBeenCalledWith (
496+ process . cwd ( ) ,
497+ expect . anything ( ) ,
498+ expect . objectContaining ( {
499+ forceInclude : [ 'coverage/*.json' , 'test-results/*.xml' ] ,
500+ } ) ,
501+ ) ;
502+ } ) ;
503+
488504 it ( 'should properly trim whitespace from comma-separated patterns' , ( ) => {
489505 const options = {
490506 include : 'src/**/*, tests/**/*, examples/**/*' ,
491507 ignore : 'node_modules/**, dist/**, coverage/**' ,
508+ forceInclude : 'coverage/*.json, test-results/*.xml' ,
492509 } ;
493510 const config = buildCliConfig ( options as unknown as CliOptions ) ;
494511
495512 expect ( config . include ) . toEqual ( [ 'src/**/*' , 'tests/**/*' , 'examples/**/*' ] ) ;
496513 expect ( config . ignore ?. customPatterns ) . toEqual ( [ 'node_modules/**' , 'dist/**' , 'coverage/**' ] ) ;
514+ expect ( config . forceInclude ) . toEqual ( [ 'coverage/*.json' , 'test-results/*.xml' ] ) ;
497515 } ) ;
498516
499517 describe ( 'files flag' , ( ) => {
0 commit comments