We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ref(refName)
1 parent 290f40a commit bca2d2bCopy full SHA for bca2d2b
docs/guides/migration-from-2-to-3.md
@@ -359,6 +359,11 @@ expect(wrapper.ref('abc')).toBeInstanceOf(Box);
359
In our experience, this is most often what people would actually want and expect out of the `.ref(...)`
360
method.
361
362
+To get the wrapper that was returned by enzyme 2:
363
+```js
364
+const wrapper = mount(<Bar />);
365
+const refWrapper = wrapper.findWhere(n => n.instance() === wrapper.ref('abc'));
366
+```
367
368
## With `mount`, `.instance()` can be called at any level of the tree
369
0 commit comments