facet-testhelpers

Crates.iofacet-testhelpers
lib.rsfacet-testhelpers
version0.43.2
created_at2025-04-11 23:43:24.775136+00
updated_at2026-01-23 17:59:08.917462+00
descriptionA collection of testing helpers and utilities for facet
homepagehttps://facet.rs
repositoryhttps://github.com/facet-rs/facet
max_upload_size
id1630490
size19,650
Amos Wenger (fasterthanlime)

documentation

README

facet-testhelpers

Coverage Status crates.io documentation MIT/Apache-2.0 licensed Discord

Lightweight test helpers: a log facade that always does tracing (with colors), and color-backtrace using the btparse backend.

Usage

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.

Recommendation

While this crate works with regular cargo test, we recommend using cargo-nextest for:

  • Process-per-test isolation
  • Faster parallel test execution
  • Better test output and reporting

Install with:

cargo install cargo-nextest

Then run tests with:

cargo nextest run

Sponsors

Thanks to all individual sponsors:

GitHub Sponsors Patreon

...along with corporate sponsors:

AWS Zed Depot

...without whom this work could not exist.

Special thanks

The facet logo was drawn by Misiasart.

License

Licensed under either of:

at your option.

Commit count: 3380

cargo fmt