File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,38 @@ import { config } from '@vue/test-utils'
209209config .global .renderStubDefaultSlot = true
210210` ` `
211211
212+ ### ` shallowMount` now always uses kebab-case for components stubs
213+
214+ **Before**:
215+
216+ ` ` ` js
217+ import { shallowMount } from ' @vue/test-utils'
218+ import App from ' @/App.vue'
219+
220+ describe (' App.vue' , () => {
221+ it (' finds the helloworld component' , () => {
222+ const wrapper = shallowMount (App, {})
223+ const componentStub = wrapper .find (' helloworld-stub' );
224+ expect (componentStub .html ()).toBeTruthy ();
225+ })
226+ })
227+ ` ` `
228+
229+ **After**:
230+
231+ ` ` ` js
232+ import { shallowMount } from ' @vue/test-utils'
233+ import App from ' @/App.vue'
234+
235+ describe (' App.vue' , () => {
236+ it (' finds the helloworld component' , () => {
237+ const wrapper = shallowMount (App, {})
238+ const componentStub = wrapper .find (' hello-world-stub' );
239+ expect (componentStub .html ()).toBeTruthy ();
240+ })
241+ })
242+ ` ` `
243+
212244### ` destroy` is now ` unmount` to match Vue 3
213245
214246Vue 3 renamed the ` vm .$destroy ` to ` vm .$unmount ` . Vue Test Utils has followed suit; ` wrapper .destroy ()` is now ` wrapper .unmount ()` .
You can’t perform that action at this time.
0 commit comments