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.
shallowMount
mount
1 parent 40ba658 commit 56e7f4bCopy full SHA for 56e7f4b
docs/guides/common-tips.md
@@ -95,13 +95,13 @@ You can emit a custom event from a child component by accessing the instance.
95
**Test**
96
97
```js
98
-import { shallowMount } from '@vue/test-utils'
+import { mount } from '@vue/test-utils'
99
import ParentComponent from '@/components/ParentComponent'
100
import ChildComponent from '@/components/ChildComponent'
101
102
describe('ParentComponent', () => {
103
it("displays 'Emitted!' when custom event is emitted", () => {
104
- const wrapper = shallowMount(ParentComponent)
+ const wrapper = mount(ParentComponent)
105
wrapper.find(ChildComponent).vm.$emit('custom')
106
expect(wrapper.html()).toContain('Emitted!')
107
})
0 commit comments