Add DittoPostgres test

This commit is contained in:
Alex Gleason 2025-03-05 13:27:34 -06:00
parent c7175f8301
commit 4e0479f7c8
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

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