fix: update test expectations to match actual logging format

main
borja (aider) 3 months ago
parent 869c695d0a
commit 27ffa8cdae

@ -287,12 +287,18 @@ describe('WebhookServer', () => {
await WebhookServer.handleRequest(createTestRequest(payload)); await WebhookServer.handleRequest(createTestRequest(payload));
// Verify the detection log
expect(consoleSpy).toHaveBeenCalledWith( expect(consoleSpy).toHaveBeenCalledWith(
'🔍 Detected /tarea command:', '🔍 Detected /tarea command:',
expect.objectContaining({ expect.objectContaining({
timestamp: expect.any(String),
from: 'user123@s.whatsapp.net',
group: 'group123@g.us',
rawMessage: '/tarea nueva Finish project @user2 2025-04-30' rawMessage: '/tarea nueva Finish project @user2 2025-04-30'
}) })
); );
// Verify the parsing log
expect(consoleSpy).toHaveBeenCalledWith( expect(consoleSpy).toHaveBeenCalledWith(
'✅ Successfully parsed command:', '✅ Successfully parsed command:',
expect.objectContaining({ expect.objectContaining({

Loading…
Cancel
Save