Back to list
michelabboud

testing-standards

by michelabboud

2🍴 0📅 Jan 16, 2026

SKILL.md


name: testing-standards description: Write comprehensive tests following TDD and best practices. Use when generating unit tests, integration tests, or end-to-end tests for any code dependencies:

  • jest
  • @testing-library/react

Testing Standards Skill

Test Structure (AAA Pattern)

describe('Component/Function Name', () => {
  it('should do something specific', () => {
    // Arrange - Set up test data
    const input = { foo: 'bar' }
    
    // Act - Execute the code
    const result = functionUnderTest(input)
    
    // Assert - Verify results
    expect(result).toEqual(expectedOutput)
  })
})

Test Categories

Unit Tests

  • Test single functions/methods
  • Mock all dependencies
  • Fast (<100ms per test)
  • High coverage (80%+)

Integration Tests

  • Test component interactions
  • Use test database
  • Moderate speed
  • Focus on critical paths

E2E Tests

  • Test complete user flows
  • Use real browser
  • Slower execution
  • Test happy paths only

Best Practices

  1. Descriptive Names: it('should return 401 when token is expired')
  2. One Assert Per Concept: Test one thing at a time
  3. Independent Tests: No shared state between tests
  4. Use Factories: Create test data with factories
  5. Mock External Services: APIs, databases, file system

Credits

Author: Michel Abboud AI Assistance: Created with the help of Claude Code (Anthropic) License: MIT

💡 Want more? Explore claude-code-helper for 30+ agents, 13+ skills, 9 MCP servers, and comprehensive guides.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon