Skip to content

Commit

Permalink
[Docs] mount/shallow: update`: Bring the docs up to date with the…
Browse files Browse the repository at this point in the history
… implementation
  • Loading branch information
fsoikin authored and ljharb committed Jan 1, 2022
1 parent c8c74a4 commit e8673c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docs/api/ReactWrapper/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
Syncs the enzyme component tree snapshot with the react component tree. Useful to run before checking the render output if something external
may be updating the state of the component somewhere.

NOTE: can only be called on a wrapper instance that is also the root instance.
NOTE: only update the Enzyme's representation of rendered tree.
NOTE: no matter what instance this is called on, it will always update the root.

NOTE: only updates Enzyme's representation of rendered tree.

NOTE: this does not force a re-render. Use `wrapper.setProps({})` to force a re-render.


Expand Down
6 changes: 4 additions & 2 deletions docs/api/ShallowWrapper/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
Syncs the enzyme component tree snapshot with the react component tree. Useful to run before checking the render output if something external
may be updating the state of the component somewhere.

NOTE: can only be called on a wrapper instance that is also the root instance.
NOTE: only update the Enzyme's representation of rendered tree.
NOTE: no matter what instance this is called on, it will always update the root.

NOTE: only updates Enzyme's representation of rendered tree.

NOTE: this does not force a re-render. Use `wrapper.setProps({})` to force a re-render.


Expand Down

0 comments on commit e8673c2

Please sign in to comment.