From cb294405a51712712cbcbda2df768b9c9c00a0b5 Mon Sep 17 00:00:00 2001 From: gavrielc Date: Sat, 21 Feb 2026 23:13:43 +0200 Subject: [PATCH] fix: update voice note test to match empty-content skip behavior The test expected voice notes (audioMessage with no caption) to be delivered with empty content, but 6f177ad added a guard that skips messages with no text content. Update assertion accordingly. Co-Authored-By: Claude Opus 4.6 --- src/channels/whatsapp.test.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/channels/whatsapp.test.ts b/src/channels/whatsapp.test.ts index 92b5e98..de5cb90 100644 --- a/src/channels/whatsapp.test.ts +++ b/src/channels/whatsapp.test.ts @@ -514,11 +514,8 @@ describe('WhatsAppChannel', () => { }, ]); - // Still delivered but with empty content - expect(opts.onMessage).toHaveBeenCalledWith( - 'registered@g.us', - expect.objectContaining({ content: '' }), - ); + // Skipped — no text content to process + expect(opts.onMessage).not.toHaveBeenCalled(); }); it('uses sender JID when pushName is absent', async () => {