




















@@ -102,33 +102,22 @@ describe("comfy video-generation provider", () => {
102102}),
103103});
104104105-expect(fetchWithSsrFGuardMock).toHaveBeenNthCalledWith(
106-1,
107-expect.objectContaining({
108-url: "http://127.0.0.1:8188/prompt",
109-auditContext: "comfy-video-generate",
110-}),
111-);
105+expect(fetchWithSsrFGuardMock.mock.calls[0]?.[0].url).toBe("http://127.0.0.1:8188/prompt");
106+expect(fetchWithSsrFGuardMock.mock.calls[0]?.[0].auditContext).toBe("comfy-video-generate");
112107expect(parseJsonBody(1)).toEqual({
113108prompt: {
114109"6": { inputs: { text: "animate a lobster" } },
115110"9": { inputs: {} },
116111},
117112});
118-expect(fetchWithSsrFGuardMock).toHaveBeenNthCalledWith(
119-2,
120-expect.objectContaining({
121-url: "http://127.0.0.1:8188/history/local-video-1",
122-auditContext: "comfy-history",
123-}),
113+expect(fetchWithSsrFGuardMock.mock.calls[1]?.[0].url).toBe(
114+"http://127.0.0.1:8188/history/local-video-1",
124115);
125-expect(fetchWithSsrFGuardMock).toHaveBeenNthCalledWith(
126-3,
127-expect.objectContaining({
128-url: "http://127.0.0.1:8188/view?filename=generated.mp4&subfolder=&type=output",
129-auditContext: "comfy-video-download",
130-}),
116+expect(fetchWithSsrFGuardMock.mock.calls[1]?.[0].auditContext).toBe("comfy-history");
117+expect(fetchWithSsrFGuardMock.mock.calls[2]?.[0].url).toBe(
118+"http://127.0.0.1:8188/view?filename=generated.mp4&subfolder=&type=output",
131119);
120+expect(fetchWithSsrFGuardMock.mock.calls[2]?.[0].auditContext).toBe("comfy-video-download");
132121expect(result).toEqual({
133122videos: [
134123{
@@ -179,13 +168,10 @@ describe("comfy video-generation provider", () => {
179168}),
180169});
181170182-expect(fetchWithSsrFGuardMock).toHaveBeenNthCalledWith(
183-1,
184-expect.objectContaining({
185-url: "https://cloud.comfy.org/api/prompt",
186-auditContext: "comfy-video-generate",
187-}),
171+expect(fetchWithSsrFGuardMock.mock.calls[0]?.[0].url).toBe(
172+"https://cloud.comfy.org/api/prompt",
188173);
174+expect(fetchWithSsrFGuardMock.mock.calls[0]?.[0].auditContext).toBe("comfy-video-generate");
189175expect(result.metadata).toEqual({
190176promptId: "cloud-video-1",
191177outputNodeIds: ["9"],
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。