File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,26 @@ function defineSyncTests(impl: SyncClientImplementation) {
158158 await vi . waitFor ( ( ) => expect ( database . currentStatus . dataFlowStatus . downloading ) . toBeTruthy ( ) ) ;
159159 } ) ;
160160
161+ mockSyncServiceTest ( 'does not set uploading status without local writes' , async ( { syncService } ) => {
162+ const database = await syncService . createDatabase ( ) ;
163+ database . registerListener ( {
164+ statusChanged ( status ) {
165+ expect ( status . dataFlowStatus . uploading ) . toBeFalsy ( ) ;
166+ }
167+ } ) ;
168+
169+ database . connect ( new TestConnector ( ) , options ) ;
170+ await vi . waitFor ( ( ) => expect ( syncService . connectedListeners ) . toHaveLength ( 1 ) ) ;
171+
172+ syncService . pushLine ( {
173+ checkpoint : {
174+ last_op_id : '10' ,
175+ buckets : [ bucket ( 'a' , 10 ) ]
176+ }
177+ } ) ;
178+ await vi . waitFor ( ( ) => expect ( database . currentStatus . dataFlowStatus . downloading ) . toBeTruthy ( ) ) ;
179+ } ) ;
180+
161181 describe ( 'reports progress' , ( ) => {
162182 let lastOpId = 0 ;
163183
You can’t perform that action at this time.
0 commit comments