


























@@ -1134,9 +1134,9 @@ describe("capability cli", () => {
11341134argv: ["capability", "image", "describe", "--file", "photo.jpg", "--json"],
11351135}),
11361136).rejects.toThrow("exit 1");
1137-expect(mocks.runtime.error).toHaveBeenCalledWith(
1138-expect.stringMatching(/No description returned for image/),
1139-);
1137+expect(runtimeErrorMessages()).toEqual([
1138+`Error: No description returned for image: ${path.resolve("photo.jpg")}`,
1139+]);
11401140});
1141114111421142it("reports missing image understanding configuration for image describe", async () => {
@@ -1630,9 +1630,9 @@ describe("capability cli", () => {
16301630argv: ["capability", "audio", "transcribe", "--file", "memo.m4a", "--json"],
16311631}),
16321632).rejects.toThrow("exit 1");
1633-expect(mocks.runtime.error).toHaveBeenCalledWith(
1634-expect.stringMatching(/No transcript returned for audio/),
1635-);
1633+expect(runtimeErrorMessages()).toEqual([
1634+`Error: No transcript returned for audio: ${path.resolve("memo.m4a")}`,
1635+]);
16361636});
1637163716381638it("reports missing audio transcription configuration for audio transcribe", async () => {
@@ -1666,9 +1666,7 @@ describe("capability cli", () => {
16661666argv: ["capability", "audio", "transcribe", "--file", "memo.m4a", "--json"],
16671667}),
16681668).rejects.toThrow("exit 1");
1669-expect(mocks.runtime.error).toHaveBeenCalledWith(
1670-expect.stringMatching(/Audio transcription response missing text/),
1671-);
1669+expect(runtimeErrorMessages()).toEqual(["Error: Audio transcription response missing text"]);
16721670});
1673167116741672it("forwards transcription prompt and language hints", async () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。