use-bdd-style-test-naming

Installation
SKILL.md

Summary

When writing tests, use a Behavior-Driven Development (BDD) style for naming test cases. Focus on the behavior and outcome rather than the implementation details.

Rationale

  • Readability: The test output reads like a specification of the system.
  • Clarity: Forces the writer to think about behavior rather than just "test case 1" or "function X".
  • Consistency: Standardizes how tests are described across the codebase, regardless of language.

Guidance

  1. Prefix: Start test descriptions with "it should" or "it must" (or just "should" if the framework provides it already).
  2. Content: Describe the specific behavior and expected result.
  3. Scope: This applies to:
    • t.Run() descriptions in Go.
    • it() / test() descriptions in JavaScript/TypeScript (Vitest, Jest).
    • @Test display names in Java.
Installs
1
First Seen
Apr 5, 2026
use-bdd-style-test-naming — mew-ton/coding-guidelines