Questions tagged [vue-test-utils]

Helpers to render VueJS components in unit tests.

Toolset to make complete or shallow rendering VueJS components while writing unit tests. Can be run under Jest or Mocha test runners. See vue-test-utils.vuejs.org for details.

814 questions
-1
votes
1 answer

Jest and vue test utils can`t read imports start with '~' in testing components

Then i changed import from "~stores/dictionaries/address-space/administrationDistrictStore" to "stores/dictionaries/address-space/administrationDistrictStore" and it works So jest or test-utils can`t read imports with ~ or the root folder is…
defourten
  • 9
  • 2
-1
votes
1 answer

How to unit test code inside validate method nuxtjs vuejs jest

I have code inside validate method if condition true it returns true else false. I want to test that code. Is there any way to do it.
Vishal Sagar
  • 331
  • 1
  • 3
  • 13
-1
votes
1 answer

when i am trying to run test cases it shows me shallowMount error,How to fix ShallowMount error in VUE.JS?

i am wrighting test cases for LoginNew.vue component , when i am trying to import that component inside the spec.js file i am getting shallowMount error [check my error here] ,i don't know why i am getting this error please help me to fix this…
Sravani
  • 367
  • 1
  • 3
  • 17
-1
votes
1 answer

Vue test-utils how to test a navbar button with vuetify

in my navbar component, i have a method that execute a router.push() methods: { redirectToScreen(payload) { this.$router.push({ name: `${payload}` }); } } and then this is my template