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: README.md
+5-12Lines changed: 5 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@
20
20
- Pass parameters, cascading values and inject services into components under test
21
21
- Mock `IJSRuntime`, Blazor authentication and authorization, and others
22
22
23
-
bUnit builds on top of existing unit testing frameworks such as xUnit, NUnit, and MSTest, which run the Blazor component 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.
23
+
bUnit builds on top of existing unit testing frameworks such as xUnit, NUnit, and MSTest, which run the Blazor component 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.
24
24
25
25
**Go to [bUnit.dev](https://bunit.dev) to learn more.**
26
26
@@ -31,9 +31,9 @@ bUnit is available on NuGet in various incarnations. Most should just pick the [
31
31
| Name | Description | NuGet Download Link |
32
32
| ----- | ----- | ---- |
33
33
|[bUnit](https://www.nuget.org/packages/bunit/)| Includes the bUnit.core and bUnit.web packages. |[](https://www.nuget.org/packages/bunit/)|
34
-
|[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/)|
35
-
|[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/)|
36
-
|[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/)|
34
+
|[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/)|
35
+
|[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/)|
36
+
|[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/)|
37
37
38
38
To get started, head to the [getting started documentation](https://bunit.dev/docs/getting-started) to learn more.
39
39
@@ -63,13 +63,6 @@ A huge thank you to the [sponsors of my work with bUnit](https://github.com/spon
"_description": "bUnit is a unit testing library for Blazor Components. You can easily define components under test in C# or Razor syntax and verify outcome using semantic HTML diffing/comparison logic. You can interact with and inspect components, trigger event handlers, provide cascading values, inject services, mock IJsRuntime, and perform snapshot testing.",
74
66
"_enableSearch": true,
75
67
"_appLogoPath": "/images/bunit-logo.png",
76
-
"_disableBreadcrumb": true,
77
-
"_disableFooter": false
68
+
"_disableBreadcrumb": false,
69
+
"_disableFooter": false,
70
+
"_appFooter": "<small>Documentation updated on #{NBGV_GitCommitDate}# in commit #{NBGV_GitCommitIdShort}#</small>"
Copy file name to clipboardExpand all lines: docs/site/index.md
+25-40Lines changed: 25 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,15 +18,15 @@ title: bUnit - a testing library for Blazor components
18
18
- Pass parameters, cascading values and inject services into components under test
19
19
- Mock `IJSRuntime`, Blazor authentication and authorization, and others
20
20
21
-
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.
21
+
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.
22
22
23
23
**Go to the [Documentation](xref:getting-started) pages to learn more.**
24
24
25
-
### Test example
25
+
### Test example
26
26
27
27
Let’s write a test for the `<Counter>` component listed below. This comes with the standard Blazor project template which verifies that the counter corrects increments when the button is clicked:
To do this, you can carry out the following using bUnit and xUnit:
32
32
@@ -43,50 +43,35 @@ bUnit is available on NuGet in various incarnations. Most users should just pick
43
43
| Name | Description | NuGet Download Link |
44
44
| ----- | ----- | ---- |
45
45
|[bUnit](https://www.nuget.org/packages/bunit/)| Includes the bUnit.core and bUnit.web packages. |[](https://www.nuget.org/packages/bunit/)|
46
-
|[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/)|
47
-
|[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/)|
48
-
|[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/)|
46
+
|[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/)|
47
+
|[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/)|
48
+
|[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/)|
49
49
50
50
## Sponsors
51
51
52
52
A huge thank you to the [sponsors of my work with bUnit](https://github.com/sponsors/egil). The higher tier sponsors are:
Shout outs and a big thank you [to all the contributors](https://github.com/egil/bunit/graphs/contributors) to the library, including those who raise issues, those who provide input to issues, and those who send pull requests.
74
+
Shout outs and a big thank you [to all the contributors](https://github.com/egil/bunit/graphs/contributors) to the library, including those who raise issues, those who provide input to issues, and those who send pull requests.
90
75
91
76
**Want to help out? You can help in a number of ways:**
92
77
@@ -98,7 +83,7 @@ Shout outs and a big thank you [to all the contributors](https://github.com/egil
98
83
## Code of conduct
99
84
100
85
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
101
-
For more information see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
86
+
For more information see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
0 commit comments