Loading...
Loading...
Reviews Rust test code for unit test patterns, integration test structure, async testing, mocking approaches, and property-based testing. Covers Rust 2024 edition changes including async fn in traits for mocks,
npx skill4agent add existential-birds/beagle rust-testing-code-reviewCargo.tomlif let#[expect]#[cfg(test)]tests/#[tokio::test]async-traitasync fnif letLazyLocklazy_static!once_cell[FILE:LINE] ISSUE_TITLE
Severity: Critical | Major | Minor | Informational
Description of the issue and why it matters.| Issue Type | Reference |
|---|---|
Unit tests, assertions, naming, snapshots, rstest, doc tests, | references/unit-tests.md |
Integration tests, async testing, fixtures, test databases, native | references/integration-tests.md |
| Fuzzing, property-based testing, Miri, Loom, benchmarking, compile_fail, custom harness, mocking strategies | references/advanced-testing.md |
#[cfg(test)] mod teststests/use super::*test_<function>_<scenario>_<expected>#[tokio::test]#[tokio::test(flavor = "multi_thread")]block_on.awaitasync fnasync-traitassert_eq!assert_ne!assert!matches!matches!if letstd::sync::LazyLocklazy_static!once_cellResult::Err#[should_panic]Result#[expect(lint)]#[allow(lint)]#[expect]#[allow]#[allow]#[expect]test_happy_pathmod<function>_should_<behavior>_when_<condition>cargo instasnapshots/assert_eq!rstest#[rstest]#[case::name]#[fixture]#[case(1)]#[rstest] #[tokio::test]/// # Examples#cargo test --doc#[should_panic]expectedunwrap()if letasync-traitasync fnassert!(x == y)assert_eq!(x, y)#[allow]#[expect]lazy_static!once_cellLazyLockproptestquickcheckunwrap()expect()use super::*#[allow(dead_code)]clone()assert!.is_some().is_empty()unwrap()Result?async-traitdynasync fndyn Traitasync-trait#[expect]LazyLockbeagle-rust:review-verification-protocol