Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
54 views

Problem: I’m migrating a Vue 2.6 app to the Composition API (via the plugin) and hit two testing issues with vue-test-utils (v1) + Jest: Jest couldn’t mock functions from a plain TS module (not a Vue ...
Makc's user avatar
  • 1,192
0 votes
0 answers
34 views

I have a Nuxt composable that fetches data from Contentful using the contentful client's getEntries function. It's working on the frontend of my website but when I run my tests i'm getting: TypeError: ...
user2953989's user avatar
  • 3,039
0 votes
1 answer
407 views

I have a vue3 component which simply renders a list using an array of objects provided to it. If the array is empty it shows a "no data" message. The component gets its data via a dependency ...
Leigh.D's user avatar
  • 487
0 votes
0 answers
83 views

Currently migrating a project from Vue2 to Vue3, and it's mostly done - the app seems to work fine. However, Jest tests seem to have trouble passing. I have updated Vue Test Utils to V2 for Vue3 ...
Conanap's user avatar
  • 179
2 votes
1 answer
181 views

I am using a 3rd party vue component SomeComponent that implements its own translations. This is my mount in my test import { mount } from '@vue/test-utils'; import { SomeComponent } from '../../some-...
duduwe's user avatar
  • 1,322
2 votes
1 answer
943 views

I am writing a modal component in vue 3: // MyModal.vue <script setup> const emit = defineEmits(['close']) const modalDialog = ref(null) const close = () => { emit('close') ...
demiglace's user avatar
  • 843
0 votes
1 answer
691 views

<v-text-field density="compact" v-model="textMaterial" :rules="textMaterialRules" label="Text Material" ></v-text-field> This is a ...
Ksushant881's user avatar
0 votes
1 answer
232 views

Trying to test UseHead in my component that's inside of a computed but it is throwing the following error Cannot read properties of undefined (reading 'name') Vue Component has useHead(computed(() =&...
Phreak's user avatar
  • 301
0 votes
1 answer
844 views

We have a component that does the following: Inside the template, has a div referred to as workspace when the component is mounted, inside the onMounted() it calls a method to calculate size the ...
Wimateeka's user avatar
  • 2,736
0 votes
0 answers
219 views

I am trying to trigger error from child component so that errorCapttured hook will be triggered in main.vue Main.vue <template> <div class="main"> <q2-section class=&...
Arun Shetty's user avatar
0 votes
1 answer
833 views

I'm trying to write a vitest test around a composable that reads and writes postMessage() for communication between iframes. The Vue docs say that if the composable relies on lifecycle hooks to mount ...
Ben's user avatar
  • 353
0 votes
1 answer
285 views

Brand new to vue testing and I'm trying to test a component that calls a global function this is imported in my app.js A simplified version of the component ConversationStatus: <script setup> ...
Ben's user avatar
  • 353
0 votes
1 answer
135 views

my stack: cypress @vue/test-utils component in vue3 in composition api (<script setup />) My test, i would like to spy a method inside a component, and spy action vuex inside a method in ...
devseb's user avatar
  • 3
0 votes
1 answer
88 views

I am trying to write a basic unit test for a component called CompanyBioPanel. Here is a simplified version of the component: // template <v-card-text> <v-tabs v-model="...
IlyaMeer's user avatar
  • 118
1 vote
1 answer
157 views

I have this project structure: /App.vue |-components/CoponentA.vue |-components/CoponentB.vue In App.vue the ComponentB is not mounted until ComponentA emits an event: <!-- App.vue --> <...
fguillen's user avatar
  • 39.5k
0 votes
0 answers
119 views

I try to write test for my Vue 3 app and I try to test my component. In this post I will use my simple component to show my case. So I have my simple component with button and when the button is ...
RadoslawTheKopec's user avatar
3 votes
2 answers
1k views

Context We are using Vue3 and Pinia and vitest Rather than creating strict "unit" component tests, we're trying to do more E2E/integration testing (ie. where we're mounting and testing a ...
Isabel Anastasiadis's user avatar
2 votes
0 answers
374 views

I have a vue3 component which embodies a context menu. I have tested the component in the browser and it works fine. Also most situations work fine in vitest but when I use the .isVisible() check ...
SvT's user avatar
  • 25
0 votes
0 answers
619 views

Below is a mounted I have in a vue component which I want to perform a unit testing on. mounted () { const pageRef = this.$refs.tabRef.offsetParent.offsetParent; this.pageSize = { ...
yyr's user avatar
  • 1
1 vote
1 answer
3k views

I am upgrading a Vue 2 component library to Vue 3. I have upgraded all the packages in the project, and made some necessary changes to get the code to compile. The components work as expected in a ...
Mike C's user avatar
  • 3,117
1 vote
0 answers
309 views

I'm building a feedback rating component with stars icons, but when I test to check if the correct number of stars are being rendered depending on the prop length, wrapper.findAll('svg') always ...
Achraf FAWZI's user avatar
2 votes
0 answers
716 views

I have been trying to implement a component test using Vitest and Vue Test Utils. Currently my issue is that the component does not replace the custom component with the component implementation. This ...
Brum's user avatar
  • 711
1 vote
1 answer
893 views

I have a Vue component. My component have a computed property that refer to a getter of a vuex store. I use a watch to perform some action when this getter is updated. I want to test the watch using ...
Roman Diez's user avatar
2 votes
0 answers
2k views

I'm trying to test a Nuxt page, but I'm having a promises issue because mocked fetch works but the page is not mounted this is the page script: <script lang="ts" setup> import { ...
Necrogoru's user avatar
  • 126
2 votes
1 answer
833 views

In my Vue 3 component I have a link that uses @click.prevent to call a method that emits and event. I'm unable to figure out why my attempts to test if this method is called or event is emitted fail. ...
Stickel's user avatar
  • 31

1
2 3 4 5
17