File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,18 +164,20 @@ describe( 'Channel', function() {
164164 } ) ;
165165
166166 it ( 'should resend sent but unacknowledged changes on reconnect' , ( ) => new Promise ( resolve => {
167- channel . localQueue . sent [ 'fake-ccid' ] = { fake : 'change' }
167+ channel . localQueue . sent [ 'fake-ccid' ] = { fake : 'change' , ccid : 'fake-ccid' }
168168
169169 channel . on ( 'send' , cycle (
170- ( ) => channel . handleMessage ( 'i:{"index":[],"current":"cv"}' ) ,
171- m => {
170+ m => setImmediate ( ( ) => {
171+ equal ( m , 'i:1:::10' )
172+ channel . handleMessage ( 'i:{"index":[],"current":"cv"}' )
173+ } ) ,
174+ m => setImmediate ( ( ) => {
175+ equal ( m , 'c:{"fake":"change","ccid":"fake-ccid"}' )
172176 resolve ( )
173- }
177+ } )
174178 ) )
175179
176180 channel . handleMessage ( 'auth:user@example.com' )
177-
178- channel . emit ( 'ready' )
179181 } ) )
180182
181183 it ( 'should send remove operation' , function ( done ) {
You can’t perform that action at this time.
0 commit comments