Summary
In this chapter, we looked at testing our application. We looked at how we can mock an API to make reliable tests. We also covered how to test JavaScript interop as well as authentication.
Tests can speed up our development and, most importantly, the quality of what we build. With bUnit combined with dependency injection, it is easy to build tests that can help us test our components.
Since we can test every component by itself, we don't have to log in, navigate to a specific place in our site, and then test the entire page as many other testing frameworks would have us do.
Now we have our site, containing reusable components, authentication, APIs, both Blazor Server and WebAssembly, authentication, shared code, JavaScript interop, state management, and tests. We only have one more thing to do: ship it!
In the next chapter, Chapter 14, Deploying to Production, it's time to ship.