Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JosephEigenraam/docz-plugin-snapshots
A plugin for docz that creates jest snapshots for all documented component usages
https://github.com/JosephEigenraam/docz-plugin-snapshots
Last synced: about 2 months ago
JSON representation
A plugin for docz that creates jest snapshots for all documented component usages
- Host: GitHub
- URL: https://github.com/JosephEigenraam/docz-plugin-snapshots
- Owner: JosephEigenraam
- License: mit
- Archived: true
- Created: 2018-08-11T05:06:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-16T10:25:05.000Z (over 6 years ago)
- Last Synced: 2024-04-10T15:06:53.309Z (8 months ago)
- Language: JavaScript
- Size: 73.2 KB
- Stars: 7
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - docz-plugin-snapshots - A plugin for docz that creates jest snapshots for all documented component usages (JavaScript)
README
# 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
```js
/// jest.config.jsmodule.exports = {
//...
transform: {
"^.+\\.jsx?$": "babel-jest",
".mdx?$": "jest-mdx-loader"
}
//...
};
```Add a new test file and initialize the plugin
```js
/// index.test.jsimport initDoczPluginSnapshots from "docz-plugin-snapshots";
initDoczPluginSnapshots("./");
```## Licence
MIT © [Joseph Black](https://josephconradblack.com)