mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
* feat(registry): eight ad templates show their video preview in the catalog * refactor(scripts): the preview backfill reuses the shared entrypoint guard
22 lines
958 B
TypeScript
22 lines
958 B
TypeScript
import { describe, it } from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { missingBlockPreview } from "./backfill-block-previews.js";
|
|
|
|
describe("backfill block previews", () => {
|
|
it("fills a block that declares no preview with the catalog CDN pattern", () => {
|
|
assert.deepEqual(missingBlockPreview("app-showcase", undefined), {
|
|
video: "https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/app-showcase.mp4",
|
|
poster:
|
|
"https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/app-showcase.png",
|
|
});
|
|
});
|
|
|
|
it("keeps a declared preview that points somewhere else", () => {
|
|
const promoted = {
|
|
video: "https://static.heygen.ai/hyperframes/templates/promoted/abc/notes-reveal/preview.mp4",
|
|
poster: "https://static.heygen.ai/hyperframes/templates/promoted/abc/notes-reveal/poster.jpg",
|
|
};
|
|
assert.equal(missingBlockPreview("notes-reveal", promoted), null);
|
|
});
|
|
});
|