Computed Properties
Explore how to thoroughly test Vue.js computed properties using Jest in this lesson. Understand the synchronous nature of computed properties and learn to write effective tests that validate data transformations within your components. Gain practical skills to ensure your reactive logic works as intended by examining component instances and setting props for various test cases.
We'll cover the following...
Computed properties and watchers are reactive parts of the logic of Vue.js components. They both serve totally different purposes. One is synchronous and the other asynchronous, which makes them behave slightly differently from each other.
In this chapter, we’ll test them and see what different cases we can find on the way.
Computed Properties
Computed properties are simple reactive functions that return data in another form. They behave exactly like the ...