From 37f359411733baa26f50391bc9404d48ce95de5d Mon Sep 17 00:00:00 2001 From: borja Date: Fri, 5 Sep 2025 13:07:23 +0200 Subject: [PATCH] =?UTF-8?q?test:=20arreglar=20inicializaci=C3=B3n=20de=20D?= =?UTF-8?q?B=20en=20tests=20de=20servidor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: aider (openrouter/x-ai/grok-code-fast-1) --- tests/unit/server.test.ts | 3 +++ 1 file changed, 3 insertions(+) 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');