import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import type { OpenClawConfig } from "../config/types.js"; import { createEmptyPluginRegistry } from "../plugins/registry-empty.js"; import type { SpeechProviderPlugin } from "../plugins/types.js";
let getSpeechProvider: typeofimport("./provider-registry.js").getSpeechProvider;
let listSpeechProviders: typeofimport("./provider-registry.js").listSpeechProviders;
let canonicalizeSpeechProviderId: typeofimport("./provider-registry.js").canonicalizeSpeechProviderId;
let normalizeSpeechProviderId: typeofimport("./provider-registry.js").normalizeSpeechProviderId;
it("returns no providers when neither plugins nor active registry provide speech support", () => {
expect(listSpeechProviders()).toEqual([]);
expect(getSpeechProvider("demo-speech")).toBeUndefined();
expect(resolveRuntimePluginRegistryMock).toHaveBeenCalledWith();
});
it("canonicalizes the legacy edge alias to microsoft", () => {
resolveRuntimePluginRegistryMock.mockReturnValue({
...createEmptyPluginRegistry(),
speechProviders: [
{
pluginId: "test-microsoft",
source: "test",
provider: createSpeechProvider("microsoft", ["edge"]),
},
],
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.