Files
OmniRoute/tests/unit/validation-audio-misc-split.test.ts
Diego Rodrigues de Sa e Souza 833adce8fb refactor(api): extrai validators áudio/speech + misc apikey de validation.ts (#4930)
Integrado em release/v3.8.36 (validation.ts split fatia 4 — áudio/speech + misc apikey)
2026-06-24 09:53:36 -03:00

35 lines
1.4 KiB
TypeScript

// Characterization of the validation.ts audio/misc split (god-file decomposition): the audio/speech +
// miscellaneous API-key validators (deepgram, assemblyai, elevenlabs, inworld, kie, aws-polly,
// bailian, reka, maritalk, nlpcloud, runwayml, nous-research, poe) moved into
// validation/audioMiscProviders.ts. Behavior-preserving move — the lock here is module surface; the
// runtime behavior stays covered by the provider-validation-specialty / branches suites.
import { test } from "node:test";
import assert from "node:assert/strict";
const M = await import("../../src/lib/providers/validation/audioMiscProviders.ts");
const HOST = await import("../../src/lib/providers/validation.ts");
test("audioMiscProviders exposes its thirteen validators", () => {
for (const name of [
"validateDeepgramProvider",
"validateAssemblyAIProvider",
"validateElevenLabsProvider",
"validateInworldProvider",
"validateKieProvider",
"validateAwsPollyProvider",
"validateBailianCodingPlanProvider",
"validateRekaProvider",
"validateMaritalkProvider",
"validateNlpCloudProvider",
"validateRunwayProvider",
"validateNousResearchProvider",
"validatePoeProvider",
]) {
assert.equal(typeof (M as Record<string, unknown>)[name], "function", `missing ${name}`);
}
});
test("host dispatcher surface stays intact after the move", () => {
assert.equal(typeof (HOST as Record<string, unknown>).validateProviderApiKey, "function");
});