Add, update, or delete tests for changes made in the current jj commit.
Before starting, load /authoring-tests.
Target
jj show --git
Arguments: $ARGUMENTS
Reconcile tests for the target named in the arguments if given. Otherwise reconcile the changes in the current commit shown above. If there are no arguments and the commit has no changes, ask the user what to reconcile tests for and stop.
Goals
- Delete tests that no longer apply
- Update outdated test expectations
- Add tests for new behaviors
Workflow
- Explore each deleted, updated, or added file, and identify:
- Deleted logic
- Modified logic (new branches, edge cases, changed behavior)
- New logic
- Find the test files that import or reference the changed code. Create them if missing
- Run the relevant tests
- Examine failing tests and update them as necessary:
- Delete if no longer applicable
- Update if expectations are outdated
- Flag regressions to the user. Describe the changed behavior, the failing test, and your hypothesis about why it's a bug. Ask how to proceed. Go back to step 3 after making updates until all tests pass
- Add tests for new behaviors
- Run the new tests
- Examine failing tests and update them as necessary:
- Update if there's a bug in the test
- Flag to the user if the tests caught a bug. Describe the behavior, the failing test, and your hypothesis about why it's a bug. Ask how to proceed. Go back to step 7 after making updates
- If the project has a coverage command, run it. If new logic is not covered, go back to step 5