| Crates.io | facet-testhelpers |
| lib.rs | facet-testhelpers |
| version | 0.43.2 |
| created_at | 2025-04-11 23:43:24.775136+00 |
| updated_at | 2026-01-23 17:59:08.917462+00 |
| description | A collection of testing helpers and utilities for facet |
| homepage | https://facet.rs |
| repository | https://github.com/facet-rs/facet |
| max_upload_size | |
| id | 1630490 |
| size | 19,650 |
Lightweight test helpers: a log facade that always does tracing (with colors), and color-backtrace using the btparse backend.
Add this to your test files:
#[facet_testhelpers::test]
fn my_test() {
log::info!("This will be printed with color!");
// Your test code here
}
The test macro sets up a simple logger that works with both cargo test and cargo nextest run.
While this crate works with regular cargo test, we recommend using cargo-nextest for:
Install with:
cargo install cargo-nextest
Then run tests with:
cargo nextest run
Thanks to all individual sponsors:
...along with corporate sponsors:
...without whom this work could not exist.
The facet logo was drawn by Misiasart.
Licensed under either of:
at your option.