Unit Testing:
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.
Outline
Throughout this talk, I will presented four different kind of tests with each time how to run them in a Vue.js application.
- Functions unit tests (with mocha-webpack)
- Components unit tests (with vue-test-utils and Mocha or Jest)
- Snapshot tests (with Jest)
4 UI tests (with Cypress.io)
Requirements
Just a Laptop
Speaker bio
Lead Developer Advocate at VanHack and Founder of Fremer, I watch HOT movies on Netflix almost every night. Native Developer, Prosper Otemuyiwa’s Clan 🔥🔥
Links
{{ gettext('Login to leave a comment') }}
{{ gettext('Post a comment…') }}{{ errorMsg }}
{{ gettext('No comments posted yet') }}