Files
hyperframes/packages/core/src/keyframeDefaults.test.ts
Meghna VasudevaandClaude Opus 5.5 b100ff16f3 refactor(core): share keyframe property defaults between SDK and Studio (#5438)
Move the keyframe rest-value table into @hyperframes/core/keyframe-defaults
and import it from the SDK backfill and Studio's gsapShared, replacing the two
hand-synced copies.

Closes #5387

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 00:07:40 +00:00

23 lines
598 B
TypeScript

import { describe, expect, it } from "vitest";
import { KEYFRAME_PROPERTY_DEFAULTS } from "./keyframeDefaults";
describe("KEYFRAME_PROPERTY_DEFAULTS", () => {
it("holds the rest value of each numeric keyframe prop", () => {
expect(KEYFRAME_PROPERTY_DEFAULTS).toEqual({
opacity: 1,
x: 0,
y: 0,
scale: 1,
scaleX: 1,
scaleY: 1,
rotation: 0,
width: 100,
height: 100,
});
});
it.each(["color", "filter", "backgroundColor"])("has no default for %s", (prop) => {
expect(KEYFRAME_PROPERTY_DEFAULTS[prop]).toBeUndefined();
});
});