Skip to content

Commit b3b5b7a

Browse files
test
1 parent f2128c7 commit b3b5b7a

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

packages/web/tests/stream.test.ts

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1+
import { WASQLiteOpenFactory, WASQLiteVFS } from '@powersync/web';
12
import Logger from 'js-logger';
23
import { afterEach, beforeAll, describe, expect, it, vi } from 'vitest';
34
import { TestConnector } from './utils/MockStreamOpenFactory';
45
import { ConnectedDatabaseUtils, generateConnectedDatabase } from './utils/generateConnectedDatabase';
5-
import { WASQLiteOpenFactory, WASQLiteVFS } from '@powersync/web';
66

77
const UPLOAD_TIMEOUT_MS = 3000;
88

@@ -30,14 +30,20 @@ describe(
3030
}
3131
});
3232

33-
it(`${name} - with web worker`, () => test(funcWithWebWorker));
34-
it(`${name} - without web worker`, () => test(funcWithoutWebWorker));
35-
it(`${name} - with OPFS`, () => test(() => generateConnectedDatabase({ powerSyncOptions: {
36-
database: new WASQLiteOpenFactory({
37-
dbFilename: 'test-stream-connection-opfs.db',
38-
vfs: WASQLiteVFS.OPFSCoopSyncVFS
39-
})
40-
}})));
33+
it.sequential(`${name} - with web worker`, () => test(funcWithWebWorker));
34+
it.sequential(`${name} - without web worker`, () => test(funcWithoutWebWorker));
35+
it.sequential(`${name} - with OPFS`, () =>
36+
test(() =>
37+
generateConnectedDatabase({
38+
powerSyncOptions: {
39+
database: new WASQLiteOpenFactory({
40+
dbFilename: 'test-stream-connection-opfs.db',
41+
vfs: WASQLiteVFS.OPFSCoopSyncVFS
42+
})
43+
}
44+
})
45+
)
46+
);
4147
};
4248

4349
beforeAll(() => Logger.useDefaults());

0 commit comments

Comments
 (0)