Skip to content

Commit 10f89b2

Browse files
Add test
1 parent f9c4572 commit 10f89b2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/firestore/lite/test/integration.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,16 @@ describe('withConverter() support', () => {
10641064
});
10651065
});
10661066

1067+
it('keeps the converter when calling parent() with a DocumentReference', () => {
1068+
return withTestDb(async db => {
1069+
const coll = doc(db, 'root/doc').withConverter(postConverter);
1070+
const typedColl = parent(coll)!;
1071+
expect(
1072+
refEqual(typedColl, collection(db, 'root').withConverter(postConverter))
1073+
).to.be.true;
1074+
});
1075+
});
1076+
10671077
it('drops the converter when calling parent() with a CollectionReference', () => {
10681078
return withTestDb(async db => {
10691079
const coll = collection(db, 'root/doc/parent').withConverter(

0 commit comments

Comments
 (0)