Industrial
Linguistics
Slide 11 of 55

Claude Code - Advanced

Slide 11 / 55

Course concept

What to put in CLAUDE.md (or your subagents) about tests

Humans are the bottleneck to TDD. Claude Code needs TDD so that it doesn’t need the whole program in context

Pending tests

@pytest.mark.xfail / @Pending / test.todo(…)

Include selenium / puppeteer

If there’s a web interface, get that tested early

Red-Green TDD

This helps it focus on the thing it is supposed to be developing

Note that Claude will occasionally alter a test and declare the feature complete.

Narration

Listen or continue with the transcript

Transcript

Here's what to put in your CLAUDE.md file - or in your subagent instructions - about tests.

Remember: humans are the bottleneck to test-driven development. Claude Code needs TDD so it doesn't need the whole program in context.

First, use pending tests. Mark tests with pytest.mark.xfail in Python, @Pending in Java, or test.todo in JavaScript. This lets you define the test suite before implementing features.

Second, if there's a web interface, include Selenium or Puppeteer. Get that tested early - frontend testing catches integration issues fast.

Third, emphasize red-green TDD. This helps Claude focus on the specific thing it's supposed to be developing right now.

One warning: Claude will occasionally alter a test and declare the feature complete. Watch for this and push back when it happens.