Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

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

License

Notifications You must be signed in to change notification settings

JosephEigenraam/docz-plugin-snapshots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published