JavaScript testing | Slava Arapov Notes

JavaScript testing

A testing framework is used to run unit tests, for example:

The main frameworks have their own libraries that help to test components, for example

Cypressopen in new window is used for end-to-end testing.

Component testing

It is necessary to check:

  1. Differences in rendering with different input parameters (props);
  2. Differences in rendering depending on the properties and computed properties of the global storage (store)
  3. Component handles custom events, input fields
  4. Component calls external functions
  5. Component calls actions and mutations in store
  6. Required changes in child components take place

JavaScript

Vue.js

End-to-end