Testing your Vue.js in it's Awesomeness
Unit testing is a fundamental part of software development. Unit tests execute the smallest units of code in isolation, in order to increase ease of adding new features and track down bugs. Vue’s single-file components make it straight forward to write unit tests for components in isolation. This lets you develop new features with confidence you are not breaking existing ones, and helps other developers understand what your component does.
Vue CLI has built-in options for unit testing with Jest or Mocha that works out of the box. We also have the official Vue Test Utils which provides more detailed guidance for custom setups.
Throughout this talk, I will presented four different kind of tests with each time how to run them in a Vue.js application.
1. Functions unit tests (with mocha-webpack)
2. Components unit tests (with vue-test-utils and Mocha or Jest)
3. Snapshot tests (with Jest)
4 UI tests (with Cypress.io)
Just a Laptop
Lead Developer Advocate at VanHack and Founder of Fremer, I watch HOT movies on Netflix almost every night. Native Developer, Prosper Otemuyiwa’s Clan 🔥🔥
- Blog URL
- Getting started with GraphQl at Full Stack Developers Conference