Skip to content

Commit e9aadad

Browse files
igeligeleddyerburgh
authored andcommitted
docs: extend examples in find api (#473) (#511)
1 parent baa96f3 commit e9aadad

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/en/api/wrapper/find.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,18 @@ import Foo from './Foo.vue'
1717
import Bar from './Bar.vue'
1818

1919
const wrapper = mount(Foo)
20+
2021
const div = wrapper.find('div')
2122
expect(div.is('div')).toBe(true)
23+
2224
const bar = wrapper.find(Bar)
2325
expect(bar.is(Bar)).toBe(true)
26+
27+
const barByName = wrapper.find({ name: 'bar' })
28+
expect(barByName.is(Bar)).toBe(true)
29+
30+
const fooRef = wrapper.find({ ref: 'foo' })
31+
expect(fooRef.is(Foo)).toBe(true)
2432
```
2533

2634
- **See also:** [Wrapper](README.md)

0 commit comments

Comments
 (0)