What is bUnit?
As mentioned in the introduction, some tests spin up web browsers to test the pages/components, but bUnit takes another approach.
bUnit is made specifically for Blazor. It can define and set up tests using C# or Razor syntax. It can mock JavaScript interop as well as Blazor's authentication and authorization. To make our components more testable, sometimes we need to think about these things from the beginning or make minor changes to our code.
bUnit doesn't rely on a web browser but renders the output internally and exposes it to us so that we may test against predefined outputs.
It's time we get our hands dirty, so let's create a test project.