Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/enzyme/src/ReactWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,12 @@ class ReactWrapper {
}

/**
* Forces a re-render. Useful to run before checking the render output if something external
* 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: no matter what instance this is called on, it will always update the root.
* NOTE: this does not force a re-render. Use `wrapper.setProps({})` to force a re-render.
*
* @returns {ReactWrapper}
*/
Expand Down
4 changes: 3 additions & 1 deletion packages/enzyme/src/ShallowWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -544,10 +544,12 @@ class ShallowWrapper {
}

/**
* Forces a re-render. Useful to run before checking the render output if something external
* 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: this does not force a re-render. Use `wrapper.setProps({})` to force a re-render.
*
* @returns {ShallowWrapper}
*/
Expand Down
Loading