@@ -1459,28 +1459,24 @@ apiDescribe('Validation:', (persistence: boolean) => {
1459
1459
}
1460
1460
) ;
1461
1461
1462
- validationIt . only (
1463
- persistence ,
1464
- 'cannot pass undefined as a field value' ,
1465
- db => {
1466
- const collection = db . collection ( 'test' ) ;
1467
- if ( usesFunctionalApi ( ) ) {
1468
- expect ( ( ) => collection . where ( 'foo' , '==' , undefined ) ) . to . throw (
1469
- 'Function where() called with invalid data. Unsupported field value: undefined'
1470
- ) ;
1471
- expect ( ( ) => collection . orderBy ( 'foo' ) . startAt ( undefined ) ) . to . throw (
1472
- 'Function startAt() called with invalid data. Unsupported field value: undefined'
1473
- ) ;
1474
- } else {
1475
- expect ( ( ) => collection . where ( 'foo' , '==' , undefined ) ) . to . throw (
1476
- 'Function Query.where() requires a valid third argument, but it was undefined.'
1477
- ) ;
1478
- expect ( ( ) => collection . orderBy ( 'foo' ) . startAt ( undefined ) ) . to . throw (
1479
- 'Function Query.startAt() requires a valid first argument, but it was undefined.'
1480
- ) ;
1481
- }
1462
+ validationIt ( persistence , 'cannot pass undefined as a field value' , db => {
1463
+ const collection = db . collection ( 'test' ) ;
1464
+ if ( usesFunctionalApi ( ) ) {
1465
+ expect ( ( ) => collection . where ( 'foo' , '==' , undefined ) ) . to . throw (
1466
+ 'Function where() called with invalid data. Unsupported field value: undefined'
1467
+ ) ;
1468
+ expect ( ( ) => collection . orderBy ( 'foo' ) . startAt ( undefined ) ) . to . throw (
1469
+ 'Function startAt() called with invalid data. Unsupported field value: undefined'
1470
+ ) ;
1471
+ } else {
1472
+ expect ( ( ) => collection . where ( 'foo' , '==' , undefined ) ) . to . throw (
1473
+ 'Function Query.where() requires a valid third argument, but it was undefined.'
1474
+ ) ;
1475
+ expect ( ( ) => collection . orderBy ( 'foo' ) . startAt ( undefined ) ) . to . throw (
1476
+ 'Function Query.startAt() requires a valid first argument, but it was undefined.'
1477
+ ) ;
1482
1478
}
1483
- ) ;
1479
+ } ) ;
1484
1480
} ) ;
1485
1481
} ) ;
1486
1482
0 commit comments