@powersync/service-module-mongodb 0.2.0 → 0.3.1

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.
package/test/src/util.ts CHANGED
@@ -1,7 +1,8 @@
1
- import * as types from '@module/types/types.js';
2
-
1
+ import { mongo } from '@powersync/lib-service-mongodb';
3
2
  import * as mongo_storage from '@powersync/service-module-mongodb-storage';
4
- import * as mongo from 'mongodb';
3
+ import * as postgres_storage from '@powersync/service-module-postgres-storage';
4
+
5
+ import * as types from '@module/types/types.js';
5
6
  import { env } from './env.js';
6
7
 
7
8
  export const TEST_URI = env.MONGO_TEST_DATA_URL;
@@ -16,6 +17,10 @@ export const INITIALIZED_MONGO_STORAGE_FACTORY = mongo_storage.MongoTestStorageF
16
17
  isCI: env.CI
17
18
  });
18
19
 
20
+ export const INITIALIZED_POSTGRES_STORAGE_FACTORY = postgres_storage.PostgresTestStorageFactoryGenerator({
21
+ url: env.PG_STORAGE_TEST_URL
22
+ });
23
+
19
24
  export async function clearTestDb(db: mongo.Db) {
20
25
  await db.dropDatabase();
21
26
  }