test: support server-side unit testing (#2485)

This commit is contained in:
Michael Thomas
2026-03-12 09:39:41 -04:00
committed by GitHub
parent 40edaea43f
commit 8563362588
17 changed files with 2355 additions and 68 deletions

11
server/test/db.ts Normal file
View File

@@ -0,0 +1,11 @@
import { resetTestDb, seedTestDb } from '@server/utils/seedTestDb';
import { before, beforeEach } from 'node:test';
export function setupTestDb() {
before(async () => {
await seedTestDb();
});
beforeEach(async () => {
await resetTestDb();
});
}