From 4e0479f7c84bc09ed353a3383044c107103a6ef8 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 5 Mar 2025 13:27:34 -0600 Subject: [PATCH] Add DittoPostgres test --- packages/db/adapters/DittoPostgres.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 packages/db/adapters/DittoPostgres.test.ts diff --git a/packages/db/adapters/DittoPostgres.test.ts b/packages/db/adapters/DittoPostgres.test.ts new file mode 100644 index 00000000..ea362ab0 --- /dev/null +++ b/packages/db/adapters/DittoPostgres.test.ts @@ -0,0 +1,11 @@ +import { DittoConf } from '@ditto/conf'; + +import { DittoPostgres } from './DittoPostgres.ts'; + +const conf = new DittoConf(Deno.env); +const isPostgres = /^postgres(?:ql)?:/.test(conf.databaseUrl); + +Deno.test('DittoPostgres', { ignore: !isPostgres }, async () => { + await using db = new DittoPostgres(conf.databaseUrl); + await db.migrate(); +});