File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -125,17 +125,27 @@ describe('MockFirestore', function () {
125125 transaction . update ( db . doc ( 'doc' ) , {
126126 name : 'abc'
127127 } ) ;
128- return 'cba' ;
129128 } ) ;
130- } ) . then ( function ( transactionReturn ) {
129+ } ) . then ( function ( ) {
131130 db . doc ( 'doc' ) . get ( ) . then ( function ( doc2 ) {
132131 expect ( doc2 . get ( 'name' ) ) . to . equal ( 'abc' ) ;
133- expect ( transactionReturn ) . to . equal ( 'cba' ) ;
134132 done ( ) ;
135133 } ) . catch ( done ) ;
136134 } ) . catch ( done ) ;
137135 } ) . catch ( done ) ;
138136 } ) ;
137+
138+ it ( 'returns the return value of the passed function' , function ( ) {
139+ db . autoFlush ( ) ;
140+
141+ return db . runTransaction ( function ( transaction ) {
142+ return transaction . get ( db . doc ( 'doc' ) ) . then ( function ( ) {
143+ return 'cba' ;
144+ } ) ;
145+ } ) . then ( function ( transactionReturn ) {
146+ expect ( transactionReturn ) . to . equal ( 'cba' ) ;
147+ } ) ;
148+ } ) ;
139149 } ) ;
140150
141151 describe ( '#batch' , function ( ) {
You can’t perform that action at this time.
0 commit comments