Sample project to play with React Storybook and snapshot testing. Demo available at https://solepano.github.io/storybook-sample.
It contains examples for performing structural test on the same component using:
npm i
Installs dependencies
npm run storybook
Runs the Storybook in the development mode. Open http://localhost:6006 to view it in the browser. The page will reload if you make edits.
npm test
Launches the test runner in the interactive watch mode.
npm run build-storybook
Generates a static version of the Storybook and puts it in the .out
folder.
npm run deploy-storybook
Deploys the Storybook to GitHub Pages.
This project was bootstrapped with Create React App.
Below you will find some information on how to perform common tasks.
You can find the most recent version of this guide here.