Skip to content

Commit c980362

Browse files
committed
Packt edits to documentation
1 parent 94a6d38 commit c980362

38 files changed

+567
-437
lines changed

CODE-OF-CONDUCT.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Contributor Covenant Code of Conduct
1+
# Contributor Covenant Code of Conduct
22

33
## Our Pledge
44

55
In the interest of fostering an open and welcoming environment, we as
6-
contributors and maintainers pledge to make participation in our project and
7-
our community a harassment-free experience for everyone, regardless of age, body
8-
size, disability, ethnicity, sex characteristics, gender identity and expression,
6+
contributors and maintainers pledge to make our project and
7+
community a harassment-free experience for everyone, regardless of age,
8+
size, disability, ethnicity, sexuality, gender identity and expression,
99
level of experience, education, socio-economic status, nationality, personal
10-
appearance, race, religion, or sexual identity and orientation.
10+
appearance, race, or religion.
1111

1212
## Our Standards
1313

14-
Examples of behavior that contributes to creating a positive environment
14+
Examples of behavior that contribute towards creating a positive environment
1515
include:
1616

1717
* Using welcoming and inclusive language
@@ -39,8 +39,8 @@ response to any instances of unacceptable behavior.
3939

4040
Project maintainers have the right and responsibility to remove, edit, or
4141
reject comments, commits, code, wiki edits, issues, and other contributions
42-
that are not aligned to this Code of Conduct, or to ban temporarily or
43-
permanently any contributor for other behaviors that they deem inappropriate,
42+
that are not aligned to this Code of Conduct, or to temporarily or
43+
permanently ban any contributor for other behaviors that they deem inappropriate,
4444
threatening, offensive, or harmful.
4545

4646
## Scope
@@ -54,7 +54,7 @@ a project may be further defined and clarified by project maintainers.
5454

5555
## Enforcement
5656

57-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
57+
Instances of abuse, harassment, or otherwise unacceptable behavior may be
5858
reported by contacting the project leader at [egil@assimilated.dk](mailto:egil@assimilated.dk). All
5959
complaints will be reviewed and investigated and will result in a response that
6060
is deemed necessary and appropriate to the circumstances. The project team is
@@ -73,4 +73,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
7373
[homepage]: https://www.contributor-covenant.org
7474

7575
For answers to common questions about this code of conduct, see
76-
https://www.contributor-covenant.org/faq
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
1-
# How to contribute
1+
2+
# How to Contribute
23

34
One of the easiest ways to contribute is to participate in discussions on GitHub issues. You can also contribute by submitting pull requests with code changes.
45

5-
## General feedback and discussions?
6-
Start a discussion on the [issues list](https://github.com/egil/bunit/issues). Be sure to use the right template.
6+
## General Feedback and Discussions
7+
Start a discussion on the [bUnit discussion list](https://github.com/egil/bUnit/discussions).
78

8-
## Bugs and feature requests?
9+
## Bugs and feature requests
910
For bugs or feature requests, log a new issue on the [issues list](https://github.com/egil/bunit/issues). Be sure to use the right template.
1011

11-
## Contributing code and content
12+
## Contributing Code and Content
1213

13-
bUnit accept fixes and features! Here is what you should do when writing code for bUnit:
14+
bUnit accepts fixes and features. Here is what you should do when writing code for bUnit:
1415

15-
- Follow the coding conventions used in the project. In general, they align with the AspNetCore teams [coding guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines#coding-guidelines).
16+
- Follow the coding conventions used throughout the bUnit project. In general, they align with the AspNetCore teams [coding guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines#coding-guidelines).
1617
- Add, remove, or delete unit tests to cover your changes. Make sure tests are specific to the changes you are making. Tests need to be provided for every bug/feature that is completed.
1718
- All code changes should be done on the `DEV` branch, and pull requests should target it.
18-
- All updates to the documentation, located under `./docs/` should be done on the `main` branch **if** they are general in nature and not tied to a specific version. Changes to the documentation related to changes on the `DEV` branch should be submitted to the `DEV` branch.
19+
- All updates to the documentation located under `./docs/` should be done on the `main` branch **if** they are general in nature and not tied to a specific version. Changes to the documentation related to changes on the `DEV` branch should be submitted to the `DEV` branch.
1920
- Any code or documentation you share with the bUnit projects should fall under the projects license agreement.
2021

21-
Here are some resources to help you get started on how to contribute code or new content.
22+
Here are some resources to help you get started on how to contribute code or new content:
2223

23-
* ["Help wanted" issues](https://github.com/egil/bunit/labels/help%20wanted) - these issues are up for grabs. Comment on an issue if you want to create a fix.
24-
* ["Good first issue" issues](https://github.com/egil/bunit/labels/good%20first%20issue) - these are a good for newcomers.
24+
* ["Help wanted" issues](https://github.com/egil/bunit/labels/help%20wanted) - these issues are up for grabs if you want to create a fix. To do this, simply comment on the issue you want to fix.
25+
* ["Good first issue" issues](https://github.com/egil/bunit/labels/good%20first%20issue) - these are good for newcomers. Good first issues are small, usually require just a few hours of work, and do not require a deep technical knowledge of bUnit. This is a good place to start if you want to become familiar with bUnit’s inner workings and maybe take on bigger issues later.
2526

26-
### Identifying the scale
27+
### Identifying the Scale of a Contribution
2728

28-
If you would like to contribute to one of our repositories, first identify the scale of what you would like to contribute. If it is small (grammar/spelling or a bug fix) feel free to start working on a fix. If you are submitting a feature or substantial code contribution, please discuss it with the us first.
29+
If you would like to contribute to bUnit, first identify the scale of what you would like to contribute. If it is small (grammar/spelling or a bug fix), feel free to start working on a fix. If you are submitting a feature or substantial code contribution, please discuss it with us first.
2930

30-
You might also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik.
31+
You might also read these two blogs posts on contributing code: [Open Source Contribution Etiquette](http://tirania.org/blog/archive/2010/Dec-31.html) by Miguel de Icaza and [Don't "Push" Your Pull Requests](https://www.igvita.com/2011/12/19/dont-push-your-pull-requests/) by Ilya Grigorik. These blog posts highlight good open source collaboration etiquette and help align expectations between you and us.
3132

32-
All code submissions will be rigorously reviewed and tested, and only those that meet an high bar for both quality and design/roadmap appropriateness will be merged into the source.
33+
All code submissions will be rigorously reviewed and tested, and only those that meet a high bar for both quality and design/roadmap appropriateness will be merged into the source.
3334

34-
### Submitting a pull request
35+
### Submitting a Pull Request
3536

36-
If you don't know what a pull request is read this article: https://help.github.com/articles/using-pull-requests. Make sure the repository can build and all tests pass. Familiarize yourself with the project workflow and our coding conventions.
37+
If you don't know what a pull request is, read this article: https://help.github.com/articles/using-pull-requests. Make sure the repository can build and all tests pass. It is also a good idea to familiarize yourself with the project workflow and our coding conventions.
3738

38-
## Code of conduct
39+
## Code of Conduct
3940

40-
See [CODE-OF-CONDUCT.md](./CODE-OF-CONDUCT.md)
41+
See [CODE-OF-CONDUCT.md](./CODE-OF-CONDUCT.md)

README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,35 @@
99

1010
*Sponsored message: Telerik UI for Blazor – Get 50+ native Blazor UI components to build high-performing web apps. [Give it a try](https://www.telerik.com/campaigns/blazor/free-trial-1?utm_source=egilhansen&utm_medium=cpm&utm_campaign=blazor-trial-readme-sponsored-message).*
1111

12-
**bUnit** is a testing library for Blazor Components. Its goal is to make it easy to write _comprehensive, stable unit tests_. You can:
12+
**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:
1313

1414
- Setup and define components under tests using C# or Razor syntax
1515
- Verify outcome using semantic HTML comparer
16-
- Interact with and inspect components, trigger event handlers
16+
- Interact with and inspect components as well as triggering event handlers
1717
- Pass parameters, cascading values and inject services into components under test
1818
- Mock `IJsRuntime` and Blazors authentication and authorization
1919
- Perform snapshot testing
2020

21-
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.
21+
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.
2222

2323
**Go to [bUnit.egilhansen.com](https://bunit.egilhansen.com) to learn more.**
2424

25-
### NuGet downloads
25+
### NuGet Downloads
2626

2727
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`:
2828

29-
| Name | Type | NuGet Download Link |
29+
| Name | Description | NuGet Download Link |
3030
| ----- | ----- | ---- |
31-
| bUnit | Library, includes core, web, and xUnit support | [![Nuget](https://img.shields.io/nuget/dt/bunit?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit/) |
32-
| bUnit.core | Library, only core | [![Nuget](https://img.shields.io/nuget/dt/bunit.core?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit.core/) |
33-
| bUnit.web | Library, web and core | [![Nuget](https://img.shields.io/nuget/dt/bunit.web?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit.web/) |
34-
| bUnit.xUnit | Library, xUnit and core | [![Nuget](https://img.shields.io/nuget/dt/bunit.xunit?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit.xunit/) |
31+
| bUnit.web | Adds support for testing Blazor components for the web. This includes bUnit.core. | [![Nuget](https://img.shields.io/nuget/dt/bunit.web?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit.web/) |
32+
| bUnit.xUnit | Adds additional support for using bUnit with xUnit, including support for Razor-based tests. | [![Nuget](https://img.shields.io/nuget/dt/bunit.xunit?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit.xunit/) |
33+
| bUnit.core | Core library that enables rendering a Blazor component in a test context. | [![Nuget](https://img.shields.io/nuget/dt/bunit.core?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit.core/) |
3534
| bUnit.template | Template, which currently creates an xUnit based bUnit test projects only | [![Nuget](https://img.shields.io/nuget/dt/bunit.template?logo=nuget&style=flat-square)](https://www.nuget.org/packages/bunit.template/) |
3635

3736
To get started, head to the [getting started documentation](https://bunit.egilhansen.com/docs/getting-started) to learn more.
3837

3938
## Sponsors
4039

41-
A hugh thank you to the [sponsors of my work with bUnit](https://github.com/sponsors/egil). The higher tier sponsors are:
40+
A huge thank you to the [sponsors of my work with bUnit](https://github.com/sponsors/egil). The higher tier sponsors are:
4241

4342
<table>
4443
<tr>
@@ -55,13 +54,13 @@ A hugh thank you to the [sponsors of my work with bUnit](https://github.com/spon
5554

5655
These are the current goals that should be reached before v1.0.0 is ready:
5756

58-
- **Stabilize the APIs**, such that they work equally well with both xUnit, NUnit, and MSTest as the underlying test framework. The general goals is to make it easy and obvious for developers to create the tests they needed, and fall into the pit of success.
59-
- **Get the Razor-based testing to stable**, e.g. make the discovery and running of tests defined in .razor files stable and efficient. This includes adding support for NUnit and MSTest as test runners.
60-
- **Improve the documentation**. Currently there are a list of "How to" guides planned in the [Update Docs](https://github.com/egil/bunit/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22updated+docs%22) milestone.
61-
- **Join the .NET Foundation.**. This project is too large for one person to be the owner and be the sole maintainer of, so the plan is to apply for membership as soon as possible, most likely close to or after v1.0.0 ships, and get the needed support and guidance to ensure the project long term.
57+
- **Stabilize the APIs**, such that they work equally well with both xUnit, NUnit, and MSTest as the underlying test framework. The general goals are to make it easy for developers to create the tests they need, and to fall into the pit of success.
58+
- **Get the Razor-based testing to be stable**, e.g. make the discovery and running of tests defined in .razor files stable and efficient. This includes adding support for NUnit and MSTest as test runners.
59+
- **Improve the documentation**. It’s a good idea to get an experienced technical editor to review the documentation, making sure it is clear and understandable. In addition to this, more ‘How to guides are planned in the [Update Docs](https://github.com/egil/bunit/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22updated+docs%22) milestone.
60+
- **Join the .NET Foundation.**. This project is too large for one person to be the owner and the sole maintainer, so the plan is to apply for membership as soon as possible - most likely close to or after v1.0.0 ships - and to get the required support and guidance to ensure the project long term.
6261

63-
In the post v1.0.0 to v1.0.x time frame, focus will be on improving performance. Especially the spin-up time of about one second would be nice to get reduced.
62+
In the post-v1.0.0 to v1.0.x time frame, focus will be on improving performance. In particular, it would be nice to reduce the spin-up time of about one second.
6463

6564
## Contributors
6665

67-
Shout outs and a big thank you [to all the contributors](https://github.com/egil/bunit/graphs/contributors) to the library, both including those that raise issues, provide input to issues, and those who send pull requests. Thank you!
66+
Shout outs and a big thank you [to all the contributors](https://github.com/egil/bunit/graphs/contributors) to the library, including those that raise issues, provide input to issues, and those who send pull requests. Thank you!

docs/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
# Contributing to the documentation
1+
# Contributing to the Documentation
22

33
This folder contains the documentation site for bUnit.
44

5-
Here is a small getting started guide for contributing to the documentation.
5+
Here is a small getting started guide for contributing to the documentation...
66

77
## Structure
88

99
1. The `site` folder contains the code for generating the documentation site, _and_ the documentation in markdown files, located in `site/docs`.
1010
2. The `samples` folder projects for the sample code that is displayed in the documentation. It has the following projects:
1111
- `samples/components`: A Blazor component library project where components under test are placed.
12-
- `samples/tests/mstest`: A MSTest project, where MSTest test samples are placed.
13-
- `samples/tests/nunit`: A NUnit project, where NUnit test samples are placed.
14-
- `samples/tests/razor`: A xUnit based test project, where razor test samples are placed.
15-
- `samples/tests/xunit`: A xUnit project, where xUnit C# only test samples are placed.
12+
- `samples/tests/mstest`: A MSTest project where MSTest test samples are placed.
13+
- `samples/tests/nunit`: A NUnit project where NUnit test samples are placed.
14+
- `samples/tests/razor`: A xUnit based test project where razor test samples are placed.
15+
- `samples/tests/xunit`: A xUnit project where xUnit C# only test samples are placed.
1616

17-
These samples components source files and tests source files are included in the documentation using [DocFx's Code Snippet syntax](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html?tabs=tabid-1%2Ctabid-a#code-snippet). They are created as real projects, making them runnable, which helps ensure that the code shown in the documentation pages are correct and works.
17+
These sample components source files and tests source files are included in the documentation using [DocFx's Code Snippet syntax](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html?tabs=tabid-1%2Ctabid-a#code-snippet). They are created as real projects, making them runnable, which helps ensure that the code shown in the documentation pages are correct and in working order.
1818

19-
## Building and view docs locally
19+
## Building and Viewing Docs Locally
2020

21-
To build and view the documentation locally, a few steps is needed:
21+
To build and view the documentation locally, following a few steps is required:
2222

2323
1. From `docs/site` run `dotnet build`. If you get warnings from running `dotnet build`, try running it again.
24-
2. From `docs/` run `serve-docs.cmd`, it will start up a local web server, hosting the generated documentation site on http://localhost:8080, using the [`dotnet serve` tool](https://github.com/natemcmaster/dotnet-serve).
25-
3. After changing samples, from `docs/samples`, run `dotnet test`. This will compile the sample components and run the sample tests.
24+
2. From `docs/` run `serve-docs.cmd`. This will start up a local web server, hosting the generated documentation site on http://localhost:8080, using the [`dotnet serve` tool](https://github.com/natemcmaster/dotnet-serve).
25+
3. After changing samples from `docs/samples`, run `dotnet test`. This will compile the sample components and run the sample tests.
2626

27-
## Documentation writing rules
27+
## Documentation Writing Rules
2828

29-
- All pages should have a [YAML header](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#yaml-header) with an `UID` to enable easy [cross reference](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#cross-reference) between pages
29+
- All pages should have a [YAML header](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#yaml-header) with a `UID` to make it easy to [cross reference](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#cross-reference) between pages
3030
- All page and code references should be created using the [`xref:UID` cross reference syntax](https://dotnet.github.io/docfx/tutorial/links_and_cross_references.html#using-cross-reference).
31-
- Prefer to include code snippets as sample files in the `samples` projects, using the [code snippet syntax](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#code-snippet).
32-
- All code snippets should use 2 spaces as an indention unit (1 tab = 2 spaces)
31+
- By default, you should include code snippets as sample files in the `samples` projects, using the [code snippet syntax](https://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#code-snippet).
32+
- All code snippets should use 2 spaces as an indention unit (1 tab = 2 spaces).

docs/logos/test.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/site/docfx.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
}
1414
],
1515
"dest": "api",
16+
"properties": {
17+
"TargetFramework": "netstandard2.1"
18+
},
1619
"disableGitFeatures": false,
1720
"disableDefaultFilter": false
1821
}
@@ -78,7 +81,7 @@
7881
"markdownEngineName": "markdig",
7982
"noLangKeyword": false,
8083
"keepFileLink": false,
81-
"cleanupCacheHistory": false,
84+
"cleanupCacheHistory": true,
8285
"disableGitFeatures": false
8386
}
84-
}
87+
}

0 commit comments

Comments
 (0)