What problem does it solve?
Rust developers often write inconsistent tests with unclear assertions, poor organization, and missing edge-case coverage. This Skill standardizes how Rust tests are written, structured, and executed across the HASH monorepo.
Core Features & Use Cases
- Test Execution Standards: Defines when to use cargo-nextest for unit and integration tests versus the default runner for documentation tests, plus clippy and cargo doc verification commands.
- Assertion Conventions: Enforces descriptive "should..." assertion messages, preferring expect() over unwrap() and assert_eq! with custom messages.
- Test Organization & Design: Covers Arrange-Act-Assert structure, module grouping, naming rules (no test_ prefixes), parameterized tests, and edge-case coverage.
- Use Case: When adding a new Rust function with error paths, use this Skill to generate tests covering happy paths, each error variant, and boundary conditions with properly formatted assertion messages.
Quick Start
Write Rust tests for my new parser function following the HASH testing strategy, covering error cases and using proper assertion messages.