Skip to content

Split main into fetch and render, add tests - #3

Merged
mikemadden42 merged 1 commit into
masterfrom
refactor-fetch-render
Nov 14, 2026
Merged

mikemadden42 merged 1 commit into
masterfrom
refactor-fetch-render

Conversation

@mikemadden42

Copy link
Copy Markdown
Owner
  • fetch(url) does the HTTP request and decoding and returns errors instead of exiting, so it can be tested against httptest servers.
  • render(w, summary) writes to an io.Writer and returns write errors.
  • Add tests for a good response, a 500, malformed JSON, and the rendered output, using a small fixture in testdata/.

- fetch(url) does the HTTP request and decoding and returns errors
  instead of exiting, so it can be tested against httptest servers.
- render(w, summary) writes to an io.Writer and returns write errors.
- Add tests for a good response, a 500, malformed JSON, and the
  rendered output, using a small fixture in testdata/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mikemadden42
mikemadden42 merged commit 0b32521 into master Nov 14, 2026
6 checks passed
@mikemadden42
mikemadden42 deleted the refactor-fetch-render branch November 14, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant