mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-07 01:56:04 +00:00
feat(cli,producer): add gif output format with two-pass palette encode (#1333)
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This commit is contained in:
co-authored by
Matt Van Horn
parent
e0ecd4d2d1
commit
e6b8d66c2d
@@ -5,6 +5,7 @@ import {
|
||||
MAX_PAGE_NAVIGATION_TIMEOUT_SECONDS,
|
||||
parseBrowserTimeoutMsArg,
|
||||
parseCompositionEntryArg,
|
||||
parseGifLoopArg,
|
||||
type BrowserTimeoutParseResult,
|
||||
type CompositionEntryParseResult,
|
||||
} from "./renderArgs.js";
|
||||
@@ -171,3 +172,18 @@ describe("parseCompositionEntryArg", () => {
|
||||
expect(err.kind).toBe("outside-project");
|
||||
});
|
||||
});
|
||||
|
||||
describe("parseGifLoopArg", () => {
|
||||
it("accepts absent flag, bounds, and integers", () => {
|
||||
expect(parseGifLoopArg(undefined)).toEqual({ ok: true, value: undefined });
|
||||
expect(parseGifLoopArg("0")).toEqual({ ok: true, value: 0 });
|
||||
expect(parseGifLoopArg("65535")).toEqual({ ok: true, value: 65535 });
|
||||
});
|
||||
|
||||
it("rejects out-of-range, non-integer, and empty inputs", () => {
|
||||
expect(parseGifLoopArg("-1").ok).toBe(false);
|
||||
expect(parseGifLoopArg("65536").ok).toBe(false);
|
||||
expect(parseGifLoopArg("1.5").ok).toBe(false);
|
||||
expect(parseGifLoopArg(" ").ok).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user