@@ -65,7 +65,8 @@ import {
65
65
SnapshotOptions ,
66
66
newTestApp ,
67
67
QuerySnapshot ,
68
- vector
68
+ vector ,
69
+ getDocsFromServer
69
70
} from '../util/firebase_export' ;
70
71
import {
71
72
apiDescribe ,
@@ -710,9 +711,9 @@ apiDescribe('Database', persistence => {
710
711
711
712
return withTestCollection ( persistence , docs , async randomCol => {
712
713
// We validate that the SDK orders the vector field the same way as the backend
713
- // by comparing the sort order of vector fields from a Query.get() and
714
- // Query. onSnapshot(). Query. onSnapshot() will return sort order of the SDK,
715
- // and Query.get() will return sort order of the backend.
714
+ // by comparing the sort order of vector fields from getDocsFromServer and
715
+ // onSnapshot. onSnapshot will return sort order of the SDK,
716
+ // and getDocsFromServer will return sort order of the backend.
716
717
717
718
const orderedQuery = query ( randomCol , orderBy ( 'embedding' ) ) ;
718
719
const gotInitialSnapshot = new Deferred < QuerySnapshot > ( ) ;
@@ -730,7 +731,7 @@ apiDescribe('Database', persistence => {
730
731
const watchSnapshot = await gotInitialSnapshot . promise ;
731
732
unsubscribe ( ) ;
732
733
733
- const getSnapshot = await getDocs ( orderedQuery ) ;
734
+ const getSnapshot = await getDocsFromServer ( orderedQuery ) ;
734
735
735
736
// Compare the snapshot (including sort order) of a snapshot
736
737
// from Query.onSnapshot() to an actual snapshot from Query.get()
0 commit comments