Skip to main content
Filter by
Sorted by
Tagged with
45 votes
4 answers
23k views

I'm using Jest to run my tests utilizing the vue-test-utils library. Even though I've added the VueRouter to the localVue instance, it says it can't actually find the router-link component. If the ...
Chad Carter's user avatar
  • 2,058
10 votes
2 answers
3k views

I am trying to configure/run my first unit test for Vuejs. But I can't get past the configuration issues. I have tried installing the libraries but for some reason I keep getting errors. Here is what ...
hidar's user avatar
  • 6,019
28 votes
4 answers
28k views

Suppose I have the following component: import { mapState } from 'vuex'; import externalDependency from '...'; export default { name: 'Foo', computed: { ...mapState(['bar']) }, watch: { ...
yxu296's user avatar
  • 399
17 votes
2 answers
21k views

In the Vue.js documentation, there is an example of a custom input component. I'm trying to figure out how I can write a unit test for a component like that. Usage of the component would look like ...
Jason Desrosiers's user avatar
0 votes
1 answer
2k views

I have a FileForm.vue component:- <template> <div class="file-form"> <form @submit="submit"> <input v-model="name" type="text" placeholder="File Name" /> <...
user3072362's user avatar
3 votes
1 answer
5k views

So we have a Vue.js mixin which is inherited in individual components. The mixin has a template that is inherited by a handful of components and it works without problems. However, I can't work out ...
Jamie McDonald's user avatar
21 votes
3 answers
31k views

I am using Jest with Vue-Test-Utils. The code I have been using looks like this: beforeEach(() => { wrapper = shallow(GridContainer, { data: { pageSize: count }, propsData: { ...
Daryn's user avatar
  • 3,838
11 votes
3 answers
4k views

I have a component that is using an element-ui component. Tree.vue <div> <el-tree :data="treeData" :props="config"></el-tree> </div> I want to test the interactivity with ...
Guy's user avatar
  • 534
4 votes
1 answer
8k views

I'm setting up test environment for existing Vue project, and I decided on jest with vue-test-utils. Everything is installed and in place, however when I import component I wish to test in .test.js ...
Perp's user avatar
  • 403
0 votes
2 answers
909 views

I've got a Vue component and inside mounted method I have this: this.el = d3.select(this.$el); this.svg = this.el.select('svg') .attr('width', mainSvgPos.svgWidth) .attr('height', ...
Michal Holub's user avatar
2 votes
0 answers
151 views

I'm trying to add a test that could check a request sent from within vue-upload-component. The request is sent when "Upload Files" button is clicked, the problem is that it's not triggered when I ...
van_folmert's user avatar
  • 4,599
13 votes
2 answers
5k views

I have a Vue 2.0 component that uses the Menu component from Vuetify. I'm using the official vue-test-utils to mount my component during test. The problem I'm facing is that the Menu component append ...
Christofer Eliasson's user avatar
2 votes
1 answer
3k views

I have a component that listens for an event emitted by the Vue $root instance. export default { data() { return { name: '' } }, methods: { openModal(name) { ...
Doug Steinberg's user avatar
6 votes
5 answers
7k views

I'm testing a Single file component that uses vue router to watch $route. The problem is that I can't get the test to both change the route and trigger the watcher's function. The test file: import ...
Brandon Deo's user avatar
  • 4,303
1 vote
2 answers
947 views

I can't seem to "click" on these select boxes using vue-test-utils and Vue 2. I am using mocha + webpack. I am determining this by seeing that the visible-change event is never triggered as it should ...
writofmandamus's user avatar
0 votes
1 answer
289 views

I find myself writing this at the start of pretty much all of my unit tests in mocha: it('should do something', (done) => { Vue.config.errorHandler = done; // do something aynchronous }); By ...
callumacrae's user avatar
  • 8,453

1
13 14 15 16
17