Spaces:
Sleeping
Sleeping
Download apps/server/src/composition/preview-materialization-policy.unit.test.ts from phucsd/Oloka-Video-Dev: direct link, hf CLI and curl.
- Browser
- Download file 667 Bytes
-
https://huggingface.co/spaces/phucsd/Oloka-Video-Dev/resolve/main/apps/server/src/composition/preview-materialization-policy.unit.test.ts
- Command line
-
hf download hf://spaces/phucsd/Oloka-Video-Dev/apps/server/src/composition/preview-materialization-policy.unit.test.ts
-
curl -L -o preview-materialization-policy.unit.test.ts https://huggingface.co/spaces/phucsd/Oloka-Video-Dev/resolve/main/apps/server/src/composition/preview-materialization-policy.unit.test.ts
667 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { | |
| assertPreviewEmbeddedAssetBudgetV1, | |
| MAX_PREVIEW_EMBEDDED_ASSET_BYTES_V1, | |
| } from "./preview-materialization-policy.js"; | |
| describe("preview materialization policy", () => { | |
| it("accepts exactly 16 MiB and rejects 16 MiB plus one byte", () => { | |
| expect(MAX_PREVIEW_EMBEDDED_ASSET_BYTES_V1).toBe(16 * 1024 * 1024); | |
| expect(() => | |
| assertPreviewEmbeddedAssetBudgetV1(MAX_PREVIEW_EMBEDDED_ASSET_BYTES_V1), | |
| ).not.toThrow(); | |
| expect(() => | |
| assertPreviewEmbeddedAssetBudgetV1( | |
| MAX_PREVIEW_EMBEDDED_ASSET_BYTES_V1 + 1, | |
| ), | |
| ).toThrow(/preview_embedded_media_limit/i); | |
| }); | |
| }); | |