Does Claude Code write unit tests?
Yes. Claude Code writes unit tests in Vitest, Jest, Pytest, JUnit, and other major frameworks while following the conventions of your existing test suite. ClaudeVault's test writer skill adds structured workflows for edge cases, error paths, and boundary conditions that generic AI test generators commonly skip.
How does Claude Code decide which tests to write first?
Claude Code prioritizes tests based on cost-of-failure when given the testing strategy designer skill. It analyzes which modules are highest-risk if they break, then ranks test targets accordingly. This is more useful than chasing a coverage percentage because it focuses test effort where bugs hurt most.
How does Claude Code handle test-driven development?
Claude Code supports a full TDD loop: write the failing test, run it to verify it fails, implement the minimal code to pass, run the test again, then commit. ClaudeVault's test writer skill enforces this discipline so Claude doesn't skip the failing-test step or batch implementation ahead of validation.
What is contract testing and why does it matter?
Contract testing verifies that the assumptions one module makes about another are still true. It matters because most production bugs come from broken contracts between modules, not from buggy logic inside a single module. ClaudeVault's contract testing advisor helps Claude write the tests that catch these failures before deploy.
Can Claude Code write end-to-end Playwright tests?
Yes. Claude Code can write Playwright tests when given the Playwright MCP server, including browser navigation, click interactions, and assertion steps. Combine this with the test writer skill to get setup, page object patterns, and flake-resistance practices that make Playwright suites maintainable.
How many tests can Claude Code generate in one session?
Realistic per-session capacity is 5-15 well-structured tests before context degradation affects test quality. For larger suites, break the work into focused sessions by feature area or module, keeping each session within Claude's reliable working window.