11
Unit Testing
In previous chapters, we saw how to build reasonably complex Vue.js applications. This chapter is about testing them to maintain code quality and prevent defects. We will look at approaches to unit testing Vue.js applications in order to improve the quality and speed of delivery of our applications.
We will also look at using tests to drive development using Test-Driven Development (TDD). As we proceed, we will gain an understanding of why code needs to be tested and what kinds of testing can be employed on different parts of a Vue.js application.
In this chapter, we will cover the following topics:
- Understanding testing and the need to test code
- Building your first test
- Testing components
- Testing methods
- Testing routing
Get Frontend Development Projects with Vue.js 3 - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.