Chapter 12. Testing

This chapter covers

  • Understanding why we test
  • Implementing unit tests
  • Testing components
  • Testing Vuex

We’ve discussed many important topics in this book, but one often-neglected topic doesn’t get enough attention: testing. Testing is an extremely important aspect in any software development project. It ensures that the app behaves the way we expect it to—without bugs. In this chapter, we’ll discuss why you should create tests for your application. Then we’ll look at the fundamentals of unit testing. Next, we’ll look at component testing, both the output and the methods. Finally, we’ll see how to get started testing with Vuex.

It’s worth mentioning before we start that testing is a huge subject. In this chapter, I’ll cover ...

Get Vue.js in Action now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.