Add db tests

This commit is contained in:
Alex Gleason 2025-02-16 00:21:41 -06:00
parent c59bb421c6
commit 773b5da461
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,6 @@
import { DittoDB } from './DittoDB.ts';
Deno.test('DittoDB', async () => {
const db = DittoDB.create('memory://');
await DittoDB.migrate(db.kysely);
});

View file

@ -0,0 +1,10 @@
import { assertEquals } from '@std/assert';
import { DittoPglite } from './DittoPglite.ts';
Deno.test('DittoPglite.create', () => {
const db = DittoPglite.create('memory://');
assertEquals(db.poolSize, 1);
assertEquals(db.availableConnections, 1);
});