Skip to content

Commit 53d5a73

Browse files
Fix compat tests
1 parent 15cc188 commit 53d5a73

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

packages/firestore-compat/test/validation.test.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -813,12 +813,12 @@ apiDescribe('Validation:', (persistence: boolean) => {
813813
);
814814
expect(() => query.startAt('foo/bar')).to.throw(
815815
'Invalid query. When querying a collection and ordering by ' +
816-
'FieldPath.documentId(), the value passed to Query.startAt() ' +
816+
'documentId(), the value passed to Query.startAt() ' +
817817
"must be a plain document ID, but 'foo/bar' contains a slash."
818818
);
819819
expect(() => cgQuery.startAt('foo')).to.throw(
820820
'Invalid query. When querying a collection group and ordering by ' +
821-
'FieldPath.documentId(), the value passed to Query.startAt() ' +
821+
'documentId(), the value passed to Query.startAt() ' +
822822
"must result in a valid document path, but 'foo' is not because " +
823823
'it contains an odd number of segments.'
824824
);
@@ -1208,42 +1208,42 @@ apiDescribe('Validation:', (persistence: boolean) => {
12081208
expect(() =>
12091209
collection.where(FieldPath.documentId(), '>=', '')
12101210
).to.throw(
1211-
'Invalid query. When querying with FieldPath.documentId(), you ' +
1211+
'Invalid query. When querying with documentId(), you ' +
12121212
'must provide a valid document ID, but it was an empty string.'
12131213
);
12141214
expect(() =>
12151215
collection.where(FieldPath.documentId(), '>=', 'foo/bar/baz')
12161216
).to.throw(
1217-
`Invalid query. When querying a collection by ` +
1218-
`FieldPath.documentId(), you must provide a plain document ID, but ` +
1217+
`Invalid query. When querying a collection by documentId(), ` +
1218+
`you must provide a plain document ID, but ` +
12191219
`'foo/bar/baz' contains a '/' character.`
12201220
);
12211221
expect(() =>
12221222
collection.where(FieldPath.documentId(), '>=', 1)
12231223
).to.throw(
1224-
'Invalid query. When querying with FieldPath.documentId(), you must ' +
1224+
'Invalid query. When querying with documentId(), you must ' +
12251225
'provide a valid string or a DocumentReference, but it was: 1.'
12261226
);
12271227
expect(() =>
12281228
db.collectionGroup('foo').where(FieldPath.documentId(), '>=', 'foo')
12291229
).to.throw(
1230-
`Invalid query. When querying a collection group by ` +
1231-
`FieldPath.documentId(), the value provided must result in a valid document path, ` +
1230+
`Invalid query. When querying a collection group by documentId(), ` +
1231+
`the value provided must result in a valid document path, ` +
12321232
`but 'foo' is not because it has an odd number of segments (1).`
12331233
);
12341234

12351235
expect(() =>
12361236
collection.where(FieldPath.documentId(), 'array-contains', 1)
12371237
).to.throw(
12381238
"Invalid Query. You can't perform 'array-contains' queries on " +
1239-
'FieldPath.documentId().'
1239+
'documentId().'
12401240
);
12411241

12421242
expect(() =>
12431243
collection.where(FieldPath.documentId(), 'array-contains-any', 1)
12441244
).to.throw(
12451245
"Invalid Query. You can't perform 'array-contains-any' queries on " +
1246-
'FieldPath.documentId().'
1246+
'documentId().'
12471247
);
12481248
}
12491249
);
@@ -1261,30 +1261,30 @@ apiDescribe('Validation:', (persistence: boolean) => {
12611261
expect(() =>
12621262
collection.where(FieldPath.documentId(), 'in', [''])
12631263
).to.throw(
1264-
'Invalid query. When querying with FieldPath.documentId(), you ' +
1264+
'Invalid query. When querying with documentId(), you ' +
12651265
'must provide a valid document ID, but it was an empty string.'
12661266
);
12671267

12681268
expect(() =>
12691269
collection.where(FieldPath.documentId(), 'in', ['foo/bar/baz'])
12701270
).to.throw(
1271-
`Invalid query. When querying a collection by ` +
1272-
`FieldPath.documentId(), you must provide a plain document ID, but ` +
1273-
`'foo/bar/baz' contains a '/' character.`
1271+
`Invalid query. When querying a collection by documentId(), you ` +
1272+
`must provide a plain document ID, but 'foo/bar/baz' contains a ` +
1273+
`'/' character.`
12741274
);
12751275

12761276
expect(() =>
12771277
collection.where(FieldPath.documentId(), 'in', [1, 2])
12781278
).to.throw(
1279-
'Invalid query. When querying with FieldPath.documentId(), you must ' +
1279+
'Invalid query. When querying with documentId(), you must ' +
12801280
'provide a valid string or a DocumentReference, but it was: 1.'
12811281
);
12821282

12831283
expect(() =>
12841284
db.collectionGroup('foo').where(FieldPath.documentId(), 'in', ['foo'])
12851285
).to.throw(
1286-
`Invalid query. When querying a collection group by ` +
1287-
`FieldPath.documentId(), the value provided must result in a valid document path, ` +
1286+
`Invalid query. When querying a collection group by documentId(), ` +
1287+
`the value provided must result in a valid document path, ` +
12881288
`but 'foo' is not because it has an odd number of segments (1).`
12891289
);
12901290
}

0 commit comments

Comments
 (0)