chore: Fix types in tests 37/N.

This commit is contained in:
cpojer
2026-02-17 15:47:14 +09:00
parent 7b31e8fc59
commit 238718c1d8
9 changed files with 43 additions and 17 deletions

View File

@@ -154,7 +154,7 @@ describe("applyMediaUnderstanding", () => {
body: "[Audio]\nTranscript:\ntranscribed text",
commandBody: "transcribed text",
});
expect(ctx.BodyForAgent).toBe(ctx.Body);
expect((ctx as unknown as { BodyForAgent?: string }).BodyForAgent).toBe(ctx.Body);
});
it("skips file blocks for text-like audio when transcription succeeds", async () => {
@@ -308,7 +308,7 @@ describe("applyMediaUnderstanding", () => {
});
expect(result.appliedAudio).toBe(true);
expect(ctx.Transcript).toBe("cli transcript");
expect((ctx as unknown as { Transcript?: string }).Transcript).toBe("cli transcript");
expect(ctx.Body).toBe("[Audio]\nTranscript:\ncli transcript");
});

View File

@@ -12,7 +12,7 @@ describe("media understanding scope", () => {
it("matches channel chatType explicitly", () => {
const scope = {
rules: [{ action: "deny", match: { chatType: "channel" } }],
} as const;
} as Parameters<typeof resolveMediaUnderstandingScope>[0]["scope"];
expect(resolveMediaUnderstandingScope({ scope, chatType: "channel" })).toBe("deny");
});