@@ -71,27 +71,30 @@ describe('executeVideoOperation', () => {
7171 } )
7272 } )
7373
74- it ( 'fails opaque provenance before inspecting or downloading a Runway file' , async ( ) => {
75- mocks . validateOpaqueModelInputProvenance . mockReturnValue ( {
76- success : false ,
77- error : 'Model input provenance is unavailable' ,
78- status : 400 ,
79- } )
74+ it . each ( [ 'runway' , 'falai' ] as const ) (
75+ 'fails opaque provenance before inspecting or downloading a %s file' ,
76+ async ( provider ) => {
77+ mocks . validateOpaqueModelInputProvenance . mockReturnValue ( {
78+ success : false ,
79+ error : 'Model input provenance is unavailable' ,
80+ status : 400 ,
81+ } )
8082
81- await expect (
82- executeVideoOperation (
83- {
84- provider : 'runway' ,
85- apiKey : 'key' ,
86- prompt : 'A cinematic sunrise' ,
87- visualReference : file ,
88- } ,
89- { headers : new Headers ( ) , requestId : 'request-1' , userId : 'user-1' }
90- )
91- ) . rejects . toMatchObject ( { status : 400 , message : 'Model input provenance is unavailable' } )
92- expect ( mockAssertToolFileAccess ) . not . toHaveBeenCalled ( )
93- expect ( mocks . generateVideo ) . not . toHaveBeenCalled ( )
94- } )
83+ await expect (
84+ executeVideoOperation (
85+ {
86+ provider,
87+ apiKey : 'key' ,
88+ prompt : 'A cinematic sunrise' ,
89+ visualReference : file ,
90+ } ,
91+ { headers : new Headers ( ) , requestId : 'request-1' , userId : 'user-1' }
92+ )
93+ ) . rejects . toMatchObject ( { status : 400 , message : 'Model input provenance is unavailable' } )
94+ expect ( mockAssertToolFileAccess ) . not . toHaveBeenCalled ( )
95+ expect ( mocks . generateVideo ) . not . toHaveBeenCalled ( )
96+ }
97+ )
9598
9699 it ( 'fails closed for model-unsafe workspace files' , async ( ) => {
97100 mockIsModelSafeWorkspaceFileKey . mockResolvedValue ( false )
0 commit comments