|
| 1 | +import { WASQLiteOpenFactory, WASQLiteVFS } from '@powersync/web'; |
1 | 2 | import Logger from 'js-logger'; |
2 | 3 | import { afterEach, beforeAll, describe, expect, it, vi } from 'vitest'; |
3 | 4 | import { TestConnector } from './utils/MockStreamOpenFactory'; |
4 | 5 | import { ConnectedDatabaseUtils, generateConnectedDatabase } from './utils/generateConnectedDatabase'; |
5 | | -import { WASQLiteOpenFactory, WASQLiteVFS } from '@powersync/web'; |
6 | 6 |
|
7 | 7 | const UPLOAD_TIMEOUT_MS = 3000; |
8 | 8 |
|
@@ -30,14 +30,20 @@ describe( |
30 | 30 | } |
31 | 31 | }); |
32 | 32 |
|
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 | + ); |
41 | 47 | }; |
42 | 48 |
|
43 | 49 | beforeAll(() => Logger.useDefaults()); |
|
0 commit comments