Skip to content

Commit

Permalink
Added some documentation about the test option
Browse files Browse the repository at this point in the history
  • Loading branch information
tmeasday committed May 21, 2017
1 parent a92f352 commit b00d4a4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions addons/storyshots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,19 @@ initStoryshots({
### `framework`

If you are running tests from outside of your app's directory, storyshot's detection of which framework you are using may fail. Pass `"react"` or `"react-native"` to short-circuit this.

### `test`

Run a custom test function for each story, rather than the default (a vanilla snapshot test). See the exports section below for more details.

## Exports

Apart from the default export (`initStoryshots`), Storyshots also exports some named test functions (see the `test` option above):

### `snapshot`

The default, render the story as normal and take a Jest snapshot.

### `renderOnly`

Just render the story, don't check the output at all (useful if you just want to ensure it doesn't error).

0 comments on commit b00d4a4

Please sign in to comment.