This book is written for Vue.js 2 and Vue Test Utils v1.

Find the Vue.js 3 version here.

Mocking Modules

TODO: Write this article. Interested? Open an issue, let’s chat!

Not directly related to Vue testing, more specific to Jest. Jest is used heavily throughout this handbook, though, and becoming widely adopted in the industry, so I think it deserves a section.

Some ideas:

  1. Reference the sections of the existing guide using Jest
  2. Talk about the different kind of mocks and their use cases for Vue testing
  • Manual mocks
  • ES6 class mocks
  • automatic mock
  • calling mockImplentation?

Ref: https://jestjs.io/docs/en/es6-class-mocks#the-4-ways-to-create-an-es6-class-mock