@@ -92,6 +92,13 @@ describe('scan:eol e2e', () => {
9292 } ) ;
9393
9494 describe ( 'default arguments' , ( ) => {
95+ it ( 'runs help as default command' , async ( ) => {
96+ const { stdout } = await execAsync ( 'node bin/run.js' ) ;
97+ match ( stdout , / V E R S I O N / , 'Should show version section' ) ;
98+ match ( stdout , / U S A G E / , 'Should show usage section' ) ;
99+ match ( stdout , / T O P I C S / , 'Should show topics section' ) ;
100+ match ( stdout , / C O M M A N D S / , 'Should show commands section' ) ;
101+ } ) ;
95102 it ( 'runs scan:eol with file flag and shows results' , async ( ) => {
96103 const { stdout } = await run ( `scan:eol --file ${ simpleSbom } ` ) ;
97104 match ( stdout , / S c a n r e s u l t s : / , 'Should show results header' ) ;
@@ -106,7 +113,7 @@ describe('scan:eol e2e', () => {
106113 } ) ;
107114
108115 it ( 'shows help for scan:eol when --help is passed in' , async ( ) => {
109- const { stdout } = await execAsync ( 'node bin/run.js --help' ) ;
116+ const { stdout } = await execAsync ( 'node bin/run.js scan:eol --help' ) ;
110117 match ( stdout , / U S A G E / , 'Should show usage section' ) ;
111118 match ( stdout , / F L A G S / , 'Should show flags section' ) ;
112119 match ( stdout , / E X A M P L E S / , 'Should show examples section' ) ;
0 commit comments