mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 01:13:29 +00:00
chore: Fix types in tests 37/N.
This commit is contained in:
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user