File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,9 @@ describe(
187187 } ) ;
188188
189189 itWithGenerators ( 'Should retry failed uploads when connected' , async ( createConnectedDatabase ) => {
190+ console . log ( 'connecting' ) ;
190191 connectionUtilities = await createConnectedDatabase ( ) ;
192+ console . log ( 'connected' ) ;
191193 const { powersync, uploadSpy } = connectionUtilities ;
192194
193195 expect ( powersync . connected ) . toBe ( true ) ;
@@ -199,18 +201,23 @@ describe(
199201 if ( uploadCounter ++ < throwCounter ) {
200202 throw new Error ( 'No uploads yet' ) ;
201203 }
204+ console . log ( 'allowing the upload' ) ;
202205 // Now actually do the upload
203206 const tx = await db . getNextCrudTransaction ( ) ;
204207 await tx ?. complete ( ) ;
205208 } ) ;
206209
210+ console . log ( 'creating an item' ) ;
207211 // do something which should trigger an upload
208212 await powersync . execute ( 'INSERT INTO users (id, name) VALUES (uuid(), ?)' , [ 'name' ] ) ;
209213
214+ console . log ( 'done creating an item' ) ;
215+
210216 // It should try and upload
211217 await vi . waitFor (
212218 ( ) => {
213219 // to-have-been-called seems to not work after failing a check
220+ console . log ( 'the number of calls is ' , uploadSpy . mock . calls . length ) ;
214221 expect ( uploadSpy . mock . calls . length ) . equals ( throwCounter + 1 ) ;
215222 } ,
216223 {
You can’t perform that action at this time.
0 commit comments