@@ -1320,14 +1320,18 @@ test('strict mode rejects click-only button flag on press', () => {
13201320} ) ;
13211321
13221322test ( 'snapshot command accepts command-specific flags' , ( ) => {
1323- const parsed = parseArgs ( [ 'snapshot' , '-i' , '-c' , '--depth' , '3' , '-s' , 'Login' ] , {
1324- strictFlags : true ,
1325- } ) ;
1323+ const parsed = parseArgs (
1324+ [ 'snapshot' , '-i' , '-c' , '--depth' , '3' , '-s' , 'Login' , '--timeout' , '120000' ] ,
1325+ {
1326+ strictFlags : true ,
1327+ } ,
1328+ ) ;
13261329 assert . equal ( parsed . command , 'snapshot' ) ;
13271330 assert . equal ( parsed . flags . snapshotInteractiveOnly , true ) ;
13281331 assert . equal ( parsed . flags . snapshotCompact , true ) ;
13291332 assert . equal ( parsed . flags . snapshotDepth , 3 ) ;
13301333 assert . equal ( parsed . flags . snapshotScope , 'Login' ) ;
1334+ assert . equal ( parsed . flags . timeoutMs , 120000 ) ;
13311335} ) ;
13321336
13331337test ( 'snapshot command accepts diff alias flag' , ( ) => {
@@ -1483,6 +1487,7 @@ test('snapshot command usage documents diff alias', () => {
14831487 const help = usageForCommand ( 'snapshot' ) ;
14841488 if ( help === null ) throw new Error ( 'Expected command help text' ) ;
14851489 assert . match ( help , / a g e n t - d e v i c e s n a p s h o t \[ - - d i f f \] / ) ;
1490+ assert . match ( help , / - - t i m e o u t < m s > / ) ;
14861491 assert . match ( help , / C a p t u r e a c c e s s i b i l i t y t r e e o r d i f f a g a i n s t t h e p r e v i o u s s e s s i o n b a s e l i n e / ) ;
14871492} ) ;
14881493
0 commit comments