The first thing you need to do is install the test helpers.
Let’s test this code:
You can also mock actions if needed.
In the 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 the real api
Play live at stackblitz↗