@@ -18,16 +18,19 @@ describe('should be able to run cli', () => {
1818 await fs . remove ( path . resolve ( __dirname , './generated' ) ) ;
1919 } ) ;
2020
21+ const execOptions = { stdio : 'pipe' , timeout : 60_000 } as const ;
22+
2123 it ( 'should throw error without input path' , ( ) => {
2224 expect ( ( ) => {
23- execSync ( 'node ./build/cli.js' , { stdio : 'pipe' } ) ;
25+ execSync ( 'node ./build/cli.js' , execOptions ) ;
2426 } ) . toThrowError ( / .* p l e a s e p a s s - - i n p u t t o y o u r r r w e b e v e n t s f i l e .* / ) ;
2527 } ) ;
2628
2729 it ( 'should generate a video without output path' , ( ) => {
28- execSync ( 'node ./build/cli.js --input ./test/generated/example.json' , {
29- stdio : 'pipe' ,
30- } ) ;
30+ execSync (
31+ 'node ./build/cli.js --input ./test/generated/example.json' ,
32+ execOptions ,
33+ ) ;
3134 const outputFile = path . resolve ( __dirname , '../rrvideo-output.webm' ) ;
3235 expect ( fs . existsSync ( outputFile ) ) . toBe ( true ) ;
3336 fs . removeSync ( outputFile ) ;
@@ -37,7 +40,7 @@ describe('should be able to run cli', () => {
3740 const outputFile = path . resolve ( __dirname , './generated/output.webm' ) ;
3841 execSync (
3942 `node ./build/cli.js --input ./test/generated/example.json --output ${ outputFile } ` ,
40- { stdio : 'pipe' } ,
43+ execOptions ,
4144 ) ;
4245 expect ( fs . existsSync ( outputFile ) ) . toBe ( true ) ;
4346 fs . removeSync ( outputFile ) ;
0 commit comments