11import { WASQLiteOpenFactory , WASQLiteVFS } from '@powersync/web' ;
22import Logger from 'js-logger' ;
3- import { v4 as uuid } from 'uuid' ;
43import { afterEach , beforeAll , describe , expect , it , vi } from 'vitest' ;
54import { TestConnector } from './utils/MockStreamOpenFactory' ;
65import { ConnectedDatabaseUtils , generateConnectedDatabase } from './utils/generateConnectedDatabase' ;
@@ -23,13 +22,13 @@ describe(
2322 const funcWithWebWorker = ( ) =>
2423 generateConnectedDatabase ( {
2524 powerSyncOptions : {
26- dbFilename : `test-stream-connection-worker- ${ uuid ( ) } .db`
25+ dbFilename : `test-stream-connection-worker.db`
2726 }
2827 } ) ;
2928 const funcWithoutWebWorker = ( ) =>
3029 generateConnectedDatabase ( {
3130 powerSyncOptions : {
32- dbFilename : `test-stream-connection-no-worker- ${ uuid ( ) } .db` ,
31+ dbFilename : `test-stream-connection-no-worker.db` ,
3332 flags : {
3433 useWebWorker : false
3534 }
@@ -43,7 +42,7 @@ describe(
4342 generateConnectedDatabase ( {
4443 powerSyncOptions : {
4544 database : new WASQLiteOpenFactory ( {
46- dbFilename : `test-stream-connection-opfs- ${ uuid ( ) } .db` ,
45+ dbFilename : `test-stream-connection-opfs.db` ,
4746 vfs : WASQLiteVFS . OPFSCoopSyncVFS
4847 } )
4948 }
@@ -120,7 +119,7 @@ describe(
120119 const throwCounter = 2 ;
121120 uploadSpy . mockImplementation ( async ( db ) => {
122121 if ( uploadCounter ++ < throwCounter ) {
123- throw new Error ( ' No uploads yet' ) ;
122+ throw new Error ( ` ${ new Date ( ) } No uploads yet` ) ;
124123 }
125124 // Now actually do the upload
126125 const tx = await db . getNextCrudTransaction ( ) ;
0 commit comments