rust-unit-tests

Installation
SKILL.md

Rust Unit Tests in warp

Scope

  • This skill focuses on crate-level unit tests.
  • Favor incremental, well-scoped tests that exercise a single function or behavior per case.

Where unit tests live

  • Put unit tests in separate files named ${filename}_tests.rs or mod_test.rs.
  • Include the test module at the end of the corresponding source file:
#[cfg(test)]
#[path = "filename_tests.rs"] // or "mod_test.rs"
mod tests;

Writing good tests

  • Use descriptive names: fn parses_utf8_sequence_when_valid().
  • Prefer assert_eq!/assert_ne! over assert! for clearer diffs.
Related skills
Installs
1
Repository
warpdotdev/warp
GitHub Stars
58.1K
First Seen
2 days ago