30 lines
847 B
TypeScript
30 lines
847 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { buildVersionString, deriveOutputBaseName, validateExportManifest } from "./exports";
|
|
|
|
describe("render export helpers", () => {
|
|
it("formats version strings with zero-padding", () => {
|
|
expect(buildVersionString(4)).toBe("v004");
|
|
expect(buildVersionString(42)).toBe("v042");
|
|
});
|
|
|
|
it("derives the output base name from a frame pattern", () => {
|
|
expect(deriveOutputBaseName("UNG_106_010_020_cmp_TT_v004.[####].exr")).toBe(
|
|
"UNG_106_010_020_cmp_TT_v004"
|
|
);
|
|
});
|
|
|
|
it("rejects invalid manifests", () => {
|
|
expect(() =>
|
|
validateExportManifest({
|
|
shotCode: "UNG_106_010_020",
|
|
projectCode: "UNG_S1",
|
|
aepPath: "",
|
|
compName: "",
|
|
frameStart: 1001,
|
|
frameEnd: 1000,
|
|
fps: 24,
|
|
})
|
|
).toThrow();
|
|
});
|
|
});
|