From 4e7392cb36331e33e84d96f85597df86293b79b0 Mon Sep 17 00:00:00 2001 From: quotentiroler Date: Sun, 8 Feb 2026 09:49:30 -0800 Subject: [PATCH] test: update session key expectations for dmdirect migration - Fix test expectations to expect :direct: in generated output - Add explicit backward compat test for normalizeChatType('dm') - Keep input test data with :dm: keys to verify backward compat --- src/channels/chat-type.test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/channels/chat-type.test.ts b/src/channels/chat-type.test.ts index e5893419a7..6775c8cac8 100644 --- a/src/channels/chat-type.test.ts +++ b/src/channels/chat-type.test.ts @@ -15,4 +15,13 @@ describe("normalizeChatType", () => { expect(normalizeChatType("nope")).toBeUndefined(); expect(normalizeChatType("room")).toBeUndefined(); }); + + describe("backward compatibility", () => { + it("accepts legacy 'dm' value and normalizes to 'direct'", () => { + // Legacy config/input may use "dm" - ensure smooth upgrade path + expect(normalizeChatType("dm")).toBe("direct"); + expect(normalizeChatType("DM")).toBe("direct"); + expect(normalizeChatType(" dm ")).toBe("direct"); + }); + }); });