Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
52 views

I recently upgraded my project from Vue 2 to Vue 3, so i'm just importing Bootstrap instead of using Bootstrap-Vue. I want to test the accordion functionality using nuxt-test-utils and my test ...
user2953989's user avatar
  • 3,039
0 votes
1 answer
59 views

I am updating my project from Vue 2/Nuxt 2 to Vue 3/Nuxt 3. As i've been doing this my tests have broken and i'm trying to resolve them but every way I try to shallowMount my component returns an ...
user2953989's user avatar
  • 3,039
0 votes
2 answers
832 views

I'm using Vue 3.4, vue-testing-library 8.0.2 and vitest. I can't get my ref updated when using PrimeVue InputNumber (v-model) component in my unit test (whereas it perfectly works when executed in my ...
wintenbb's user avatar
  • 4,166
0 votes
1 answer
1k views

I've been struggling with some tests for some time and I cannot find a proper way to make them work. I use vitest, vue-testing-library and jest-dom when useful. What I want is to be able to use ...
Yz_'s user avatar
  • 1
2 votes
1 answer
526 views

So I have an existing project where I wanted to add testing suite with jest + vue testing library. Added necessary libs and configs and jest basic calc sum test passes. After that importing basic vue ...
Perp's user avatar
  • 403
1 vote
0 answers
84 views

I decided to test my vue 3 project, in which I use vuetify components How do I correctly test my components in which I use vuetify components? When importing a component directly into the test, Just ...
Sergienko Andrey's user avatar
1 vote
1 answer
2k views

I use Vue.js 3, setup syntax, typescript and vue-i18n. For the testing I use vitest and Vue Testing Library. I try to mock i18n's t function, but looks like component doesn't see it. How can I solve ...
Explicit's user avatar
  • 449
3 votes
1 answer
4k views

I have a simple list component written in Vue3 that I am using to learn how to write automated test with Vitest and testing-library. However every test method seems to be rendered together, causing my ...
Nicola Migliore's user avatar
1 vote
0 answers
459 views

After implementing the searchBar logic, my tests stopped working (even those that don't depend on this searchBar component), I tried to mount the Header component with shallowMount, but it doesn't ...
Mike Santana's user avatar
2 votes
1 answer
3k views

I have a component in my Vue 3 app which displays a checkbox. The checkbox can be manually checked by the user but it can also be checked/unchecked as a result of a Pinia state change. I'm pretty new ...
Richard Shergold's user avatar
1 vote
4 answers
8k views

Hello I changed my code from fetch to axios and when I run my tests I get this problem... Can anyone help me with that ? SyntaxError: Cannot use import statement outside a module > 1 | import ...
Jovan's user avatar
  • 13
0 votes
1 answer
2k views

I have a vue component that contains a TipTap editor, which I am having problems testing. I am using Vitest with vue-test-utils. This is my component: <script setup lang="ts"> import { ...
Nicole Harris's user avatar
5 votes
1 answer
7k views

I am struggling to understand how I can test the rendering of items based on the results of a call to a Pina getter in my Vue 3 app (using the Vue Testing Library). An example of what I want to ...
Richard Shergold's user avatar
0 votes
1 answer
542 views

I'm having a couple of issues with my Vue test libs. I am trying to test a mixin. It requires setting the route and mocking a function. Here is my code MIXIN export const CampaignNotifier = { ...
David Pell's user avatar
1 vote
1 answer
1k views

Struggling with testing-library and a Vue component with Vuex. This is the component, it has a watcher: <template lang="pug"> div </template> <script> import { ...
vicusbass's user avatar
  • 1,814
6 votes
2 answers
4k views

I am unable to run simple jest tests in my vue3 project using @testing-library/vue and jest-environment-jsdom. When I run npm run test I get the following error > [email protected] ...
Numan Farukh's user avatar
3 votes
1 answer
5k views

I'm new to Vue and especially with the composition functions. I'm trying to test a component that uses the script setup; however, it seems that it is not working. The component is this one: <...
Airea's user avatar
  • 179
1 vote
0 answers
1k views

I have setup unit testing using installation instructions from https://v1.test-utils.vuejs.org/ Tests are running properly. But the coverage is coming incorrectly. In the report it is showing it has ...
prasadmsvs's user avatar
  • 1,759
0 votes
0 answers
159 views

How can I test the actual navigation that happens when a user clicks on a router link? E.g. I expect the linked component to be rendered but only the route changes, while the rendered component does ...
clapas's user avatar
  • 1,846
0 votes
2 answers
3k views

I'm writing a test for Vuetify v-autocomplete wrapper component which checks displayed error message on blur. However error output shows that input select remains open and base element has focus ...
Adrian Rutkowski's user avatar
0 votes
0 answers
618 views

I have a vue component that fetches data from an api in the "created" function. I'm just getting up and running using the following testing stack: "devDependencies": { "@...
karns's user avatar
  • 5,937
1 vote
2 answers
2k views

I have a component with a strait forward Edit button. The Edit button calls a method that sets isEditing to true. There are a few input elements with v-if="isEditing", so I'm testing that ...
Eddie's user avatar
  • 590
1 vote
1 answer
602 views

I'm trying to set up a component test with Vue Testing Library and Apollo as described in their example. import { ApolloClient, InMemoryCache } from '@apollo/client' import { render } from '@testing-...
J. Hesters's user avatar
0 votes
1 answer
4k views

I'm trying to create some tests for a checkbox component but looks like I can't make an assertion for an input[type="checkbox"] when is disabled. In the first two blocks I'm testing if the ...
Vinicius Cainelli's user avatar
0 votes
1 answer
1k views

I create project through vue cli with options: vue3, TS, JEST and add @testing-library/vue . my package.json looks like this { "name": "todo-app", "version": "0....
flasher2085's user avatar