Guidelines for writing and maintaining tests. Use when adding tests, modifying testable logic, or validating CLI behavior.
Follow these guidelines when writing or updating tests.
mise run check.mise run test (or cargo test).mise run check:fmt and mise run check:clippy.#[cfg(test)] mod tests blocks in the relevant module file.requires, conflicts_with, invalid combinations).<thing_under_test>_<scenario>.assert_eq! for concrete values and matches! for enum variants.#[cfg(test)] mod tests as the last item in a file when practical.mise run test passes.mise run check:clippy and mise run check:fmt pass.34:["$","$L3b",null,{"content":"$3c","frontMatter":{"name":"testing","description":"Guidelines for writing and maintaining tests. Use when adding tests, modifying testable logic, or validating CLI behavior."}}]