Category "vue-test-utils"

Vue Test utils custom event trigger is not working

Parent Component <div> <DropdownContainer v-model="selectedTitle" title="dropdown-title" :options="dropdownOption" @load-data="do

Vue test can't find store in child components

I have a parent component and there are several child components. Some children use Vuex store. When I try to mount parent component like below in Vue test, I'm

How to mock $nuxt object in vue-test-utils and jest

I am using vue-test-utils and jest in order to test my code. My test run without any problem except if it pass through the code below $nuxt.$store.commit("devi

After test is run, Error "TypeError: Cannot read property '$model' of undefined..." appears

UPDATE: I've found out that i have to mock certain functions but it is still a hell of a job :) I've been stuck on this particular problem for almost 3 weeks no

Test suite failed to run import.meta.env.VITE_*

After adding the environment variable import.meta.env.VITE_* in my code, the tests with vue-test-utils started to fail, with the error: Jest suite failed to run

How can I modify the value of state in pinia in vue3 component test and affect the component?

Using vue-test-utils to test the component using pinia, I need to modify the value of the state stored in pinia, but I have tried many methods to no avail. The

_vuex.default.store is not a constructor

I'm trying to test a component that uses vuex inside it, I'm trying to pass the store of the respective component so that it can be assembled, but I'm getting t

how to pass screen.height & screen.width in vue test case | Jest Framework

I have used screen.height & screen.width for js operations. I can't able to pass the test case. (code coverage). I am using vue utils - Jest framework. belo