All Questions
4 questions
3
votes
1
answer
972
views
jest spyOn vue 2 composition api method
I'm using the composition API in vue2, and trying to write a unit test that spys on a function to make sure another function has called it, but the test fails saying that my spy hasn't been called. ...
4
votes
0
answers
530
views
Vue 2 Composition API + Jest method testing
So previously I have a successfully working test with Vue 2.7 + Jest in Options API like this:
{
data: () => ({}),
methods: {
async someFunction() {
const result = await this.hiWorld()...
2
votes
1
answer
612
views
setup() not triggered when testing Vue Components (composition-api)
I’m using vue 2.6 with @vue/compisiton-api.
import { createLocalVue, shallowMount } from '@vue/test-utils';
import VueCompositionApi from '@vue/composition-api';
import Page from '@/components/...
1
vote
1
answer
4k
views
VueJs 3 / Composition API and Jest - testing input component event emitting
I seem to be struggling trying to test VueJs 3 input component event emitting - here's what I have:
TextInput
<template>
<input v-model="input" />
</template>
<script>
...