You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit changes `wrapper.vm` to actually point to `vm.$.proxy`.
This shouldn't change the behaviour of existing tests, but allows components written with `script setup` to be tested as well,
without the need to expose everything just for testing purposes.
For example a component like:
```vue
<script setup lang="ts">
import { ref } from 'vue'
const count = ref(0)
</script>
```
can now be tested like `expect(wrapper.vm.count).toBe(0)`, whereas you previously had to add `defineExpose({ count })` for this to work.
The downside is that you now can't test that something is _not_ exposed by a component, but I don't think this is a problem.
This also removes the previous hacks for script setup, as it looks like they are no longer necessary.
0 commit comments