Testing
Most tests are in tests/it/ as a single integration test binary, following the matklad pattern. Tests validate behavior through public interfaces only.
Unit tests should only be used when integration tests are not feasible or when testing private implementation details.
Organization
The module structure in tests/it/ mirrors src/. Each module has:
mod.rsfor test declarationshelpers.rsfor module-specific utilities- Common helpers in
tests/it/helpers.rs
Running Tests
task test # Run all tests with nextest
cargo test --test it # Run integration tests
cargo test auth:: # Run specific module tests
Writing Tests
- Add tests to appropriate module in
tests/it/ - Test both happy path and error cases
- Use helpers from
tests/it/helpers.rs - Follow
test_<component>_<functionality>naming