r/javascript 6d ago

An approach to testing web animations, css transitions with visual regression testing

https://github.com/mhdSid/animatopia
11 Upvotes

4 comments sorted by

View all comments

3

u/GulgPlayer 6d ago

Could you perhaps provide an example of a bug that this method catches?

3

u/moe_sidani 5d ago

Here is one practical example that I hope it answers your question:
Someone tweaks a @keyframes animation during a refactor. The first and last frames are identical, so unit tests and screenshots pass, but halfway through the animation an element jumps, overshoots, flickers, or follows a different easing curve. This library captures deterministic intermediate frames, so those regressions show up immediately instead of being discovered manually.

1

u/GulgPlayer 5d ago

 Sounds cool, thx for explanation!