Cairo Test Organization
Overview
Explain how to structure unit and integration tests in Cairo projects.
Quick Use
- •Read
references/test-organization.mdbefore answering. - •Put unit tests alongside code in
srcwith#[cfg(test)]. - •Put integration tests in a top-level
tests/directory.
Response Checklist
- •Unit tests can access private functions via module scoping.
- •Integration tests compile as separate crates per file and use the public API.
- •Use
tests/lib.cairoto make the tests folder a single crate with shared helpers.
Example Requests
- •"Where do integration tests live in Cairo projects?"
- •"How do I share helpers across integration tests?"
- •"Can unit tests call private functions?"