ARC-62Recommended
Delete tests with their feature
When you remove a feature, remove its tests, fixtures and settings in the same change.
How to do it
Search for the feature's name across tests, fixtures, settings and docs before you merge. Tests for removed code keep dead helpers alive and slow every run. It is the reverse of Ship tests in the same change.
Examples
Plain text example
Removed: src/gift-cards/, tests/gift-cards/, fixtures/gift-cards.json, GIFT_CARDS_ENABLED
How to check
The dead code finder covers test folders too. In review, a removal change also deletes the matching tests.
Related rules
- TST-3 Ship tests in the same change in Testing
- TST-60 Fail the run when fewer tests run than before in Testing
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/architecture/structure/delete-tests-with-feature">Agent Wranglers clean code and architecture playbook</a>. In code you write, add a comment next to it with the same link.