@@ -127,9 +127,15 @@ describe('Parse.Query Aggregate testing', () => {
127127 get ( Parse . serverURL + '/aggregate/TestObject' , options )
128128 . then ( resp => {
129129 expect ( resp . results . length ) . toBe ( 3 ) ;
130- expect ( resp . results [ 0 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
131- expect ( resp . results [ 1 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
132- expect ( resp . results [ 2 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
130+ expect (
131+ Object . prototype . hasOwnProperty . call ( resp . results [ 0 ] , 'objectId' )
132+ ) . toBe ( true ) ;
133+ expect (
134+ Object . prototype . hasOwnProperty . call ( resp . results [ 1 ] , 'objectId' )
135+ ) . toBe ( true ) ;
136+ expect (
137+ Object . prototype . hasOwnProperty . call ( resp . results [ 2 ] , 'objectId' )
138+ ) . toBe ( true ) ;
133139 expect ( resp . results [ 0 ] . objectId ) . not . toBe ( undefined ) ;
134140 expect ( resp . results [ 1 ] . objectId ) . not . toBe ( undefined ) ;
135141 expect ( resp . results [ 2 ] . objectId ) . not . toBe ( undefined ) ;
@@ -148,9 +154,15 @@ describe('Parse.Query Aggregate testing', () => {
148154 } ) ;
149155 const resp = await get ( Parse . serverURL + '/aggregate/TestObject' , options ) ;
150156 expect ( resp . results . length ) . toBe ( 3 ) ;
151- expect ( resp . results [ 0 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
152- expect ( resp . results [ 1 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
153- expect ( resp . results [ 2 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
157+ expect (
158+ Object . prototype . hasOwnProperty . call ( resp . results [ 0 ] , 'objectId' )
159+ ) . toBe ( true ) ;
160+ expect (
161+ Object . prototype . hasOwnProperty . call ( resp . results [ 1 ] , 'objectId' )
162+ ) . toBe ( true ) ;
163+ expect (
164+ Object . prototype . hasOwnProperty . call ( resp . results [ 2 ] , 'objectId' )
165+ ) . toBe ( true ) ;
154166 expect ( resp . results [ 0 ] . objectId ) . not . toBe ( undefined ) ;
155167 expect ( resp . results [ 1 ] . objectId ) . not . toBe ( undefined ) ;
156168 expect ( resp . results [ 2 ] . objectId ) . not . toBe ( undefined ) ;
@@ -371,8 +383,12 @@ describe('Parse.Query Aggregate testing', () => {
371383 expect ( results . length ) . toEqual ( 4 ) ;
372384 for ( let i = 0 ; i < results . length ; i ++ ) {
373385 const item = results [ i ] ;
374- expect ( item . hasOwnProperty ( 'updatedAt' ) ) . toEqual ( true ) ;
375- expect ( item . hasOwnProperty ( 'objectId' ) ) . toEqual ( false ) ;
386+ expect ( Object . prototype . hasOwnProperty . call ( item , 'updatedAt' ) ) . toEqual (
387+ true
388+ ) ;
389+ expect ( Object . prototype . hasOwnProperty . call ( item , 'objectId' ) ) . toEqual (
390+ false
391+ ) ;
376392 }
377393 done ( ) ;
378394 } ) ;
@@ -482,7 +498,9 @@ describe('Parse.Query Aggregate testing', () => {
482498 } ) ;
483499 get ( Parse . serverURL + '/aggregate/TestObject' , options )
484500 . then ( resp => {
485- expect ( resp . results [ 0 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
501+ expect (
502+ Object . prototype . hasOwnProperty . call ( resp . results [ 0 ] , 'objectId' )
503+ ) . toBe ( true ) ;
486504 expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
487505 expect ( resp . results [ 0 ] . total ) . toBe ( 50 ) ;
488506 done ( ) ;
@@ -498,7 +516,9 @@ describe('Parse.Query Aggregate testing', () => {
498516 } ) ;
499517 get ( Parse . serverURL + '/aggregate/TestObject' , options )
500518 . then ( resp => {
501- expect ( resp . results [ 0 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
519+ expect (
520+ Object . prototype . hasOwnProperty . call ( resp . results [ 0 ] , 'objectId' )
521+ ) . toBe ( true ) ;
502522 expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
503523 expect ( resp . results [ 0 ] . total ) . toBe ( 4 ) ;
504524 done ( ) ;
@@ -514,7 +534,9 @@ describe('Parse.Query Aggregate testing', () => {
514534 } ) ;
515535 get ( Parse . serverURL + '/aggregate/TestObject' , options )
516536 . then ( resp => {
517- expect ( resp . results [ 0 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
537+ expect (
538+ Object . prototype . hasOwnProperty . call ( resp . results [ 0 ] , 'objectId' )
539+ ) . toBe ( true ) ;
518540 expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
519541 expect ( resp . results [ 0 ] . minScore ) . toBe ( 10 ) ;
520542 done ( ) ;
@@ -530,7 +552,9 @@ describe('Parse.Query Aggregate testing', () => {
530552 } ) ;
531553 get ( Parse . serverURL + '/aggregate/TestObject' , options )
532554 . then ( resp => {
533- expect ( resp . results [ 0 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
555+ expect (
556+ Object . prototype . hasOwnProperty . call ( resp . results [ 0 ] , 'objectId' )
557+ ) . toBe ( true ) ;
534558 expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
535559 expect ( resp . results [ 0 ] . maxScore ) . toBe ( 20 ) ;
536560 done ( ) ;
@@ -546,7 +570,9 @@ describe('Parse.Query Aggregate testing', () => {
546570 } ) ;
547571 get ( Parse . serverURL + '/aggregate/TestObject' , options )
548572 . then ( resp => {
549- expect ( resp . results [ 0 ] . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
573+ expect (
574+ Object . prototype . hasOwnProperty . call ( resp . results [ 0 ] , 'objectId' )
575+ ) . toBe ( true ) ;
550576 expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
551577 expect ( resp . results [ 0 ] . avgScore ) . toBe ( 12.5 ) ;
552578 done ( ) ;
@@ -966,7 +992,9 @@ describe('Parse.Query Aggregate testing', () => {
966992 . then ( resp => {
967993 expect ( resp . results . length ) . toBe ( 2 ) ;
968994 resp . results . forEach ( result => {
969- expect ( result . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
995+ expect ( Object . prototype . hasOwnProperty . call ( result , 'objectId' ) ) . toBe (
996+ true
997+ ) ;
970998 expect ( result . name ) . toBe ( undefined ) ;
971999 expect ( result . sender ) . toBe ( undefined ) ;
9721000 expect ( result . size ) . toBe ( undefined ) ;
0 commit comments