mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Add db tests
This commit is contained in:
parent
c59bb421c6
commit
773b5da461
2 changed files with 16 additions and 0 deletions
6
packages/db/DittoDB.test.ts
Normal file
6
packages/db/DittoDB.test.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
import { DittoDB } from './DittoDB.ts';
|
||||||
|
|
||||||
|
Deno.test('DittoDB', async () => {
|
||||||
|
const db = DittoDB.create('memory://');
|
||||||
|
await DittoDB.migrate(db.kysely);
|
||||||
|
});
|
||||||
10
packages/db/adapters/DittoPglite.test.ts
Normal file
10
packages/db/adapters/DittoPglite.test.ts
Normal 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);
|
||||||
|
});
|
||||||
Loading…
Add table
Reference in a new issue