From 5a9e8a29e52edb86b6b1e4a635b751f4e98a69f8 Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 10:50:55 +0100 Subject: [PATCH] test: tighten qqbot outbound assertions --- .../engine/gateway/outbound-dispatch.test.ts | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/extensions/qqbot/src/engine/gateway/outbound-dispatch.test.ts b/extensions/qqbot/src/engine/gateway/outbound-dispatch.test.ts index be2c6f7d647..8f039dfa490 100644 --- a/extensions/qqbot/src/engine/gateway/outbound-dispatch.test.ts +++ b/extensions/qqbot/src/engine/gateway/outbound-dispatch.test.ts @@ -179,11 +179,9 @@ describe("dispatchOutbound", () => { { runtime, cfg: {}, account }, ); - expect(finalized).toMatchObject({ - MediaType: "audio/wav", - MediaTypes: ["audio/wav"], - QQVoiceAttachmentPaths: ["/tmp/qqbot/voice.wav"], - }); + expect(finalized?.MediaType).toBe("audio/wav"); + expect(finalized?.MediaTypes).toEqual(["audio/wav"]); + expect(finalized?.QQVoiceAttachmentPaths).toEqual(["/tmp/qqbot/voice.wav"]); expect(finalized).not.toHaveProperty("MediaPath"); expect(finalized).not.toHaveProperty("MediaPaths"); }); @@ -237,13 +235,11 @@ describe("dispatchOutbound", () => { { runtime, cfg: { commands: { text: true } }, account }, ); - expect(finalized).toMatchObject({ - CommandBody: "/models", - CommandAuthorized: true, - CommandSource: "text", - Provider: "qqbot", - Surface: "qqbot", - ChatType: "direct", - }); + expect(finalized?.CommandBody).toBe("/models"); + expect(finalized?.CommandAuthorized).toBe(true); + expect(finalized?.CommandSource).toBe("text"); + expect(finalized?.Provider).toBe("qqbot"); + expect(finalized?.Surface).toBe("qqbot"); + expect(finalized?.ChatType).toBe("direct"); }); });