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 🙏

© 2024 – Pkg Stats / Ryan Hefner

art-worker

v1.1.1

Published

Visual Regression Testing for react-storybook

Downloads

3

Readme

Visual Regression Testing for Storybook

GitHub license Tests npm version npm downloads

Rationale

There are a few visual regression tools for the web, but most either cannot be run headless or use phantomjs which is deprecated and a browser nobody is actually using. They usually also require you to maintain fixtures. With react-native it's now possible to target multiple platforms with a single code base, but there's no single tool to test all to my knowledge.

Loki aims to have easy setup, no to low maintenance cost, reproducible tests independent of which OS they are run on, runnable on CI and support all platforms storybook does.

Supported platforms

  • Chrome in docker (recommended)
  • Chrome in AWS Lambda
  • Local Chrome application
  • iOS simulator
  • Android emulator

Prerequisites

Optional dependencies

  • GraphicsMagick for gm diffing engine, brew install graphicsmagick
  • Docker for the chrome.docker target.
  • Chrome 59+ for the chrome.app target, brew cask install google-chrome-canary.

Installation

yarn add loki --dev
yarn loki init

Workflow

Loki will not start any servers for you, so ensure storybook and any simulator/emulator is up and running before running tests.

  1. Start storybook server yarn storybook
  2. Add first set of reference files yarn loki update
  3. Do some changes to your components
  4. Test against references yarn loki test
  5. Review changes in diff folder
  6. Approve changes and update references yarn loki approve

Documentation

Examples

Development

# Install dependencies
yarn
# Start example storybook
yarn workspace @loki/example-react run storybook
# Run example visual tests
yarn workspace @loki/example-react run test
# Run unit tests
yarn test
# Run cli integration tests
cd test/cli && yarn test

Maintainers

License

MIT License. © Joel Arvidsson 2017-present