mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
test: tag provider unit assertions
This commit is contained in:
@@ -578,8 +578,9 @@ describe("Google speech provider", () => {
|
||||
const provider = buildGoogleSpeechProvider();
|
||||
|
||||
const voices = await provider.listVoices?.({ providerConfig: {} });
|
||||
expect(voices?.some((voice) => voice.id === "Kore" && voice.name === "Kore")).toBe(true);
|
||||
expect(voices?.some((voice) => voice.id === "Puck" && voice.name === "Puck")).toBe(true);
|
||||
const voiceLabels = voices?.map((voice) => `${voice.id}:${voice.name}`);
|
||||
expect(voiceLabels).toContain("Kore:Kore");
|
||||
expect(voiceLabels).toContain("Puck:Puck");
|
||||
});
|
||||
|
||||
it("formats Google TTS HTTP errors with provider details", async () => {
|
||||
|
||||
@@ -1496,7 +1496,7 @@ describe("buildOpenAIRealtimeVoiceProvider", () => {
|
||||
socket.emit("message", Buffer.from(JSON.stringify({ type: "response.done" })));
|
||||
|
||||
expect(onError).not.toHaveBeenCalled();
|
||||
expect(parseSent(socket).some((event) => event.type === "response.create")).toBe(false);
|
||||
expect(parseSent(socket).filter((event) => event.type === "response.create")).toEqual([]);
|
||||
|
||||
bridge.submitToolResult("call_1", { text: "done" });
|
||||
|
||||
|
||||
@@ -983,7 +983,7 @@ describe("skill-workshop", () => {
|
||||
const proposal = details.proposal as SkillProposal | undefined;
|
||||
expect(proposal?.status).toBe("quarantined");
|
||||
expect(proposal?.quarantineReason).toContain("prompt");
|
||||
expect(proposal?.scanFindings?.some((finding) => finding.severity === "critical")).toBe(true);
|
||||
expect(proposal?.scanFindings?.map((finding) => finding.severity)).toContain("critical");
|
||||
const store = new SkillWorkshopStore({ stateDir, workspaceDir });
|
||||
expect(await store.list("quarantined")).toHaveLength(1);
|
||||
});
|
||||
|
||||
@@ -174,7 +174,7 @@ function firstRuntimeConfig(): VoiceCallRuntime["config"] | undefined {
|
||||
}
|
||||
|
||||
function expectWarningIncludes(text: string): void {
|
||||
expect(noopLogger.warn.mock.calls.some(([message]) => String(message).includes(text))).toBe(true);
|
||||
expect(noopLogger.warn.mock.calls.map(([message]) => String(message)).join("\n")).toContain(text);
|
||||
}
|
||||
|
||||
async function registerVoiceCallCli(
|
||||
|
||||
Reference in New Issue
Block a user