Skip to content

Demo of using Chromatic for image tests on Storybook

Notifications You must be signed in to change notification settings

coryhouse/chromatic-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chromatic Demo

This project was bootstrapped with Create React App.

Quick start

npm i
npm run chromatic

The chromatic script runs Chromatic to diff the current code from the baseline.

How I set this up

  1. Run create-react-app npx create-react-app chromatic-demo
  2. Add Storybook npx -p @storybook/cli sb init
  3. Add Chromatic npm install --save-dev storybook-chromatic
  4. Add import "storybook-chromatic"; to .storybook/config.js
  5. Log into Chromatic site and add project
  6. Add chromatic npm script to this project's package.json (script with app-code is displayed when you setup project in previous step)
  7. npm run chromatic - This generates baseline images and provides a URL to view the results.

About

Demo of using Chromatic for image tests on Storybook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published