From 14e1ab5f26035c5d99ac87eaa73d7a6806cecbe2 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Mon, 2 Nov 2026 20:14:49 +0100 Subject: [PATCH] test: cover quick reply with the reply signature toggle off #1493 --- lib/outgoing/__tests__/quick-reply.test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/outgoing/__tests__/quick-reply.test.ts b/lib/outgoing/__tests__/quick-reply.test.ts index 3ff01cb8d..e8b6e9d8a 100644 --- a/lib/outgoing/__tests__/quick-reply.test.ts +++ b/lib/outgoing/__tests__/quick-reply.test.ts @@ -33,6 +33,14 @@ describe('prepareQuickReply', () => { expect(plain?.text).toMatch(/Thanks <3[\s\S]*-- \nMe$/); }); + it('sends the bare text when the reply signature toggle is off', async () => { + const withHtml = await prepareQuickReply({ ...input(html), insertSignature: false }); + expect(withHtml?.html).toBeUndefined(); + expect(withHtml?.text).toBe('Thanks <3'); + const plain = await prepareQuickReply({ ...input(text), insertSignature: false }); + expect(plain?.text).toBe('Thanks <3'); + }); + it('runs the finalisers with a reply context', async () => { const contexts: unknown[] = []; registerOutgoingFinalizer('f', 10, (bodies, context) => {