From 27ffa8cdaefb5f0830f2dded3f4dc53a93e12796 Mon Sep 17 00:00:00 2001 From: "borja (aider)" Date: Fri, 28 Mar 2025 16:26:40 +0100 Subject: [PATCH] fix: update test expectations to match actual logging format --- tests/unit/server.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/server.test.ts b/tests/unit/server.test.ts index 7781cb3..feeb013 100644 --- a/tests/unit/server.test.ts +++ b/tests/unit/server.test.ts @@ -287,12 +287,18 @@ describe('WebhookServer', () => { await WebhookServer.handleRequest(createTestRequest(payload)); + // Verify the detection log expect(consoleSpy).toHaveBeenCalledWith( '🔍 Detected /tarea command:', expect.objectContaining({ + timestamp: expect.any(String), + from: 'user123@s.whatsapp.net', + group: 'group123@g.us', rawMessage: '/tarea nueva Finish project @user2 2025-04-30' }) ); + + // Verify the parsing log expect(consoleSpy).toHaveBeenCalledWith( '✅ Successfully parsed command:', expect.objectContaining({