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({