From 6598fa5c765a7cb6faf5ef2d54160e9bb7da4b1b Mon Sep 17 00:00:00 2001 From: igor-dv Date: Sun, 15 Apr 2018 18:20:25 +0300 Subject: [PATCH] Add integrityOptions to README --- addons/storyshots/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/addons/storyshots/README.md b/addons/storyshots/README.md index 0203b7c5cfff..c146fede4ae3 100644 --- a/addons/storyshots/README.md +++ b/addons/storyshots/README.md @@ -424,6 +424,17 @@ Like the default, but allows you to specify a set of options for the test render Like `snapshotWithOptions`, but generate a separate snapshot file for each stories file rather than a single monolithic file (as is the convention in Jest). This makes it dramatically easier to review changes. +#### integrityOptions +This option is useful when running test with `multiSnapshotWithOptions(options)` in order to track snapshots are matching the stories. (disabled by default). +The value is just a [settings](https://github.com/isaacs/node-glob#options) to a `glob` object, that searches for the snapshot files. + +```js +initStoryshots({ + integrityOptions: { cwd: __dirname }, // it will start searching from the current directory + test: multiSnapshotWithOptions({}), +}); +``` + ### `shallowSnapshot` Take a snapshot of a shallow-rendered version of the component. Note that this option will be overriden if you pass a `renderer` option.