@@ -1244,28 +1244,26 @@ apiDescribe('Validation:', (persistence: boolean) => {
1244
1244
expect ( ( ) =>
1245
1245
collection . where ( FieldPath . documentId ( ) , '>=' , '' )
1246
1246
) . to . throw (
1247
- 'Function Query.where() requires its third parameter to be ' +
1248
- 'a valid document ID if the first parameter is ' +
1249
- 'FieldPath.documentId(), but it was an empty string.'
1247
+ 'Invalid query. When querying with FieldPath.documentId(), you ' +
1248
+ 'must provide a valid document ID, but it was an empty string.'
1250
1249
) ;
1251
1250
expect ( ( ) =>
1252
1251
collection . where ( FieldPath . documentId ( ) , '>=' , 'foo/bar/baz' )
1253
1252
) . to . throw (
1254
- `Invalid third parameter to Query.where() . When querying a collection by ` +
1255
- `FieldPath.documentId(), the value provided must be a plain document ID, but ` +
1256
- `'foo/bar/baz' contains a slash .`
1253
+ `Invalid query . When querying a collection by ` +
1254
+ `FieldPath.documentId(), you must provide a plain document ID, but ` +
1255
+ `'foo/bar/baz' contains a '/' character .`
1257
1256
) ;
1258
1257
expect ( ( ) =>
1259
1258
collection . where ( FieldPath . documentId ( ) , '>=' , 1 )
1260
1259
) . to . throw (
1261
- 'Function Query.where() requires its third parameter to be ' +
1262
- 'a string or a DocumentReference if the first parameter is ' +
1263
- 'FieldPath.documentId(), but it was: 1.'
1260
+ 'Invalid query. When querying with FieldPath.documentId(), you must ' +
1261
+ 'provide a valid string or a DocumentReference, but it was: 1.'
1264
1262
) ;
1265
1263
expect ( ( ) =>
1266
1264
db . collectionGroup ( 'foo' ) . where ( FieldPath . documentId ( ) , '>=' , 'foo' )
1267
1265
) . to . throw (
1268
- `Invalid third parameter to Query.where() . When querying a collection group by ` +
1266
+ `Invalid query . When querying a collection group by ` +
1269
1267
`FieldPath.documentId(), the value provided must result in a valid document path, ` +
1270
1268
`but 'foo' is not because it has an odd number of segments (1).`
1271
1269
) ;
@@ -1299,31 +1297,29 @@ apiDescribe('Validation:', (persistence: boolean) => {
1299
1297
expect ( ( ) =>
1300
1298
collection . where ( FieldPath . documentId ( ) , inOp , [ '' ] )
1301
1299
) . to . throw (
1302
- 'Function Query.where() requires its third parameter to be ' +
1303
- 'a valid document ID if the first parameter is ' +
1304
- 'FieldPath.documentId(), but it was an empty string.'
1300
+ 'Invalid query. When querying with FieldPath.documentId(), you ' +
1301
+ 'must provide a valid document ID, but it was an empty string.'
1305
1302
) ;
1306
1303
1307
1304
expect ( ( ) =>
1308
1305
collection . where ( FieldPath . documentId ( ) , inOp , [ 'foo/bar/baz' ] )
1309
1306
) . to . throw (
1310
- `Invalid third parameter to Query.where() . When querying a collection by ` +
1311
- `FieldPath.documentId(), the value provided must be a plain document ID, but ` +
1312
- `'foo/bar/baz' contains a slash .`
1307
+ `Invalid query . When querying a collection by ` +
1308
+ `FieldPath.documentId(), you must provide a plain document ID, but ` +
1309
+ `'foo/bar/baz' contains a '/' character .`
1313
1310
) ;
1314
1311
1315
1312
expect ( ( ) =>
1316
1313
collection . where ( FieldPath . documentId ( ) , inOp , [ 1 , 2 ] )
1317
1314
) . to . throw (
1318
- 'Function Query.where() requires its third parameter to be ' +
1319
- 'a string or a DocumentReference if the first parameter is ' +
1320
- 'FieldPath.documentId(), but it was: 1.'
1315
+ 'Invalid query. When querying with FieldPath.documentId(), you must ' +
1316
+ 'provide a valid string or a DocumentReference, but it was: 1.'
1321
1317
) ;
1322
1318
1323
1319
expect ( ( ) =>
1324
1320
db . collectionGroup ( 'foo' ) . where ( FieldPath . documentId ( ) , inOp , [ 'foo' ] )
1325
1321
) . to . throw (
1326
- `Invalid third parameter to Query.where() . When querying a collection group by ` +
1322
+ `Invalid query . When querying a collection group by ` +
1327
1323
`FieldPath.documentId(), the value provided must result in a valid document path, ` +
1328
1324
`but 'foo' is not because it has an odd number of segments (1).`
1329
1325
) ;
0 commit comments