-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add section on how to write tests and run tests for the ratatui library #590
Comments
Possibly related to #358 |
Personally I would try to explain everything for cargo test too. As long as it works with standard. nextest might execute faster but is not part of the default cargo experience which people are familiar with. As long as it works with the standard tools without installing anything additionally we should keep that working to reduce the entry barrier. Side note… |
Yeah, I often |
In the developer guide, we should add a section on how to write tests and run tests.
This section should include a brief primer on
cargo test
, e.g.:cargo test
but if you want to print to stdout, you can use-- --nocapture
.--lib
flag.e.g.
We also also add instructions for
cargo nextest
and how to run a subset of tests using that.In terms of writing tests, some modules use
rstest
, which can make writing a series of specification tests like so quite easily to parse:This use the
rstest
crate. A specific case from a test can be run by using something like the following:Sometimes, the case has more information in the name like in this section and then to run case 08 you can do this:
The text was updated successfully, but these errors were encountered: