Skip to content

test: cover keyframe value predicates and assert committed slider state - #150

Merged
dazzatronus merged 1 commit into
mainfrom
derk/keyframe-predicate-tests
Aug 11, 2026
Merged

test: cover keyframe value predicates and assert committed slider state#150
dazzatronus merged 1 commit into
mainfrom
derk/keyframe-predicate-tests

Conversation

@dazzatronus

@dazzatronus dazzatronus commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Test-only follow-up to the opacity keyframe work. No source changes.

What changed

tests/clip-utils.test.ts (new) — covers isKeyframedValue and hasKeyframedVisualProperty, which had no tests. Both are now the single source of truth for "this value is animated or bound, so a scalar write would destroy it", used by the player, the media toolbar and the canvas selection handles. Cases: 0 and undefined stay editable, tweens and unresolved {{ MERGE_FIELD }} placeholders do not, each of the seven visual properties trips the clip-level check, and a keyframed asset.volume deliberately does not.

tests/svg-toolbar.test.ts — repairs an assertion that could not fail. "keeps document timing intent in slider undo history" stubbed updateClipInDocument to a no-op while getDocumentClip returned the same object every call, so the committed final state was byte-identical to the initial state. It passed whether or not the slider edit reached the commit. The mock now mutates the document, and the test asserts both that the edit landed and that the state is still document form rather than resolved.

How to verify

npx jest tests/clip-utils.test.ts tests/svg-toolbar.test.ts — 41 tests. Full suite: 70 suites, 1947 tests.

test: type, so no release is cut.

@dazzatronus
dazzatronus merged commit d072e12 into main Aug 11, 2026
1 check passed
@dazzatronus
dazzatronus deleted the derk/keyframe-predicate-tests branch August 11, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant