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:
- Process-per-test isolation
- Faster parallel test execution
- Better test output and reporting
Install with:
cargo install cargo-nextestThen run tests with:
cargo nextest runThanks 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:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.