@storybook/addon-storyshots

  • Version 6.4.0
  • Published
  • 115 kB
  • 21 dependencies
  • MIT license

Install

npm i @storybook/addon-storyshots
yarn add @storybook/addon-storyshots
pnpm add @storybook/addon-storyshots

Overview

Take a code snapshot of every story automatically with Jest

Index

Variables

variable renderOnly

const renderOnly: StoryshotsTestMethod;

    variable shallowSnapshot

    const shallowSnapshot: StoryshotsTestMethod;

      variable snapshot

      const snapshot: SnapshotsWithOptionsReturnType;

        Functions

        function multiSnapshotWithOptions

        multiSnapshotWithOptions: (options?: {}) => StoryshotsTestMethod;

          function renderWithOptions

          renderWithOptions: (options?: {}) => StoryshotsTestMethod;

            function snapshotWithOptions

            snapshotWithOptions: (
            options?: { renderer?: any; serializer?: any } | Function
            ) => SnapshotsWithOptionsReturnType;

              function testStorySnapshots

              testStorySnapshots: (options?: StoryshotsOptions) => void;

                Classes

                class Stories2SnapsConverter

                class Stories2SnapsConverter {}

                  constructor

                  constructor(options?: Partial<Stories2SnapsConverterOptions>);

                    property getSnapshotExtension

                    getSnapshotExtension: () => string;

                      property options

                      options: Stories2SnapsConverterOptions;

                        method getPossibleStoriesFiles

                        getPossibleStoriesFiles: (storyshotFile: string) => string[];

                          method getSnapshotFileName

                          getSnapshotFileName: (context: { fileName?: string; kind: any }) => string;

                            method getStoryshotFile

                            getStoryshotFile: (fileName: string) => string;

                              Interfaces

                              interface Stories2SnapsConverterOptions

                              interface Stories2SnapsConverterOptions {}

                                property snapshotExtension

                                snapshotExtension: string;

                                  property snapshotsDirName

                                  snapshotsDirName: string;

                                    property storiesExtensions

                                    storiesExtensions: string[];

                                      Type Aliases

                                      type SupportedFramework

                                      type SupportedFramework =
                                      | 'angular'
                                      | 'html'
                                      | 'preact'
                                      | 'react'
                                      | 'riot'
                                      | 'react-native'
                                      | 'svelte'
                                      | 'vue'
                                      | 'vue3'
                                      | 'web-components'
                                      | 'rax';

                                        Package Files (5)

                                        Dependencies (21)

                                        Dev Dependencies (15)

                                        Peer Dependencies (16)

                                        Badge

                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/addon-storyshots.

                                        • Markdown
                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@storybook/addon-storyshots)
                                        • HTML
                                          <a href="https://www.jsdocs.io/package/@storybook/addon-storyshots"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>