Reputation: 51
Sample Code from the VueJs components. Note that I'm trying to cover the watcher as well as the method
computed: {
...mapGetters({
resourceLinks: `tools/${storeGetters.resourceLinks}`,
}),
},
methods: {
formatData(data) {
this.setSocialLinks();
},
},
},
watch: {
resourceLinks(data) {
this.formatData(data);
},
},
Upvotes: 2
Views: 945
Reputation: 51
expect(wrapper.vm.$options.watch.resourceLinks.call(wrapper.vm, resourceLinks1));
Upvotes: 2