Testing Components View
Let's create a simple
todos application so we can have something to work it.
There are two strategies that we can use to test the component:
Mocking the Query
We can mock the query and in each spec provide the selector result:
To simplify your Angular specs, we recommend using Spectator.
Using the Store
We can inject the
store, update the data, and make our assertions:
Testing the Store/Query
There is no reason to test the built-in Akita's methods because they have been well tested. The only tests you should add are for custom methods that you might have.
We can test the
Store or the
Query without using Angular:
The same principles also apply to the