writing-tests

Guide behavior-focused test writing with the Testing Trophy model.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/seanreed1111/langgraph-blog-repo --skill writing-tests-seanreed1111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-tests
Source: https://github.com/seanreed1111/langgraph-blog-repo/tree/main/.claude/skills/writing-tests
Command: npx skills add https://github.com/seanreed1111/langgraph-blog-repo --skill writing-tests-seanreed1111

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you write effective tests that give you confidence in your code's behavior, avoiding common pitfalls like over-mocking or testing implementation details.

Core Features & Use Cases

  • Testing Strategy: Guides you on choosing the right test type (Integration, E2E, Unit) based on the Testing Trophy model.
  • Mocking Guidelines: Provides clear rules on when and what to mock, emphasizing real dependencies.
  • Assertion Strategy: Advises on asserting observable outcomes rather than internal states.
  • Use Case: When you're unsure whether to write a unit test for a complex function or an integration test for a service interaction, this Skill provides a clear decision framework.

Quick Start

Use the writing-tests skill to understand the Testing Trophy model and its implications for mocking.

Frequently Asked Questions about writing-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between unit tests and integration tests for my service?

Choosing between unit and integration tests requires balancing test value and confidence. This Skill applies the Testing Trophy model, prioritizing integration tests to verify service interactions while minimizing fragile unit tests.

What are the guidelines for mocking dependencies in behavior-driven development?

Mocking guidelines in behavior-driven development emphasize using real dependencies whenever possible. This Skill advises mocking only at boundaries to avoid testing implementation details and ensure observable outcomes.

Does this testing guidance work with TypeScript, React, and Go platforms?

Yes, the behavior-focused testing guidance works with TypeScript, React, and Go platforms. It provides specific assertion techniques and mocking strategies tailored for these environments to build confident tests.

What is the best way to write tests that assert observable outcomes?

The best way to write tests asserting observable outcomes is focusing on behavior over internal states. This Skill guides you to avoid over-mocking and assert public results, preventing broken tests during refactoring.

When should I avoid using mocks in my e2e test suite?

You should avoid using mocks in e2e test suites when verifying complete user flows. This Skill helps identify scenarios where over-mocking defeats the purpose of end-to-end validation by hiding real integration failures.