The first thing you need to do is install the test helpers
Let’s test this code:
Also you can mock actions if needed. In next example we have an async api.
Note: In real code, we recommend using the @reatom/async
to work with asynchronous APIs
Let’s test it without calling real api
Play live at stackblitz↗