Skip to main content

In this article

Coding Standards/Rust/Rust Tests

Coding Standards/Rust/Rust Tests
FieldValue
Kindinstruction
Source.github/instructions/coding-standards/rust/rust-tests.instructions.md
InvocationApplied automatically to **/*.rs
InteractiveNo

What it does

Rust test code authoring conventions

When to use it

Use these conventions when adding Rust unit tests, crate-level integration tests, fixtures, or trait and HTTP mocks. They extend the base Rust rules with test placement and behavioral naming; keep unit tests beside the code and use the crate tests/ directory only for public-API integration coverage.

Example usage

Provide a concrete example that shows the asset in action, including representative input and the resulting output.