The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { describe, expect, it } from "vite-plus/test"; |
| 2 | |
| 3 | import { buildTranscriptionPostProcessingPrompt } from "./TranscriptionPostProcessing.ts"; |
| 4 | |
| 5 | describe("buildTranscriptionPostProcessingPrompt", () => { |
| 6 | it("names the correction cue only when the person set one", () => { |
| 7 | const draft = { text: "Make it 42.", selection: { start: 11, end: 11 } }; |
| 8 | const plain = buildTranscriptionPostProcessingPrompt("Clean.", "sorry 24", draft); |
| 9 | expect(plain).not.toContain("Correction cue"); |
| 10 | expect(plain.startsWith("Clean.\n\n<transcript>")).toBe(true); |
| 11 | const cued = buildTranscriptionPostProcessingPrompt("Clean.", "sorry 24", draft, ' so"rry '); |
| 12 | expect(cued).toContain('Correction cue: "so\\"rry".'); |
| 13 | expect(cued.indexOf("Correction cue")).toBeLessThan(cued.indexOf("<transcript>")); |
| 14 | }); |
| 15 | }); |