Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@storybook/addon-storyshots

Package Overview
Dependencies
Maintainers
8
Versions
1497
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@storybook/addon-storyshots

Take a code snapshot of every story automatically with Jest

  • 7.6.17
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
130K
increased by11.68%
Maintainers
8
Weekly downloads
 
Created

What is @storybook/addon-storyshots?

@storybook/addon-storyshots is an addon for Storybook that enables snapshot testing for your stories. It allows you to capture the rendered output of your stories and compare them to previous snapshots to detect changes.

What are @storybook/addon-storyshots's main functionalities?

Snapshot Testing

This feature allows you to automatically generate and compare snapshots of your Storybook stories. The code initializes Storyshots and runs snapshot tests for all your stories.

const initStoryshots = require('@storybook/addon-storyshots').default;
initStoryshots();

Custom Test Method

This feature allows you to use custom test methods, such as image snapshot testing with Puppeteer. The code initializes Storyshots with a custom image snapshot test method.

const initStoryshots = require('@storybook/addon-storyshots').default;
const { imageSnapshot } = require('@storybook/addon-storyshots-puppeteer');

initStoryshots({
  test: imageSnapshot(),
});

Multi-Framework Support

This feature supports multiple frameworks and allows you to customize the snapshot testing options. The code initializes Storyshots with multi-snapshot options.

const initStoryshots = require('@storybook/addon-storyshots').default;
const { multiSnapshotWithOptions } = require('@storybook/addon-storyshots');

initStoryshots({
  test: multiSnapshotWithOptions({}),
});

Other packages similar to @storybook/addon-storyshots

Keywords

FAQs

Package last updated on 20 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc