|
|
@ -251,12 +251,18 @@ describe('WebhookServer', () => {
|
|
|
|
await WebhookServer.handleRequest(createTestRequest(payload));
|
|
|
|
await WebhookServer.handleRequest(createTestRequest(payload));
|
|
|
|
|
|
|
|
|
|
|
|
expect(consoleSpy).toHaveBeenCalledWith(
|
|
|
|
expect(consoleSpy).toHaveBeenCalledWith(
|
|
|
|
expect.stringContaining('/tarea command received:'),
|
|
|
|
'🔍 Detected /tarea command:',
|
|
|
|
expect.objectContaining({
|
|
|
|
expect.objectContaining({
|
|
|
|
command: '/tarea',
|
|
|
|
rawMessage: '/tarea test'
|
|
|
|
arguments: 'test',
|
|
|
|
})
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(consoleSpy).toHaveBeenCalledWith(
|
|
|
|
|
|
|
|
'✅ Successfully parsed command:',
|
|
|
|
|
|
|
|
expect.objectContaining({
|
|
|
|
|
|
|
|
action: 'test',
|
|
|
|
|
|
|
|
description: '',
|
|
|
|
dueDate: 'none',
|
|
|
|
dueDate: 'none',
|
|
|
|
fullMessage: '/tarea test'
|
|
|
|
mentionCount: 0
|
|
|
|
})
|
|
|
|
})
|
|
|
|
);
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -277,10 +283,18 @@ describe('WebhookServer', () => {
|
|
|
|
await WebhookServer.handleRequest(createTestRequest(payload));
|
|
|
|
await WebhookServer.handleRequest(createTestRequest(payload));
|
|
|
|
|
|
|
|
|
|
|
|
expect(consoleSpy).toHaveBeenCalledWith(
|
|
|
|
expect(consoleSpy).toHaveBeenCalledWith(
|
|
|
|
expect.stringContaining('/tarea command received:'),
|
|
|
|
'🔍 Detected /tarea command:',
|
|
|
|
|
|
|
|
expect.objectContaining({
|
|
|
|
|
|
|
|
rawMessage: '/tarea due:2025-04-30 Finish project'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(consoleSpy).toHaveBeenCalledWith(
|
|
|
|
|
|
|
|
'✅ Successfully parsed command:',
|
|
|
|
expect.objectContaining({
|
|
|
|
expect.objectContaining({
|
|
|
|
|
|
|
|
action: 'due:2025-04-30',
|
|
|
|
|
|
|
|
description: 'Finish project',
|
|
|
|
dueDate: '2025-04-30',
|
|
|
|
dueDate: '2025-04-30',
|
|
|
|
arguments: 'due:2025-04-30 Finish project'
|
|
|
|
mentionCount: 0
|
|
|
|
})
|
|
|
|
})
|
|
|
|
);
|
|
|
|
);
|
|
|
|
});
|
|
|
|
});
|
|
|
|