Skip to content

Commit

Permalink
[Docs] mount: ref: use correct type
Browse files Browse the repository at this point in the history
According to the [docs on `ReactWrapper.ref`](https://github.com/airbnb/enzyme/blob/master/docs/api/ReactWrapper/ref.md) the method returns either a `ReactComponent` or an `HTMLElement`. This is inconsistent with the docs for `mount`. Testing shows that the docs on `ReactWrapper.ref` are corrected, so I've updated the `mount` docs to match.
  • Loading branch information
ryanwilsonperkin authored and ljharb committed Oct 12, 2018
1 parent 871b541 commit 34601c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/api/mount.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ Returns whether or not all of the nodes in the wrapper match the provided select
#### [`.everyWhere(predicate) => Boolean`](ReactWrapper/everyWhere.md)
Returns whether or not all of the nodes in the wrapper pass the provided predicate function.

#### [`.ref(refName) => ReactWrapper`](ReactWrapper/ref.md)
Returns a wrapper of the node that matches the provided reference name.
#### [`.ref(refName) => ReactComponent | HTMLElement`](ReactWrapper/ref.md)
Returns the node that matches the provided reference name.

#### [`.detach() => void`](ReactWrapper/detach.md)
Unmount the component from the DOM node it's attached to.

0 comments on commit 34601c6

Please sign in to comment.