You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: addons/storyshots/README.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,3 +100,19 @@ initStoryshots({
100
100
### `framework`
101
101
102
102
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.
103
+
104
+
### `test`
105
+
106
+
Run a custom test function for each story, rather than the default (a vanilla snapshot test). See the exports section below for more details.
107
+
108
+
## Exports
109
+
110
+
Apart from the default export (`initStoryshots`), Storyshots also exports some named test functions (see the `test` option above):
111
+
112
+
### `snapshot`
113
+
114
+
The default, render the story as normal and take a Jest snapshot.
115
+
116
+
### `renderOnly`
117
+
118
+
Just render the story, don't check the output at all (useful if you just want to ensure it doesn't error).
0 commit comments