@powersync/service-module-postgres 0.0.0-dev-20250611110033 → 0.0.0-dev-20250617143654

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { PostgresRouteAPIAdapter } from '@module/api/PostgresRouteAPIAdapter.js';
2
- import { checkpointUserId, createWriteCheckpoint } from '@powersync/service-core';
2
+ import { checkpointUserId, createWriteCheckpoint, TestStorageFactory } from '@powersync/service-core';
3
3
  import { describe, test } from 'vitest';
4
- import { INITIALIZED_MONGO_STORAGE_FACTORY } from './util.js';
4
+ import { describeWithStorage } from './util.js';
5
5
  import { WalStreamTestContext } from './wal_stream_utils.js';
6
6
 
7
7
  import timers from 'node:timers/promises';
@@ -12,8 +12,11 @@ const BASIC_SYNC_RULES = `bucket_definitions:
12
12
  - SELECT id, description, other FROM "test_data"`;
13
13
 
14
14
  describe('checkpoint tests', () => {
15
+ describeWithStorage({}, checkpointTests);
16
+ });
17
+
18
+ const checkpointTests = (factory: TestStorageFactory) => {
15
19
  test('write checkpoints', { timeout: 50_000 }, async () => {
16
- const factory = INITIALIZED_MONGO_STORAGE_FACTORY;
17
20
  await using context = await WalStreamTestContext.open(factory);
18
21
 
19
22
  await context.updateSyncRules(BASIC_SYNC_RULES);
@@ -78,4 +81,4 @@ describe('checkpoint tests', () => {
78
81
  controller.abort();
79
82
  }
80
83
  });
81
- });
84
+ };