File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2725,12 +2725,19 @@ describe('ParseQuery', () => {
27252725 } ) ;
27262726 expect ( options . useMasterKey ) . toEqual ( true ) ;
27272727 return Promise . resolve ( {
2728- results : [ ] ,
2728+ results : [
2729+ {
2730+ objectId : 'I55' ,
2731+ foo : 'bar' ,
2732+ } ,
2733+ ] ,
27292734 } ) ;
27302735 } ,
27312736 } ) ;
27322737 const q = new ParseQuery ( 'Item' ) ;
2733- await q . search ( 'searchTerm' , [ 'name' ] , { index : 'searchIndex' } ) ;
2738+ const obj = await q . search ( 'searchTerm' , [ 'name' ] , { index : 'searchIndex' } ) ;
2739+ expect ( obj [ 0 ] . id ) . toBe ( 'I55' ) ;
2740+ expect ( obj [ 0 ] . get ( 'foo' ) ) . toBe ( 'bar' ) ;
27342741 } ) ;
27352742
27362743 it ( 'search term is required' , async ( ) => {
@@ -2747,7 +2754,9 @@ describe('ParseQuery', () => {
27472754 CoreManager . setQueryController ( {
27482755 find ( ) { } ,
27492756 aggregate ( ) {
2750- return Promise . resolve ( ) ;
2757+ return Promise . resolve ( {
2758+ results : null ,
2759+ } ) ;
27512760 } ,
27522761 } ) ;
27532762
You can’t perform that action at this time.
0 commit comments