File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -187,24 +187,25 @@ describe('MockFirestore', function () {
187187 } ) ;
188188 } ) ;
189189
190- describe ( 'getAll' , function ( ) {
191- it ( '' , function ( ) {
190+ describe ( '# getAll' , function ( ) {
191+ it ( 'gets the value of all passed documents ' , function ( ) {
192192 var doc1 = db . doc ( 'doc1' ) ;
193193 var doc2 = db . doc ( 'doc2' ) ;
194194 var doc3 = db . doc ( 'doc3' ) ;
195195
196- db . autoFlush ( ) ;
197-
198196 doc1 . set ( { value : 1 } ) ;
199197 doc2 . set ( { value : 2 } ) ;
200198
201- return db
202- . getAll ( doc1 , doc2 , doc3 )
203- . then ( function ( snaps ) {
204- expect ( snaps [ 0 ] . data ( ) ) . to . deep . equal ( { value : 1 } ) ;
205- expect ( snaps [ 1 ] . data ( ) ) . to . deep . equal ( { value : 2 } ) ;
206- expect ( snaps [ 2 ] . exists ) . to . equal ( false ) ;
207- } ) ;
199+ var getAll = db
200+ . getAll ( doc1 , doc2 , doc3 ) ;
201+
202+ db . flush ( ) ;
203+
204+ return getAll . then ( function ( snaps ) {
205+ expect ( snaps [ 0 ] . data ( ) ) . to . deep . equal ( { value : 1 } ) ;
206+ expect ( snaps [ 1 ] . data ( ) ) . to . deep . equal ( { value : 2 } ) ;
207+ expect ( snaps [ 2 ] . exists ) . to . equal ( false ) ;
208+ } ) ;
208209 } ) ;
209210 } ) ;
210211} ) ;
You can’t perform that action at this time.
0 commit comments