lmiller1990 / vue-testing-handbook

A guide on testing Vue components and applications
https://lmiller1990.github.io/vue-testing-handbook/
876 stars 160 forks source link

Section on factory function technique #135

Closed lmiller1990 closed 4 years ago

lmiller1990 commented 4 years ago

Sometimes a component gets complex, eg:

const wrapper = mount(Comp, {
  // ... many options .......
})

Feels bad to copy paste it many times. You can use a factory function, which is discussed here. I think something like this would be useful, and we can go in depth with some interesting examples.

lmiller1990 commented 4 years ago

resolved in #138