Logo
flag

Master class: Testing Vue applications

Logo

Please rate the course

0.0
Category:
Language:
Russian
Duration:
09:58:29
Number of lessons:
9
Added date:
07/05/2024
Rating:
0.0

Course short description

As my experience at GitLab has shown, testing Vue components is not the strong point of even those who ate the dog at testing, for example, backend code. What comes home here is that Vue has a lot of complex features that are not trivial to test. Add to this some amazing features of @vue/test-utils (the author has about 10 accepted pull requests to the repository) - and you get a wonderful cocktail of complex testing.


The videos are small (~15- 30 minutes) fragments of theoretical research that explain everything “on your fingers” (or rather with a pen on the screen).

What exactly is tested in Vue components?

  • Component output depending on props
  • When we pass such and such parameters, we expect that the button is visible
  • When we pass such and such parameters, we expect that the user's avatar with such and such parameters is visible
  • Generation side effects
  • When the user clicks on this element, we >we expectthat the component generates a "Submit" event with such and such parameters
  • When a component appears in the DOM tree, we expect the component to call the getUser function on such and such an object. ul>
  • What @vue/test-utils offers us for testing?
  • Component life cycle through the lens of testing
  • Holivar: mount vs shallowMount
  • How to choose?
  • Should you always choose one?
  • Consequences of choice?
  • Bonus: What will change in Vue3?
  • Bonus:Component tests and Vue: how and when?
  • Practical part

  • The seminar consists of writing and criticizing specific tests on Jest of real code with an explanation of what is used and for what. In other words: the ratio of “documentation” to the practice of its application is about 30 to 70%, according to the author’s assessment.

Write your comment

Logo