VoV 023: Unit Testing Vue components with Edd Yerburgh
In this episode, the Views on Vue panel talks to Edd Yerburgh about unit testing Vue components. Edd is a software engineer for BBC in London and he maintains Vue Test Utils, which is a library to help make unit testing Vue components easier. They talk about how you would use Vue Test Utils, examples of components you would test with Vue Test Utils, and good patterns to use when testing. They also touch on snapshot testing, the Vue Jest library, and more!
Hosted by
Special Guests
VoV 023: Unit Testing Vue components with Edd Yerburgh
Views on Vue
1:27:01
Share This Episode
Show Notes
- Divya Sasidharan
- Chris Fritz
- Joe Eames
- Edd intro
- Maintains Vue Test Utils
- What is Vue Test Utils?
- Library to make unit testing Vue components easier
- What is a mounted component?
- Would you use Vue Test Utils by yourself?
- Jest, Jasmine, and Mocha
- Needs to be run in a DOM environment
- JS DOM
- Examples of components that you would use to test with Vue Test Utils
- What are good patterns to use when testing?
- Consider what and if you should test?
- Difficult to give a definitive answer as to when you should unit test vs you shouldn’t
- What you hope when you are writing unit tests
- Tests as a form of documentation
- Writing unit tests to pay off in the future
- What is a Snapshot test?
- When would you use a snapshot test?
- Leaning on Jest for snapshot tests
- Vue Jest library
- Testing in Vue
- Creating components within your test itself
- Testing a mixin
- And much, much more!
- Vue
- Vue Test Utils
- Jest
- Jasmine
- Mocha
- Snapshot test
- Vue Jest
- Edd’s GitHub
- @EddYerburgh
- eddyerburgh.me
- Edd’s Medium
- The React is “just” JavaScript Myth by Dave Rupert
- Bang Bang Con
- Moving Towards Dialogue: Collaborating with your computer using typed holes! by Vaibhav Sagar
- Having a point to stop working at night
- ASMR