Skip to content

Commit c14ea28

Browse files
committed
bring back toJSON to docs
1 parent c47693e commit c14ea28

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ optional message
166166

167167
Prints shallowly rendered component passed to `render` with optional message on top. Uses [debug.shallow](#debug) under the hood, but it's easier to use.
168168

169+
### `toJSON: () => ?ReactTestRendererJSON`
170+
171+
Get the rendered component JSON representation, e.g. for snapshot testing.
172+
169173
## `shallow`
170174

171175
Shallowly render given React component. Since it doesn't return helpers to query the output, it's mostly advised to used for snapshot testing (short snapshots are best for code reviewers).

0 commit comments

Comments
 (0)