Always start by testing the specific crate you modified:
cargo test -p codex-tuicargo test -p codex-corecargo test -p codex-app-server-protocol
This is the fastest way to get feedback on your changes.
2
Run Full Test Suite (If Needed)
If you changed common, core, or protocol crates, run the complete test suite:
# Standard cargo testcargo test# Or with nextest (faster)just test
Avoid --all-features for routine local runs. It expands the build matrix and significantly increases build time and disk usage. Only use it when you specifically need full feature coverage.
use pretty_assertions::assert_eq;#[test]fn test_example() { let result = calculate_something(); let expected = ExpectedStruct { /* ... */ }; // Prefer deep equals on entire objects assert_eq!(result, expected);}
Before marking your PR as ready for review, run all checks locally:
Rust
TypeScript
# Format codejust fmt# Fix linter issuesjust fix -p <crate-you-touched># Run testscargo test -p <crate-you-touched># If you changed core crates:cargo test
# Run full validation suitepnpm test && pnpm run lint && pnpm run typecheck
CI failures that could have been caught locally slow down the review process. Always run checks before pushing.