From 391105870841ab76d8dc3bdf6f0105cd854b5ea8 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 09:59:56 +0100 Subject: [PATCH] test: tighten discord threading utility assertions --- .../src/monitor/monitor.threading-utils.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extensions/discord/src/monitor/monitor.threading-utils.test.ts b/extensions/discord/src/monitor/monitor.threading-utils.test.ts index c09532d7bf38..bd7b43cecf62 100644 --- a/extensions/discord/src/monitor/monitor.threading-utils.test.ts +++ b/extensions/discord/src/monitor/monitor.threading-utils.test.ts @@ -245,9 +245,11 @@ describe("resolveDiscordPresenceUpdate", () => { it("returns status-only presence when activity is omitted", () => { const presence = resolveDiscordPresenceUpdate({ status: "dnd" }); - expect(presence).toMatchObject({ + expect(presence).toEqual({ + since: null, status: "dnd", activities: [], + afk: false, }); }); @@ -341,7 +343,8 @@ describe("resolveDiscordAutoThreadContext", () => { continue; } - expect(context, testCase.name).toMatchObject({ + expect(context, testCase.name).toEqual({ + createdThreadId: "thread", To: "channel:thread", From: "discord:channel:thread", OriginatingTo: "channel:thread", @@ -350,6 +353,10 @@ describe("resolveDiscordAutoThreadContext", () => { channel: "discord", peer: { kind: "channel", id: "thread" }, }), + ModelParentSessionKey: testCase.expectedModelParentSessionKey, + ...(testCase.parentInheritanceEnabled === true + ? { ParentSessionKey: testCase.expectedParentSessionKey } + : {}), }); expect(context?.ParentSessionKey, testCase.name).toBe(testCase.expectedParentSessionKey); expect(context?.ModelParentSessionKey, testCase.name).toBe(