test: tag provider unit assertions

This commit is contained in:
Shakker
2026-05-12 21:42:45 +01:00
parent 1725b4ae49
commit 693c775a7f
4 changed files with 6 additions and 5 deletions

View File

@@ -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 () => {

View File

@@ -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" });

View File

@@ -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);
});

View File

@@ -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(