File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1109,6 +1109,26 @@ describe('nearMedia searchers', () => {
11091109 expect ( mockClient . query ) . toHaveBeenCalledWith ( expectedQuery ) ;
11101110 } ) ;
11111111
1112+ test ( 'a query with a valid nearVideo with all params' , ( ) => {
1113+ const mockClient : any = {
1114+ query : jest . fn ( ) ,
1115+ } ;
1116+
1117+ const expectedQuery = `{Get{Person(nearVideo:{video:"iVBORw0KGgoAAAANS",certainty:0.8,distance:0.6}){name}}}` ;
1118+
1119+ new Getter ( mockClient )
1120+ . withClassName ( 'Person' )
1121+ . withFields ( 'name' )
1122+ . withNearVideo ( {
1123+ video : 'iVBORw0KGgoAAAANS' ,
1124+ certainty : 0.8 ,
1125+ distance : 0.6 ,
1126+ } )
1127+ . do ( ) ;
1128+
1129+ expect ( mockClient . query ) . toHaveBeenCalledWith ( expectedQuery ) ;
1130+ } ) ;
1131+
11121132 test ( 'a query with a valid nearAudio' , ( ) => {
11131133 const mockClient : any = {
11141134 query : jest . fn ( ) ,
You can’t perform that action at this time.
0 commit comments