|
7 | 7 |
|
8 | 8 | <a href="https://www.telerik.com/campaigns/blazor/free-trial-1?utm_source=egilhansen&utm_medium=cpm&utm_campaign=blazor-trial-readme-sponsored-message"><img align="right" width="200" src="https://raw.githubusercontent.com/egil/bUnit/main/docs/site/sponsors/telerik-ad-github.svg" /></a> |
9 | 9 |
|
10 | | -**bUnit** is a testing library for Blazor Components. Its goal is to make it easy to write _comprehensive, stable unit tests_. With bUnit, you can: |
| 10 | +**bUnit** is a testing library for Blazor Components. Its goal is to make it easy to write _comprehensive, stable_ unit tests. With bUnit, you can: |
11 | 11 |
|
12 | 12 | - Setup and define components under tests using C# or Razor syntax |
13 | | -- Verify outcome using semantic HTML comparer |
14 | | -- Interact with and inspect components as well as triggering event handlers |
| 13 | +- Verify outcomes using semantic HTML comparer |
| 14 | +- Interact with and inspect components as well as trigger event handlers |
15 | 15 | - Pass parameters, cascading values and inject services into components under test |
16 | | -- Mock `IJsRuntime` and Blazors authentication and authorization |
17 | | -- Perform snapshot testing |
| 16 | +- Mock `IJSRuntime`, Blazor authentication and authorization, and others |
18 | 17 |
|
19 | | -bUnit builds on top of existing unit testing frameworks such as xUnit, NUnit, and MSTest, which runs the Blazor components tests just as any normal unit test. |
| 18 | +bUnit builds on top of existing unit testing frameworks such as xUnit, NUnit, and MSTest, which run the Blazor components tests in just the same way as any normal unit test. bUnit runs a test in milliseconds, compared to browser-based UI tests which usually take seconds to run. |
20 | 19 |
|
21 | 20 | **Go to [bUnit.egilhansen.com](https://bunit.egilhansen.com) to learn more.** |
22 | 21 |
|
23 | 22 | ### NuGet Downloads |
24 | 23 |
|
25 | | -bUnit is available on NuGet in various incarnations. If you are using xUnit as your general purpose testing framework, you can use `bunit`, which includes everything in one package. If you want to use NUnit or MStest, then pick `bunit.core` and `bunit.web`: |
| 24 | +bUnit is available on NuGet in various incarnations. Most should just pick the [bUnit](https://www.nuget.org/packages/bunit/) package: |
26 | 25 |
|
27 | 26 | | Name | Description | NuGet Download Link | |
28 | 27 | | ----- | ----- | ---- | |
29 | | -| [bUnit.web](https://www.nuget.org/packages/bunit.web/) | Adds support for testing Blazor components for the web. This includes bUnit.core. | [](https://www.nuget.org/packages/bunit.web/) | |
30 | | -| [bUnit.xUnit](https://www.nuget.org/packages/bunit.xunit/) | Adds additional support for using bUnit with xUnit, including support for Razor-based tests. | [](https://www.nuget.org/packages/bunit.xunit/) | |
| 28 | +| [bUnit](https://www.nuget.org/packages/bunit/) | Includes the bUnit.core and bUnit.web packages. | [](https://www.nuget.org/packages/bunit/) | |
31 | 29 | | [bUnit.core](https://www.nuget.org/packages/bunit.core/) | Core library that enables rendering a Blazor component in a test context. | [](https://www.nuget.org/packages/bunit.core/) | |
32 | | -| [bUnit.template](https://www.nuget.org/packages/bunit.template/) | Template, which currently creates an xUnit based bUnit test projects only | [](https://www.nuget.org/packages/bunit.template/) | |
| 30 | +| [bUnit.web](https://www.nuget.org/packages/bunit.web/) | Adds support for testing Blazor components for the web. This includes bUnit.core. | [](https://www.nuget.org/packages/bunit.web/) | |
| 31 | +| [bUnit.template](https://www.nuget.org/packages/bunit.template/) | Template, which currently creates xUnit-based bUnit test projects only | [](https://www.nuget.org/packages/bunit.template/) | |
33 | 32 |
|
34 | 33 | To get started, head to the [getting started documentation](https://bunit.egilhansen.com/docs/getting-started) to learn more. |
35 | 34 |
|
|
0 commit comments