@proof-ui/add-all-plugin

A plugin to add an empty test for each untested storybook story.

Usage no npm install needed!

<script type="module">
  import proofUiAddAllPlugin from 'https://cdn.skypack.dev/@proof-ui/add-all-plugin';
</script>

README

@proof-ui/add-all-plugin

A plugin to add an empty test for each untested storybook story.

Especially powerful when combined with the accessibility-plugin or the applitools-plugin to get full coverage of each story, even if there are no integration tests written already.

Installation

yarn add -D @proof-ui/add-all-plugin

Usage

// proof.config.js
import AddAllPlugin from '@proof-ui/add-all-plugin';

export default {
  plugins: [new AddAllPlugin()]
};
# Command Line Usage
proof --add-all

Options

You can configure the applitools-plugin through some options in it's constructor:

Property Description Type
filter A function to filter out which tests are added. function - (kind, story) => boolean

Example

To add all stories except ones called skip-me

import AddAllPlugin from '@proff/add-all-plugin';

new AddAllPlugin({
  filter(kind, story) {
    return story !== 'skip-me';
  }
});

Related