A match made in heaven, maybe. BUnit included.
The easiest way to start using this is to install the dotnet template:
dotnet new -i Blazor.TailwindCSS.BUnitThen you can bootstrap a new app using the installed template:
dotnet new blazortailwind -o my-app --name MyAppThere you have it! You now have a brand-new Blazor server app that's using TailwindCSS and BUnit 🎉
Go to the project directory:
cd my-appInstall dependencies:
dotnet restore
cd MyApp
yarn # or you can use 'npm install'Start the server:
dotnet watch run --project MyAppView app at https://localhost:5001 🎉
To run tests, run the following command from the solution root directory:
dotnet test MyApp.Testsor to run from the test project directory:
cd MyApp.Tests
dotnet testIncluded are two test examples: CounterTest.razor and CounterTest.cs. Both accomplish the same thing, but do it in a slightly different manner. Read more about the differences here.