{
  "id": 8132829,
  "title": "Your README's code examples are untested — here's how I test mine in any language",
  "url": "https://urgent.news/2026/09/18/your-readmes-code-examples-are-untested-heres-how-i-test-mine-in-any",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-09-18T00:24:10.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ingridowusu/your-readmes-code-examples-are-untested-heres-how-i-test-mine-in-any-language-3h7a"
  },
  "original_language": "en",
  "account": null,
  "summary": "The article discusses the issue of untested code examples in README files and introduces a tool called mdoctest to address this problem. mdoctest treats fenced code blocks in Markdown as executable tests, running them and checking if the output matches the documented output. It supports any language, runs commands in a persistent shell, and can automatically fix the expected output when changes are made. The tool also integrates with pre-commit hooks and GitHub Actions to highlight drifts on PR files. The author, Ingrid Owusu, highlights the benefits of using mdoctest, such as making keeping documentation correct a one-liner and integrating it into CI pipelines.",
  "key_points": [],
  "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."
}