Claude-skill-registry implementing-testing-strategy

Quality assurance protocols using Vitest. Use for critical logic like pricing and availability calculations.

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/implementing-testing-strategy" ~/.claude/skills/majiayu000-claude-skill-registry-implementing-testing-strategy && rm -rf "$T"
manifest: skills/data/implementing-testing-strategy/SKILL.md
source content

Testing Strategy

When to use this skill

  • Building core business logic (e.g., "Calculate Group Discount").
  • Before major refactors.

Tools

  • Vitest: Fast, Vite-compatible runner.
  • React Testing Library: For component testing (optional/high-priority items only).

Example Test

import { calculatePrice } from './pricing';
import { expect, test } from 'vitest';

test('applies 10% discount for groups > 5', () => {
    expect(calculatePrice(100, 6)).toBe(540); 
});

Instructions

  • Focus: Test logic, not the UI (avoid testing that "a button is blue").
  • Mocks: Mock Appwrite SDK calls locally to avoid hitting the live API during tests.