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(); +});