@@ -856,9 +856,9 @@ describe("firestore", () => {
856
856
it ( "should handle other wheres" , ( ) => {
857
857
var citiesRef = db . collection ( "cities" ) ;
858
858
// [START example_filters]
859
- citiesRef . where ( "state" , "==" , "CA" ) ;
860
- citiesRef . where ( "population" , "<" , 100000 ) ;
861
- citiesRef . where ( "name" , ">=" , "San Francisco" ) ;
859
+ const nameQuery = citiesRef . where ( "state" , "==" , "CA" ) ;
860
+ const populationQuery = citiesRef . where ( "population" , "<" , 100000 ) ;
861
+ const nameQuery = citiesRef . where ( "name" , ">=" , "San Francisco" ) ;
862
862
// [END example_filters]
863
863
864
864
// [START simple_query_not_equal]
@@ -900,16 +900,16 @@ describe("firestore", () => {
900
900
it ( "should handle compound queries" , ( ) => {
901
901
var citiesRef = db . collection ( "cities" ) ;
902
902
// [START chain_filters]
903
- citiesRef . where ( "state" , "==" , "CO" ) . where ( "name" , "==" , "Denver" ) ;
904
- citiesRef . where ( "state" , "==" , "CA" ) . where ( "population" , "<" , 1000000 ) ;
903
+ const q1 = citiesRef . where ( "state" , "==" , "CO" ) . where ( "name" , "==" , "Denver" ) ;
904
+ const q2 = citiesRef . where ( "state" , "==" , "CA" ) . where ( "population" , "<" , 1000000 ) ;
905
905
// [END chain_filters]
906
906
} ) ;
907
907
908
908
it ( "should handle range filters on one field" , ( ) => {
909
909
var citiesRef = db . collection ( "cities" ) ;
910
910
// [START valid_range_filters]
911
- citiesRef . where ( "state" , ">=" , "CA" ) . where ( "state" , "<=" , "IN" ) ;
912
- citiesRef . where ( "state" , "==" , "CA" ) . where ( "population" , ">" , 1000000 ) ;
911
+ const q1 = citiesRef . where ( "state" , ">=" , "CA" ) . where ( "state" , "<=" , "IN" ) ;
912
+ const q2 = citiesRef . where ( "state" , "==" , "CA" ) . where ( "population" , ">" , 1000000 ) ;
913
913
// [END valid_range_filters]
914
914
} ) ;
915
915
0 commit comments