I build nudge-icons , a set of animated line icons for React and Vue. Every icon has its own small motion: the bell rings, the arrow sinks into the tray, the menu folds into a cross. All of it is plain CSS, with no animation library.
Testing these animations turned out to be harder than testing the icons themselves. jsdom doesn't run CSS animations, and visual snapshots only capture a single frame. I needed to check whether animations start, how many times they repeat, and whether anything is left on the icon after they finish. So the tests run in a real browser, in real time, and ask the browser what is moving.
One playground story, driven by args
Storybook already renders every icon for visual review. For motion I added one more story, Testing/Playground , that renders a single live icon from args:
function Playground ({ name , variant , animate , active , size }: PlaygroundProps ) { const icon = iconByName ( name ); const Icon = icon . variants . find (( v ) => v . variant === variant )?.…