npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

js-animation-test

v1.0.0

Published

Test web animations & CSS transitions by leveraging the power of Visual Regression Testing.

Readme

AnimaTopia

API Description

This library leverages the power and capabilities of Visual Regression Testing by extending the scope to cover testing web animations and CSS transitions using Puppeteer.

We aim to standardize testing web animations and CSS transitions by using visual regression testing.

What is it capable of?

If your core product relies on smooth web transitions, then this library should be used in order to garantee that each frame is as elegant as possible.

Initially, it saves all the frames of the animation as baseline images which will be compared against new actual screenshots in order to check if there is a mismatch in each and every frame.

  • It saves tons of time to visually test animations.
  • A great tool that detects changes and anomalies in JavaScript animations.
  • It captures frame by frame screenshots of your animation or css transition based on a frame rate and frame delay values provided as inputs.

Alt text Alt text Alt text Alt text Alt text Alt text Alt text

Usage

Test Web Animations

const AnimaTopia = require('animatopia')
	
const webAnimationTest = new AnimaTopia()
	
await webAnimationTest.matchAnimationFrames({
	url: 'http://localhost:3000/',
	selector: '.heart',
	frameRate: 60,
	maxCaptureDuration: 3000,
	frameDelay: 20,
	pageScreenshotDelay: 100,
	animationName: 'pulsate-63aed68e'
})

Declarative Testing of CSS Transitions by declaring them as Web Animations

const AnimaTopia = require('animatopia')
	
const webAnimationTest = new AnimaTopia()
	
await webAnimationTest.matchAnimationFrames({
	url: 'http://localhost:3000/',
	selector: '.heart',
	frameRate: 60,
	maxCaptureDuration: 3000,
	frameDelay: 20,
	pageScreenshotDelay: 100,
	cssTransitionData: {
		keyframes: [{offset: 0, transform: 'scale(1)'}, {offset: 1, transform: 'scale(2)'}],
		duration: 1000,
		easing: 'linear',
		iterations: 1,
		fill: '',
		delay: 0
	}
})

Constructor

| Prop Name | Type | Default | | --------------- | :------------: | ------------------------------------------------------: | | baselineFolder | string | ${process.cwd()}/web-animation/screenshots/baseLine | | actualFolder | string | ${process.cwd()}/web-animation/screenshots/actual | | diffFolder | string | ${process.cwd()}/web-animation/screenshots/diff |

matchAnimationFrames

| Prop Name | Type | Default | | ---------------------- | :------------: | -----------: | | url | string | | | selector | string | | | frameRate | number | 60 | | frameDelay | number | 100 | | pageScreenshotDelay | number | 100 | | maxCaptureDuration | number | 500 | | animationName | string | | | cssTransitionData | object | | | frameImagePrefix | string | |

[Web Animation Object](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Using_the_Web_Animations_API