@@ -168,9 +168,9 @@ describe('firestore().doc() -> snapshot.get()', function () {
168168
169169 describe ( 'modular' , function ( ) {
170170 it ( 'throws if invalid fieldPath argument' , async function ( ) {
171- const { getFirestore, doc, getDocs } = firestoreModular ;
171+ const { getFirestore, doc, getDoc } = firestoreModular ;
172172 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
173- const snapshot = await getDocs ( ref ) ;
173+ const snapshot = await getDoc ( ref ) ;
174174
175175 try {
176176 snapshot . get ( 123 ) ;
@@ -182,9 +182,9 @@ describe('firestore().doc() -> snapshot.get()', function () {
182182 } ) ;
183183
184184 it ( 'throws if fieldPath is an empty string' , async function ( ) {
185- const { getFirestore, doc, getDocs } = firestoreModular ;
185+ const { getFirestore, doc, getDoc } = firestoreModular ;
186186 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
187- const snapshot = await getDocs ( ref ) ;
187+ const snapshot = await getDoc ( ref ) ;
188188
189189 try {
190190 snapshot . get ( '' ) ;
@@ -196,9 +196,9 @@ describe('firestore().doc() -> snapshot.get()', function () {
196196 } ) ;
197197
198198 it ( 'throws if fieldPath starts with a period (.)' , async function ( ) {
199- const { getFirestore, doc, getDocs } = firestoreModular ;
199+ const { getFirestore, doc, getDoc } = firestoreModular ;
200200 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
201- const snapshot = await getDocs ( ref ) ;
201+ const snapshot = await getDoc ( ref ) ;
202202
203203 try {
204204 snapshot . get ( '.foo' ) ;
@@ -210,9 +210,9 @@ describe('firestore().doc() -> snapshot.get()', function () {
210210 } ) ;
211211
212212 it ( 'throws if fieldPath ends with a period (.)' , async function ( ) {
213- const { getFirestore, doc, getDocs } = firestoreModular ;
213+ const { getFirestore, doc, getDoc } = firestoreModular ;
214214 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
215- const snapshot = await getDocs ( ref ) ;
215+ const snapshot = await getDoc ( ref ) ;
216216
217217 try {
218218 snapshot . get ( 'foo.' ) ;
@@ -224,9 +224,9 @@ describe('firestore().doc() -> snapshot.get()', function () {
224224 } ) ;
225225
226226 it ( 'throws if fieldPath contains ..' , async function ( ) {
227- const { getFirestore, doc, getDocs } = firestoreModular ;
227+ const { getFirestore, doc, getDoc } = firestoreModular ;
228228 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
229- const snapshot = await getDocs ( ref ) ;
229+ const snapshot = await getDoc ( ref ) ;
230230
231231 try {
232232 snapshot . get ( 'foo..bar' ) ;
@@ -238,9 +238,9 @@ describe('firestore().doc() -> snapshot.get()', function () {
238238 } ) ;
239239
240240 it ( 'returns undefined if the data does not exist' , async function ( ) {
241- const { getFirestore, doc, getDocs , FieldPath } = firestoreModular ;
241+ const { getFirestore, doc, getDoc , FieldPath } = firestoreModular ;
242242 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
243- const snapshot = await getDocs ( ref ) ;
243+ const snapshot = await getDoc ( ref ) ;
244244
245245 const val1 = snapshot . get ( 'foo' ) ;
246246 const val2 = snapshot . get ( 'foo.bar' ) ;
@@ -256,7 +256,7 @@ describe('firestore().doc() -> snapshot.get()', function () {
256256 } ) ;
257257
258258 it ( 'returns the correct data with string fieldPath' , async function ( ) {
259- const { getFirestore, doc, getDocs , setDoc, deleteDoc } = firestoreModular ;
259+ const { getFirestore, doc, getDoc , setDoc, deleteDoc } = firestoreModular ;
260260 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
261261 const types = {
262262 string : '12345' ,
@@ -270,7 +270,7 @@ describe('firestore().doc() -> snapshot.get()', function () {
270270 } ;
271271
272272 await setDoc ( ref , types ) ;
273- const snapshot = await getDocs ( ref ) ;
273+ const snapshot = await getDoc ( ref ) ;
274274
275275 const string1 = snapshot . get ( 'string' ) ;
276276 const string2 = snapshot . get ( 'map.string' ) ;
@@ -287,7 +287,7 @@ describe('firestore().doc() -> snapshot.get()', function () {
287287 } ) ;
288288
289289 it ( 'returns the correct data with FieldPath' , async function ( ) {
290- const { getFirestore, doc, getDocs , setDoc, deleteDoc, FieldPath } = firestoreModular ;
290+ const { getFirestore, doc, getDoc , setDoc, deleteDoc, FieldPath } = firestoreModular ;
291291 const ref = doc ( getFirestore ( ) , `${ COLLECTION } /foo` ) ;
292292 const types = {
293293 string : '12345' ,
@@ -301,7 +301,7 @@ describe('firestore().doc() -> snapshot.get()', function () {
301301 } ;
302302
303303 await setDoc ( ref , types ) ;
304- const snapshot = await getDocs ( ref ) ;
304+ const snapshot = await getDoc ( ref ) ;
305305
306306 const string1 = snapshot . get ( new FieldPath ( 'string' ) ) ;
307307 const string2 = snapshot . get ( new FieldPath ( 'map' , 'string' ) ) ;
0 commit comments