docz-plugin-snapshots

0.2.0 • Public • Published

docz-plugin-snapshots

A plugin for docz that creates jest snapshots for all documented component usages

Install

Add the docz-plugin-snapshots package to your project.

yarn add --dev docz-plugin-snapshots

Usage

Add the jest-mdx-loader to your jest.config.js file

/// jest.config.js
 
module.exports = {
  //...
  transform: {
    "^.+\\.jsx?$": "babel-jest",
    ".mdx?$": "jest-mdx-loader"
  }
  //...
};

Add a new test file and initialize the plugin

/// index.test.js
 
import initDoczPluginSnapshots from "docz-plugin-snapshots";
initDoczPluginSnapshots("./");

Licence

MIT © Joseph Black

Readme

Keywords

Package Sidebar

Install

npm i docz-plugin-snapshots

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

5.77 kB

Total Files

11

Last publish

Collaborators

  • josephconradblack