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, build quality. 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 on our site, and then test the entire page, as many other testing frameworks would have us do.
Now, our site contains reusable components, authentication, APIs, Blazor Server, Blazor 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.