writing-tests

Write behavior-focused tests using real dependencies and observable outputs.

127|19|Updated Oct 23, 2025
One-click install
npx skills add https://github.com/rileyhilliard/claude-essentials --skill writing-tests-rileyhilliard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-tests
Source: https://github.com/rileyhilliard/claude-essentials/tree/main/plugins/ce/skills/writing-tests
Command: npx skills add https://github.com/rileyhilliard/claude-essentials --skill writing-tests-rileyhilliard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Writing tests often relies on mocks, which can hide real integration issues. This Skill guides you to write behavior-focused tests using real dependencies to validate user-visible outcomes and confidence in refactoring.

Core Features & Use Cases

  • Emphasizes Testing Trophy model prioritizing integration and end-to-end tests over isolated unit tests.
  • Provides guidance to decide test types, structure, and when to mock only external boundaries.
  • Includes language-agnostic patterns with concrete examples across Go, Python, and TypeScript to apply real-dependency testing in practice.

Quick Start

To start, draft a test that exercises a complete user scenario using real modules and verify observable outcomes.

Frequently Asked Questions about writing-tests

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

FAQPage Schema
How do I write integration tests without mocks using real dependencies?

To write integration tests without mocks, you exercise complete user scenarios using real modules and verify observable outcomes rather than internal implementation details. This approach minimizes mocking to external boundaries and validates actual integration points.

What is the Testing Trophy model and how does it prioritize behavior testing?

The Testing Trophy model prioritizes integration and end-to-end tests over isolated unit tests to validate user-visible outcomes. It emphasizes behavior testing with real dependencies to provide higher confidence in refactoring and catch real integration issues.

Why does mocking dependencies hide real integration issues in test suites?

Mocking dependencies hides real integration issues because mocks replace actual modules with simulated responses, bypassing real interactions. This creates false confidence by validating that your code works against mocked behavior rather than the actual dependency contracts.

Can I apply behavior-focused testing patterns across Go, Python, and TypeScript?

Yes, you can apply behavior-focused testing patterns across Go, Python, and TypeScript. The approach provides language-agnostic patterns with concrete examples for selecting test types, structuring tests, and mocking only external boundaries across these languages.

When should I avoid isolated unit tests in favor of integration testing?

You should avoid isolated unit tests in favor of integration testing when you need to validate user-visible outcomes and confidence in refactoring. Integration tests using real dependencies provide higher assurance that complete user scenarios work correctly.

What are common anti-patterns when structuring end-to-end test workflows?

Common anti-patterns when structuring end-to-end test workflows include over-mocking internal modules, asserting internal implementation details rather than observable outputs, and writing isolated unit tests that fail to validate real integration behavior.