mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 19:10:44 +00:00
test: tighten media tool factory assertions
This commit is contained in:
@@ -113,7 +113,7 @@ function stubImageGenerationProviders() {
|
||||
}
|
||||
|
||||
function requireImageGenerateTool(tool: ReturnType<typeof createImageGenerateTool>) {
|
||||
expect(tool).not.toBeNull();
|
||||
expect(typeof tool?.execute).toBe("function");
|
||||
if (!tool) {
|
||||
throw new Error("expected image_generate tool");
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ describe("createMusicGenerateTool", () => {
|
||||
},
|
||||
}),
|
||||
});
|
||||
expect(tool).not.toBeNull();
|
||||
expect(typeof tool?.execute).toBe("function");
|
||||
if (!tool) {
|
||||
throw new Error("expected music_generate tool");
|
||||
}
|
||||
@@ -277,7 +277,7 @@ describe("createMusicGenerateTool", () => {
|
||||
},
|
||||
}),
|
||||
});
|
||||
expect(tool).not.toBeNull();
|
||||
expect(typeof tool?.execute).toBe("function");
|
||||
if (!tool) {
|
||||
throw new Error("expected music_generate tool");
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ function requirePdfTool(
|
||||
? R
|
||||
: never,
|
||||
) {
|
||||
expect(tool).not.toBeNull();
|
||||
expect(typeof tool?.execute).toBe("function");
|
||||
if (!tool) {
|
||||
throw new Error("expected pdf tool");
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ describe("createVideoGenerateTool", () => {
|
||||
},
|
||||
}),
|
||||
});
|
||||
expect(tool).not.toBeNull();
|
||||
expect(typeof tool?.execute).toBe("function");
|
||||
if (!tool) {
|
||||
throw new Error("expected video_generate tool");
|
||||
}
|
||||
@@ -589,7 +589,7 @@ describe("createVideoGenerateTool", () => {
|
||||
},
|
||||
}),
|
||||
});
|
||||
expect(tool).not.toBeNull();
|
||||
expect(typeof tool?.execute).toBe("function");
|
||||
if (!tool) {
|
||||
throw new Error("expected video_generate tool");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user