
























@@ -40,6 +40,10 @@ vi.mock("../auto-reply/reply/directive-handling.levels.js", () => ({
40404141const { resolveDirectStatusReplyForSession } = await import("./command-status.runtime.js");
424243+function expectResolvedReasoningLevel(value: unknown, expected: string) {
44+expect((value as { resolvedReasoningLevel?: unknown }).resolvedReasoningLevel).toBe(expected);
45+}
46+4347describe("resolveDirectStatusReplyForSession", () => {
4448beforeEach(() => {
4549buildStatusReply.mockReset();
@@ -96,12 +100,8 @@ describe("resolveDirectStatusReplyForSession", () => {
96100});
9710198102expect(buildStatusReply).toHaveBeenCalledOnce();
99-expect(buildStatusReply.mock.calls[0]?.[0]).toMatchObject({
100-resolvedReasoningLevel: "off",
101-});
102-expect(result).toMatchObject({
103-resolvedReasoningLevel: "off",
104-});
103+expectResolvedReasoningLevel(buildStatusReply.mock.calls[0]?.[0], "off");
104+expectResolvedReasoningLevel(result, "off");
105105});
106106107107it("allows configured reasoning defaults for authorized direct /status senders", async () => {
@@ -138,9 +138,7 @@ describe("resolveDirectStatusReplyForSession", () => {
138138defaultGroupActivation: () => "always",
139139});
140140141-expect(result).toMatchObject({
142-resolvedReasoningLevel: "stream",
143-});
141+expectResolvedReasoningLevel(result, "stream");
144142});
145143146144it("hides configured reasoning defaults from unauthorized direct /status senders", async () => {
@@ -177,9 +175,7 @@ describe("resolveDirectStatusReplyForSession", () => {
177175defaultGroupActivation: () => "always",
178176});
179177180-expect(result).toMatchObject({
181-resolvedReasoningLevel: "off",
182-});
178+expectResolvedReasoningLevel(result, "off");
183179});
184180185181it("hides session reasoning state from unauthorized direct /status senders", async () => {
@@ -211,9 +207,7 @@ describe("resolveDirectStatusReplyForSession", () => {
211207defaultGroupActivation: () => "always",
212208});
213209214-expect(result).toMatchObject({
215-resolvedReasoningLevel: "off",
216-});
210+expectResolvedReasoningLevel(result, "off");
217211});
218212219213it("allows session reasoning state for authorized direct /status senders", async () => {
@@ -245,8 +239,6 @@ describe("resolveDirectStatusReplyForSession", () => {
245239defaultGroupActivation: () => "always",
246240});
247241248-expect(result).toMatchObject({
249-resolvedReasoningLevel: "stream",
250-});
242+expectResolvedReasoningLevel(result, "stream");
251243});
252244});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。