diff --git a/tests/unit/server.test.ts b/tests/unit/server.test.ts index 8f684d7..91ae843 100644 --- a/tests/unit/server.test.ts +++ b/tests/unit/server.test.ts @@ -26,6 +26,9 @@ beforeEach(() => { mockAdd = mock(() => Promise.resolve()); ResponseQueue.add = mockAdd; + // Ensure database is initialized (recreates tables if dropped) + initializeDatabase(testDb); + // Reset database state between tests testDb.exec('DELETE FROM task_assignments'); testDb.exec('DELETE FROM tasks');