Skip to content

New agent-written post: Make your coding agent write test fixtures that can't lie - #7

Open
DrewHoo wants to merge 1 commit into
mainfrom
claude/post-agent-test-fixtures
Open

DrewHoo wants to merge 1 commit into
mainfrom
claude/post-agent-test-fixtures

Conversation

@DrewHoo

@DrewHoo DrewHoo commented Sep 3, 2026

Copy link
Copy Markdown
Owner

An agent-written post that reframes your two GraphQL fixtures posts for people who now have agents writing their tests. Draft only, nothing published.

Title: Make your coding agent write test fixtures that can't lie
Description: Agents write tests that pass and prove nothing. A GraphQL mock resolver type-checked against your schema can't: a wrong fixture fails to compile. (145 chars)
URL: /blog/coding-agent-test-fixtures-that-cant-lie/

The pitch: a CLAUDE.md rule against mocking the thing under test is an input the agent weighs. A MockResolvers type generated from the schema is not. Both your posts are linked as the detailed method, plus the typechecking-graphql-mock-resolvers repo. Nothing is re-voiced or put in your mouth; the post says out loud that it was written from your two posts, not from a session.

Autocomplete evidence: "claude code test" and "coding agent test" both return full suggestion lists ("claude code testing agent", "coding agent test prompt"), so the searcher's nouns are agent + test.
"graphql test fixtures", "mock resolvers graphql" and "how to make claude write good tests" return zero suggestions, so GraphQL stays out of the title and lives in the description, H2s and tags instead.

Needs your eyes:

  • pubDate is 2026-09-03. The index card renders it as "Sep 2, 2026" (midnight UTC in local time), same as the voice post shows Aug 31. Change the date if you want it to read Sep 3.
  • One claim I inferred rather than read: your second post says you wrote the interface "about 2 years ago" and found 375 results in 58 files. I wrote that as "roughly two years after he wrote it" and "for about two years, in a codebase". Fix if that's wrong.
  • The fixture shape note. Post 1 writes { AbilitiesListItem: { effect: () => "paralyzed" } } and post 2's tighter type requires the top-level entry to be a function. I show the second form and flag the difference. Tell me if I read that wrong.
  • Hero image is composed, not a screenshot: a passing test that mocks the function under test next to the same fixture with AbilitesListItem misspelled and the tsc error. No error code shown, so nothing to get wrong.

Verified: npx astro build clean, post page and homepage card with the AI badge both present, strikethrough renders as <del>, no em dashes.

🤖 Generated with Claude Code

…nt users

New post at /blog/coding-agent-test-fixtures-that-cant-lie/. Written by the
agent from Drew's two January 2025 GraphQL test-fixture posts, not from a live
session; the post says so up front and carries aiWritten: true.

Thesis: a CLAUDE.md rule against mocking the function under test is an input
the agent weighs, but a mock-resolver type generated from the GraphQL schema
is not. A wrong fixture fails to compile. Links both of Drew's posts as the
detailed method and his typechecking-graphql-mock-resolvers repo.

Hero image composed with PIL: a green-but-meaningless test next to a fixture
with one letter wrong that tsc rejects.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@netlify

netlify Bot commented Sep 3, 2026

Copy link
Copy Markdown

Deploy Preview for effulgent-alfajores-60f09f canceled.

Name Link
🔨 Latest commit 1ae5abf
🔍 Latest deploy log https://app.netlify.com/projects/effulgent-alfajores-60f09f/deploys/6a999f791bcbb800081da069

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