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 @@ -135,6 +135,26 @@ function defineSyncTests(impl: SyncClientImplementation) {
135135 await vi . waitFor ( ( ) => expect ( database . currentStatus . dataFlowStatus . downloading ) . toBeTruthy ( ) ) ;
136136 } ) ;
137137
138+ mockSyncServiceTest ( 'does not set uploading status without local writes' , async ( { syncService } ) => {
139+ const database = await syncService . createDatabase ( ) ;
140+ database . registerListener ( {
141+ statusChanged ( status ) {
142+ expect ( status . dataFlowStatus . uploading ) . toBeFalsy ( ) ;
143+ }
144+ } ) ;
145+
146+ database . connect ( new TestConnector ( ) , options ) ;
147+ await vi . waitFor ( ( ) => expect ( syncService . connectedListeners ) . toHaveLength ( 1 ) ) ;
148+
149+ syncService . pushLine ( {
150+ checkpoint : {
151+ last_op_id : '10' ,
152+ buckets : [ bucket ( 'a' , 10 ) ]
153+ }
154+ } ) ;
155+ await vi . waitFor ( ( ) => expect ( database . currentStatus . dataFlowStatus . downloading ) . toBeTruthy ( ) ) ;
156+ } ) ;
157+
138158 describe ( 'reports progress' , ( ) => {
139159 let lastOpId = 0 ;
140160
You can’t perform that action at this time.
0 commit comments