@@ -100,7 +100,9 @@ describe('Maestro', () => {
100100 // Default mock for fs.promises.open - returns valid zip magic bytes
101101 fs . promises . open = jest
102102 . fn ( )
103- . mockResolvedValue ( createMockFileHandle ( ) as unknown as fs . promises . FileHandle ) ;
103+ . mockResolvedValue (
104+ createMockFileHandle ( ) as unknown as fs . promises . FileHandle ,
105+ ) ;
104106 } ) ;
105107
106108 describe ( 'Validation' , ( ) => {
@@ -2945,7 +2947,8 @@ flows:
29452947` ;
29462948 const projectDir = path . resolve ( path . sep , 'project' ) ;
29472949 // First call (config.yaml) fails, second call (config.yml) succeeds
2948- fs . promises . readFile = jest . fn ( )
2950+ fs . promises . readFile = jest
2951+ . fn ( )
29492952 . mockRejectedValueOnce ( new Error ( 'ENOENT: no such file' ) )
29502953 . mockResolvedValueOnce ( configContent ) ;
29512954 fs . promises . readdir = jest . fn ( ) . mockResolvedValue ( [ ] ) ;
@@ -2987,11 +2990,12 @@ flows:
29872990 it ( 'should exclude config.yml from flow files when no config exists' , async ( ) => {
29882991 const projectDir = path . resolve ( path . sep , 'project' ) ;
29892992 // Both config.yaml and config.yml fail
2990- fs . promises . readFile = jest . fn ( )
2993+ fs . promises . readFile = jest
2994+ . fn ( )
29912995 . mockRejectedValue ( new Error ( 'ENOENT: no such file' ) ) ;
29922996 fs . promises . readdir = jest . fn ( ) . mockResolvedValue ( [
29932997 { name : 'flow1.yaml' , isFile : ( ) => true } ,
2994- { name : 'config.yml' , isFile : ( ) => true } , // Should be excluded as a config file
2998+ { name : 'config.yml' , isFile : ( ) => true } , // Should be excluded as a config file
29952999 ] ) ;
29963000 fs . promises . access = jest . fn ( ) . mockResolvedValue ( undefined ) ;
29973001
@@ -4123,7 +4127,6 @@ flows:
41234127 const missingRefs = await maestro [ 'findMissingReferences' ] (
41244128 [ flowPath ] ,
41254129 [ flowPath ] , // Only flow file in included files
4126- projectDir ,
41274130 ) ;
41284131
41294132 expect ( missingRefs ) . toHaveLength ( 1 ) ;
@@ -4151,7 +4154,6 @@ flows:
41514154 const missingRefs = await maestro [ 'findMissingReferences' ] (
41524155 [ flowPath ] ,
41534156 [ flowPath ] ,
4154- projectDir ,
41554157 ) ;
41564158
41574159 expect ( missingRefs ) . toHaveLength ( 1 ) ;
@@ -4172,7 +4174,6 @@ flows:
41724174 const missingRefs = await maestro [ 'findMissingReferences' ] (
41734175 [ flowPath ] ,
41744176 [ flowPath ] ,
4175- projectDir ,
41764177 ) ;
41774178
41784179 expect ( missingRefs ) . toHaveLength ( 1 ) ;
@@ -4195,7 +4196,6 @@ flows:
41954196 const missingRefs = await maestro [ 'findMissingReferences' ] (
41964197 [ flowPath ] ,
41974198 [ flowPath ] ,
4198- projectDir ,
41994199 ) ;
42004200
42014201 expect ( missingRefs ) . toHaveLength ( 2 ) ;
@@ -4223,7 +4223,6 @@ flows:
42234223 const missingRefs = await maestro [ 'findMissingReferences' ] (
42244224 [ flowPath ] ,
42254225 [ flowPath , scriptPath ] , // Script is included
4226- projectDir ,
42274226 ) ;
42284227
42294228 expect ( missingRefs ) . toHaveLength ( 0 ) ;
@@ -4244,7 +4243,6 @@ flows:
42444243 const missingRefs = await maestro [ 'findMissingReferences' ] (
42454244 [ flowPath ] ,
42464245 [ flowPath ] , // Script not in included files
4247- projectDir ,
42484246 ) ;
42494247
42504248 // File is not in included files, so it should be reported
@@ -4266,7 +4264,6 @@ flows:
42664264 const missingRefs = await maestro [ 'findMissingReferences' ] (
42674265 [ flowPath ] ,
42684266 [ flowPath , scriptPath ] , // Script is in included files
4269- projectDir ,
42704267 ) ;
42714268
42724269 // File is in included files, so no missing reference reported
@@ -4290,7 +4287,6 @@ flows:
42904287 const missingRefs = await maestro [ 'findMissingReferences' ] (
42914288 [ flowPath ] ,
42924289 [ flowPath ] ,
4293- projectDir ,
42944290 ) ;
42954291
42964292 expect ( missingRefs ) . toHaveLength ( 4 ) ;
@@ -4318,7 +4314,6 @@ flows:
43184314 const missingRefs = await maestro [ 'findMissingReferences' ] (
43194315 [ flowPath ] ,
43204316 [ flowPath ] ,
4321- projectDir ,
43224317 ) ;
43234318
43244319 expect ( missingRefs ) . toHaveLength ( 1 ) ;
@@ -4341,7 +4336,6 @@ onFlowStart:
43414336 const missingRefs = await maestro [ 'findMissingReferences' ] (
43424337 [ flowPath ] ,
43434338 [ flowPath ] ,
4344- projectDir ,
43454339 ) ;
43464340
43474341 expect ( missingRefs ) . toHaveLength ( 1 ) ;
@@ -4360,7 +4354,6 @@ onFlowStart:
43604354 const missingRefs = await maestro [ 'findMissingReferences' ] (
43614355 [ flowPath ] ,
43624356 [ flowPath ] ,
4363- projectDir ,
43644357 ) ;
43654358
43664359 // Should not throw, just return empty
@@ -4376,7 +4369,6 @@ onFlowStart:
43764369 const missingRefs = await maestro [ 'findMissingReferences' ] (
43774370 [ jsPath ] ,
43784371 [ jsPath ] ,
4379- projectDir ,
43804372 ) ;
43814373
43824374 expect ( missingRefs ) . toHaveLength ( 0 ) ;
@@ -4403,7 +4395,6 @@ onFlowStart:
44034395 const missingRefs = await maestro [ 'findMissingReferences' ] (
44044396 [ flowPath1 , flowPath2 ] ,
44054397 [ flowPath1 , flowPath2 ] ,
4406- projectDir ,
44074398 ) ;
44084399
44094400 expect ( missingRefs ) . toHaveLength ( 2 ) ;
0 commit comments