File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,7 @@ expect(byId.element.id).toBe('bar')
3131 - You may chain ` find ` calls together:
3232
3333``` js
34- let button
35-
36- button = wrapper .find ({ ref: ' testButton' })
34+ const button = wrapper .find ({ ref: ' testButton' })
3735expect (button .find (' .icon' ).exists ()).toBe (true )
3836```
3937
Original file line number Diff line number Diff line change @@ -17,10 +17,10 @@ import Bar from './Bar.vue'
1717
1818const wrapper = mount (Foo)
1919
20- const bar = wrapper .findComponent (Bar) // => finds Bar by component instance
20+ const bar = wrapper .findComponent (Bar) // => finds Bar by component instance
2121expect (bar .exists ()).toBe (true )
22- const barByName = wrapper .findComponent ({ name: ' bar' }) // => finds Bar by `name`
22+ const barByName = wrapper .findComponent ({ name: ' bar' }) // => finds Bar by `name`
2323expect (barByName .exists ()).toBe (true )
24- const barRef = wrapper .findComponent ({ ref: ' bar' }) // => finds Bar by `ref`
24+ const barRef = wrapper .findComponent ({ ref: ' bar' }) // => finds Bar by `ref`
2525expect (barRef .exists ()).toBe (true )
2626```
You can’t perform that action at this time.
0 commit comments