Update the implementation to satisfy added, updated, or deleted tests in the
current jj commit.
Goals
- Remove dead code made obsolete by deleted tests
- Update implementation to match changed test expectations
- Add implementation for newly tested behaviors
Recently changed files
!jj diff --summary
If no files are changed, then consider all files in the current directory.
Workflow
- Explore each deleted, updated, or added test file:
- Read the file if it still exists
- Run
jj diff <file>to view changes - Identify:
- Deleted tests (behaviors no longer required)
- Modified tests (changed expectations, new edge cases, updated behavior)
- New tests (behaviors to implement)
- Find the implementation files that the changed tests import or reference
- Run the relevant tests
- Examine failing tests and update the implementation as necessary:
- If a test was deleted, remove dead code paths that are no longer exercised
- If a test expectation changed, update the implementation to match
- If a test is newly added, implement the required behavior Go back to step 3 after making updates until all tests pass