You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/site/index.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,23 +13,17 @@ title: bUnit - a testing library for Blazor components
13
13
14
14
**bUnit** is a testing library for Blazor Components. Its goal is to make it easy to write _comprehensive, stable unit tests_. You can:
15
15
16
-
- Setup and define components under tests in C# or Razor syntax
16
+
- Setup and define components under tests using C# or Razor syntax
17
17
- Verify outcome using semantic HTML comparer
18
-
- Interact with and inspect components
19
-
- Trigger event handlers
20
-
- Provide cascading values
21
-
- Inject services
22
-
- Mock `IJsRuntime`
18
+
- Interact with and inspect components, trigger event handlers
19
+
- Pass parameters, cascading values and inject services into components under test
20
+
- Mock `IJsRuntime` and Blazors authentication and authorization
23
21
- Perform snapshot testing
24
22
25
23
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.
26
24
27
25
**Go to the [Documentation](xref:getting-started) pages to learn more.**
28
26
29
-
> [!NOTE]
30
-
> The documentation is currently being rewritten to reflect the recent changes.
31
-
> Please excuse the mess.
32
-
33
27
### Test example
34
28
35
29
For example, to test the `<Counter>` component listed below:
@@ -38,15 +32,15 @@ For example, to test the `<Counter>` component listed below:
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`:
46
40
47
41
| Name | Type | NuGet Download Link |
48
42
| ----- | ----- | ---- |
49
-
| bUnit | Library, includes core, web, and xUnit |[](https://www.nuget.org/packages/bunit/)|
43
+
| bUnit | Library, includes core, web, and xUnit support |[](https://www.nuget.org/packages/bunit/)|
50
44
| bUnit.core | Library, only core |[](https://www.nuget.org/packages/bunit.core/)|
51
45
| bUnit.web | Library, web and core |[](https://www.nuget.org/packages/bunit.web/)|
52
46
| bUnit.xUnit |Library, xUnit and core |[](https://www.nuget.org/packages/bunit.xunit/)|
0 commit comments