mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-03 20:37:30 +00:00
16 lines
587 B
TypeScript
16 lines
587 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const generatedClientSource = readFileSync(new URL("./_gen/client.ts", import.meta.url), "utf8");
|
|
|
|
describe("generated cloud client source contract", () => {
|
|
it("documents SRT subtitles on the uploadAsset endpoint", () => {
|
|
const uploadAssetDocs = generatedClientSource.match(
|
|
/\/\*\*\s*\*\s*Upload Asset[\s\S]*?\*\/\s+async uploadAsset/,
|
|
)?.[0];
|
|
|
|
expect(uploadAssetDocs).toContain("SRT subtitle");
|
|
expect(uploadAssetDocs).toMatch(/Supported types:[^\n]*\bsrt\b/);
|
|
});
|
|
});
|