{
  "id": 20794435,
  "title": "Tests that prove something: break a copy and see the test fail",
  "url": "https://urgent.news/2026/11/19/tests-that-prove-something-break-a-copy-and-see-the-test-fail",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-19T20:00:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/yonto/tests-that-prove-something-break-a-copy-and-see-the-test-fail-16eg"
  },
  "original_language": "en",
  "account": "When a test is written to verify a bug fix, the Yonto Player repository practice is to revert the fix and confirm that the test fails. This loop demonstrates the effectiveness of the fix and helps isolate the issue. Two claims can be made about a change: it either addresses a behavior or establishes a rule. The proof for each claim involves a test that fails without the fix (showing the original problem) or requires mutating the code to break a specific rule (demonstrating the new rule holds). The repository's testing notes provide guidance on how to mutate the code safely and effectively. Mutations should be performed one decision at a time, reverting each change individually to ensure the change is isolated and the test failure accurately reflects the impact of the fix. Break the last item of a loop rather than the first, and check that multiple failures are reported when multiple mutations survive. If a mutation fails to apply, it indicates the code is untested or the change is ineffective. Use fakes, such as a fake content source with call counters or gates, to speed up the mutation process and make it more precise.",
  "summary": "A green suite only counts if it can go red. So when a test is written for a fix, the practice in Yonto Player's repo is to revert the fix and watch that test fail, and to break the exact line the test claims to hold. This post is how that loop works, how to run it safely, and what to do with fakes so the loop is cheap. Two questions, both answered by failing There are two claims a change can…",
  "key_points": [
    "Tests verify bug fixes by reverting fixes and confirming test failures",
    "Two claims: addressing behavior or establishing a new rule",
    "Mutate code one decision at a time, revert changes to isolate impact"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}