@@ -127,9 +127,15 @@ describe('Parse.Query Aggregate testing', () => {
127
127
get ( Parse . serverURL + '/aggregate/TestObject' , options )
128
128
. then ( resp => {
129
129
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 ) ;
133
139
expect ( resp . results [ 0 ] . objectId ) . not . toBe ( undefined ) ;
134
140
expect ( resp . results [ 1 ] . objectId ) . not . toBe ( undefined ) ;
135
141
expect ( resp . results [ 2 ] . objectId ) . not . toBe ( undefined ) ;
@@ -148,9 +154,15 @@ describe('Parse.Query Aggregate testing', () => {
148
154
} ) ;
149
155
const resp = await get ( Parse . serverURL + '/aggregate/TestObject' , options ) ;
150
156
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 ) ;
154
166
expect ( resp . results [ 0 ] . objectId ) . not . toBe ( undefined ) ;
155
167
expect ( resp . results [ 1 ] . objectId ) . not . toBe ( undefined ) ;
156
168
expect ( resp . results [ 2 ] . objectId ) . not . toBe ( undefined ) ;
@@ -371,8 +383,12 @@ describe('Parse.Query Aggregate testing', () => {
371
383
expect ( results . length ) . toEqual ( 4 ) ;
372
384
for ( let i = 0 ; i < results . length ; i ++ ) {
373
385
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
+ ) ;
376
392
}
377
393
done ( ) ;
378
394
} ) ;
@@ -482,7 +498,9 @@ describe('Parse.Query Aggregate testing', () => {
482
498
} ) ;
483
499
get ( Parse . serverURL + '/aggregate/TestObject' , options )
484
500
. 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 ) ;
486
504
expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
487
505
expect ( resp . results [ 0 ] . total ) . toBe ( 50 ) ;
488
506
done ( ) ;
@@ -498,7 +516,9 @@ describe('Parse.Query Aggregate testing', () => {
498
516
} ) ;
499
517
get ( Parse . serverURL + '/aggregate/TestObject' , options )
500
518
. 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 ) ;
502
522
expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
503
523
expect ( resp . results [ 0 ] . total ) . toBe ( 4 ) ;
504
524
done ( ) ;
@@ -514,7 +534,9 @@ describe('Parse.Query Aggregate testing', () => {
514
534
} ) ;
515
535
get ( Parse . serverURL + '/aggregate/TestObject' , options )
516
536
. 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 ) ;
518
540
expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
519
541
expect ( resp . results [ 0 ] . minScore ) . toBe ( 10 ) ;
520
542
done ( ) ;
@@ -530,7 +552,9 @@ describe('Parse.Query Aggregate testing', () => {
530
552
} ) ;
531
553
get ( Parse . serverURL + '/aggregate/TestObject' , options )
532
554
. 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 ) ;
534
558
expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
535
559
expect ( resp . results [ 0 ] . maxScore ) . toBe ( 20 ) ;
536
560
done ( ) ;
@@ -546,7 +570,9 @@ describe('Parse.Query Aggregate testing', () => {
546
570
} ) ;
547
571
get ( Parse . serverURL + '/aggregate/TestObject' , options )
548
572
. 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 ) ;
550
576
expect ( resp . results [ 0 ] . objectId ) . toBe ( null ) ;
551
577
expect ( resp . results [ 0 ] . avgScore ) . toBe ( 12.5 ) ;
552
578
done ( ) ;
@@ -966,7 +992,9 @@ describe('Parse.Query Aggregate testing', () => {
966
992
. then ( resp => {
967
993
expect ( resp . results . length ) . toBe ( 2 ) ;
968
994
resp . results . forEach ( result => {
969
- expect ( result . hasOwnProperty ( 'objectId' ) ) . toBe ( true ) ;
995
+ expect ( Object . prototype . hasOwnProperty . call ( result , 'objectId' ) ) . toBe (
996
+ true
997
+ ) ;
970
998
expect ( result . name ) . toBe ( undefined ) ;
971
999
expect ( result . sender ) . toBe ( undefined ) ;
972
1000
expect ( result . size ) . toBe ( undefined ) ;
0 commit comments