commit 3b64ec746cbbb40fc1efebef8c87099b70b879b8
parent 7287e7d6ae95b3131dc49a69057be6eace765d07
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Mon, 16 Nov 2026 07:56:11 -0500
tts route test: the tuning and reading keys, refused out of range
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/editor/app/api/ops/tts/route.test.ts b/editor/app/api/ops/tts/route.test.ts
@@ -57,7 +57,7 @@ test("a wrong token is a 401", async () => {
test("an unknown key is a 400 naming the accepted ones", async () => {
const { status, json } = await post({ text: "hi", reference: "/voice.wav" });
assert.equal(status, 400);
- assert.match(json.error!, /unknown key\(s\): reference — this route accepts text, file, voice, engine, speed, out/);
+ assert.match(json.error!, /unknown key\(s\): reference — this route accepts text, file, voice, engine, speed, out, tuning, reading/);
});
test("the controller's refusals come back as 400s", async () => {
@@ -73,6 +73,9 @@ test("the controller's refusals come back as 400s", async () => {
[{ text: "hi", engine: "kokoro" }, /Kokoro-82M is not installed .* run `archilyzer tts setup`/],
[{ text: "hi", out: path.join(CORPUS, "a.wav") }, /inside the corpus/],
[{ text: "hi", out: path.join(ROOT, "a.mp3") }, /must name a \.wav file/],
+ [{ text: "hi", tuning: { top_p: 2 } }, /^"tuning\.top_p" must be a number from 0\.05 to 1 \(got 2\)$/],
+ [{ text: "hi", tuning: { seed: 1 } }, /"tuning\.seed" is not a tuning field/],
+ [{ text: "hi", reading: 100_000 }, /^"reading" must be a whole number from 0 to 99999/],
];
for (const [body, re] of cases) {
const { status, json } = await post(body);