Skip to content

Commit e8673c2

Browse files
fsoikinljharb
authored andcommitted
[Docs] mount/shallow: update`: Bring the docs up to date with the implementation
1 parent c8c74a4 commit e8673c2

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

docs/api/ReactWrapper/update.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
Syncs the enzyme component tree snapshot with the react component tree. Useful to run before checking the render output if something external
44
may be updating the state of the component somewhere.
55

6-
NOTE: can only be called on a wrapper instance that is also the root instance.
7-
NOTE: only update the Enzyme's representation of rendered tree.
6+
NOTE: no matter what instance this is called on, it will always update the root.
7+
8+
NOTE: only updates Enzyme's representation of rendered tree.
9+
810
NOTE: this does not force a re-render. Use `wrapper.setProps({})` to force a re-render.
911

1012

docs/api/ShallowWrapper/update.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
Syncs the enzyme component tree snapshot with the react component tree. Useful to run before checking the render output if something external
44
may be updating the state of the component somewhere.
55

6-
NOTE: can only be called on a wrapper instance that is also the root instance.
7-
NOTE: only update the Enzyme's representation of rendered tree.
6+
NOTE: no matter what instance this is called on, it will always update the root.
7+
8+
NOTE: only updates Enzyme's representation of rendered tree.
9+
810
NOTE: this does not force a re-render. Use `wrapper.setProps({})` to force a re-render.
911

1012

0 commit comments

Comments
 (0)