CCAR-F practice › Claude Code Configuration & Workflows · Question 67 of 105
Claude Code Configuration & Workflows
A CI job uses Claude Code to generate unit tests for changed modules. Reviewers report that about half of the suggested tests duplicate scenarios the existing suite already covers. What is the most effective fix?
Show answer and explanation
Answer: B — Provide the module's existing test files in context when generating tests
Claude can't avoid duplicating tests it can't see. Providing the existing test files in context lets generation add only scenarios the suite doesn't already cover. Documenting testing standards and available fixtures in CLAUDE.md further improves quality. (A) cuts useful tests along with duplicates. (C) is a brittle after-the-fact filter, because similar scenarios can have different names. (D) applies a review technique to a generation problem.
Keep going
More Claude Code Configuration & Workflows questions
- A monorepo has one root CLAUDE.md that three package teams keep editing to add build…
- A 1,200-line root CLAUDE.md mixes testing, API, deployment, and frontend standards…
- A new engineer reports that Claude Code ignores the team's API naming conventions in…
- For the same developer on the same branch, Claude follows the repository's logging…
- Your project CLAUDE.md holds the team's naming conventions plus a 15-step release…