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.BUnit
Then you can bootstrap a new app using the installed template:
dotnet new blazortailwind -o my-app --name MyApp
There 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-app
Install dependencies:
dotnet restore
cd MyApp
yarn # or you can use 'npm install'
Start the server:
dotnet watch run --project MyApp
View app at https://localhost:5001 🎉
To run tests, run the following command from the solution root directory:
dotnet test MyApp.Tests
or to run from the test project directory:
cd MyApp.Tests
dotnet test
Included 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.