Closed CazSaa closed 1 year ago
Hi there, we're experiencing the same issue. Also not sure whether it is an issue with vue2-jest or with vue. We're using Vue 2.7.14, vue2-jest v27.0.0. Would be glad for any help too!
@marlokessler I found the solution. See https://stackoverflow.com/a/74887122/14851412
Sadly, it does not work for me, but seems to be another issue. I opened another issue for that: https://github.com/vuejs/vue-jest/issues/525
Hi all,
This may be a Vue issue and not Jest specific so let me know if that's the case but I thought I'd try asking here.
I'm updating a project to Vue 2.7 and I wanted to test the composition API. I created the following component:
and I wrote the following test:
If I write the component using the options API, test test passes, but with the composition API the test fails because the variables and functions are not defined on
wrapper.vm
. How can I access the variables and functions?