@@ -131,17 +131,22 @@ describe('utils.js', function () {
131131 } ) ;
132132
133133 it ( 'elements in the offline queue. Reply after the offline queue is empty and respect the command_obj callback' , function ( done ) {
134- clientMock . offline_queue . push ( create_command_obj ( ) , create_command_obj ( ) ) ;
134+ clientMock . offline_queue . push ( create_command_obj ( ) ) ;
135+ clientMock . offline_queue . push ( create_command_obj ( ) ) ;
135136 utils . reply_in_order ( clientMock , function ( ) {
136137 assert . strictEqual ( clientMock . offline_queue . length , 0 ) ;
137138 assert . strictEqual ( res_count , 2 ) ;
138139 done ( ) ;
139140 } , null , null ) ;
140- while ( clientMock . offline_queue . length ) clientMock . offline_queue . shift ( ) . callback ( null , 'foo' ) ;
141+ while ( clientMock . offline_queue . length ) {
142+ clientMock . offline_queue . shift ( ) . callback ( null , 'foo' ) ;
143+ }
141144 } ) ;
142145
143146 it ( 'elements in the offline queue. Reply after the offline queue is empty and respect the command_obj error emit' , function ( done ) {
144- clientMock . command_queue . push ( { } , create_command_obj ( ) , { } ) ;
147+ clientMock . command_queue . push ( { } ) ;
148+ clientMock . command_queue . push ( create_command_obj ( ) ) ;
149+ clientMock . command_queue . push ( { } ) ;
145150 utils . reply_in_order ( clientMock , function ( ) {
146151 assert . strictEqual ( clientMock . command_queue . length , 0 ) ;
147152 assert ( emitted ) ;
@@ -158,8 +163,10 @@ describe('utils.js', function () {
158163 } ) ;
159164
160165 it ( 'elements in the offline queue and the command_queue. Reply all other commands got handled respect the command_obj' , function ( done ) {
161- clientMock . command_queue . push ( create_command_obj ( ) , create_command_obj ( ) ) ;
162- clientMock . offline_queue . push ( create_command_obj ( ) , { } ) ;
166+ clientMock . command_queue . push ( create_command_obj ( ) ) ;
167+ clientMock . command_queue . push ( create_command_obj ( ) ) ;
168+ clientMock . command_queue . push ( create_command_obj ( ) ) ;
169+ clientMock . offline_queue . push ( { } ) ;
163170 utils . reply_in_order ( clientMock , function ( err , res ) {
164171 assert . strictEqual ( clientMock . command_queue . length , 0 ) ;
165172 assert . strictEqual ( clientMock . offline_queue . length , 0 ) ;
0 commit comments