A short walkthrough of the Mox library for Elixir. See how implementing mocks based on behaviours can simplify your unit tests for Phoenix controllers.
With mocks for dependencies inside functions, unit tests will be resilient to a changing codebase. And functions with mocks can be developed without a chain of dependencies.
Asynchronous data loading is great for frontend apps—but it's difficult for unit tests. Your app is depending on a network that doesn’t exist during tests.