@@ -46,23 +46,23 @@ This is table for those coming from VTU beta, comparing the two APIs. A lot of t
4646
4747| option | status | notes |
4848| ---------| -------| ------|
49- context | ⚰️ | different from Vue 2, may not make sense anymore.
5049data | ✅
5150slots | ✅ | has not been tested vigorously. Please try it out.
52- scopedSlots | ⚰️ | scopedSlots are merged with slots in Vue 3
53- stubs | ❌
5451mocks | ✅ | nested in [ ` global ` ] ( https://vuejs.github.io/vue-test-utils-next-docs/api/#global )
55- localVue | ⚰️ | may not make sense anymore since we do not mutate the global Vue instance in Vue 3.
56- attachToDocument | ❌| will rename to ` attachTo ` . See [ here] ( https://github.com/vuejs/vue-test-utils/pull/1492 )
57- attrs | ❌ |
5852propsData | ✅ | now called ` props `
59- listeners | ⚰️ | no longer exists in Vue 3
60- parentComponent | ⚰️ |
6153provide | ✅ | nested in [ ` global ` ] ( https://vuejs.github.io/vue-test-utils-next-docs/api/#global )
6254mixins | ✅ | (new!) nested in [ ` global ` ] ( https://vuejs.github.io/vue-test-utils-next-docs/api/#global )
6355plugins | ✅ | (new!) nested in [ ` global ` ] ( https://vuejs.github.io/vue-test-utils-next-docs/api/#global )
6456component | ✅ | (new!) nested in [ ` global ` ] ( https://vuejs.github.io/vue-test-utils-next-docs/api/#global )
6557directives | ✅ | (new!) nested in [ ` global ` ] ( https://vuejs.github.io/vue-test-utils-next-docs/api/#global )
58+ stubs | ❌
59+ attachToDocument | ❌| will rename to ` attachTo ` . See [ here] ( https://github.com/vuejs/vue-test-utils/pull/1492 )
60+ attrs | ❌ |
61+ scopedSlots | ⚰️ | scopedSlots are merged with slots in Vue 3
62+ context | ⚰️ | different from Vue 2, may not make sense anymore.
63+ localVue | ⚰️ | may not make sense anymore since we do not mutate the global Vue instance in Vue 3.
64+ listeners | ⚰️ | no longer exists in Vue 3
65+ parentComponent | ⚰️ |
6666
6767
6868### Wrapper API (mount)
@@ -71,26 +71,26 @@ directives | ✅ | (new!) nested in [`global`](https://vuejs.github.io/vue-test-
7171| ---------| -------| ------|
7272attributes | ✅
7373classes | ✅
74- contains | ⚰️| use ` find `
75- destroy | ❌
76- emitted | ✅
77- emittedByOrder | ⚰️ | use ` emitted `
7874exists | ✅
7975find | ✅ | only ` querySelector ` syntax is supported. ` find(Comp) ` under discussion [ here] ( https://github.com/vuejs/vue-test-utils/issues/1498 )
76+ emitted | ✅
8077findAll | ✅ | see above. ` .vm ` is different to Vue 2. We are exploring options.
81- get | ❌
8278html | ✅
79+ setValue | ✅ | works for select, checkbox, radio button, input, textarea. Returns ` nextTick ` .
80+ text | ✅ |
81+ trigger | ✅ | returns ` nextTick ` . You can do ` await wrapper.find('button').trigger('click') `
82+ setProps | ✅ |
83+ setData | ❌ | has PR
84+ destroy | ❌
85+ get | ❌
86+ isVisible | ❌ | use matchers such as [ this] ( https://github.com/testing-library/jest-dom#tobeempty )
87+ props | ❌
88+ contains | ⚰️| use ` find `
89+ emittedByOrder | ⚰️ | use ` emitted `
90+ setSelected | ⚰️ | now part of ` setValue `
91+ setChecked | ⚰️| now part of ` setValue `
8392is | ⚰️
8493isEmpty | ⚰️ | use matchers such as [ this] ( https://github.com/testing-library/jest-dom#tobeempty )
85- isVisible | ❌ | use matchers such as [ this] ( https://github.com/testing-library/jest-dom#tobeempty )
8694isVueInstance | ⚰️
8795name | ⚰️ |
88- props | ❌
89- setChecked | ⚰️| now part of ` setValue `
90- setData | ❌ |
91- setMethods | ⚰️ |
92- setProps | ❌ |
93- setSelected | ⚰️ | now part of ` setValue `
94- setValue | ✅ | works for select, checkbox, radio button, input, textarea. Returns ` nextTick ` .
95- text | ✅ |
96- trigger | ✅ | returns ` nextTick ` . You can do ` await wrapper.find('button').trigger('click') `
96+ setMethods | ⚰️ |
0 commit comments