@@ -688,8 +688,7 @@ function genericMutationTests(
688
688
} ) ;
689
689
690
690
it ( 'supports partials with merge' , async ( ) => {
691
- return withTestDb ( async db => {
692
- const coll = collection ( db , 'posts' ) ;
691
+ return withTestCollection ( async coll => {
693
692
const ref = doc ( coll , 'post' ) . withConverter ( postConverterMerge ) ;
694
693
await setDoc ( ref , new Post ( 'walnut' , 'author' ) ) ;
695
694
await setDoc (
@@ -704,8 +703,7 @@ function genericMutationTests(
704
703
} ) ;
705
704
706
705
it ( 'supports partials with mergeFields' , async ( ) => {
707
- return withTestDb ( async db => {
708
- const coll = collection ( db , 'posts' ) ;
706
+ return withTestCollection ( async coll => {
709
707
const ref = doc ( coll , 'post' ) . withConverter ( postConverterMerge ) ;
710
708
await setDoc ( ref , new Post ( 'walnut' , 'author' ) ) ;
711
709
await setDoc ( ref , { title : 'olive' } , { mergeFields : [ 'title' ] } ) ;
@@ -1359,8 +1357,7 @@ describe('withConverter() support', () => {
1359
1357
}
1360
1358
} ;
1361
1359
1362
- return withTestDb ( async db => {
1363
- const coll = collection ( db , 'tests' ) ;
1360
+ return withTestCollection ( async coll => {
1364
1361
const ref = doc ( coll , 'number' ) . withConverter ( primitiveConverter ) ;
1365
1362
await setDoc ( ref , 3 ) ;
1366
1363
const result = await getDoc ( ref ) ;
0 commit comments