Skip to main content

testing-strategy

Guidelines for writing effective tests in this project

소스 정보

저장소
block/agent-skills
최근 소스 활동
2026년 1월 27일 20:31
감지된 SKILL.md 언어
영어
스타
26
포크
50

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
testing-strategy
description
Guidelines for writing effective tests in this project
author
goose
version
1.0
tags
["testing","development","quality"]
# Testing Guidelines ## Unit Tests - Test one thing per test - Use descriptive test names: `test_user_creation_fails_with_invalid_email` - Mock external dependencies - Keep tests fast and isolated ## Integration Tests - Test API endpoints with realistic data - Verify database state changes - Clean up test data after each test - Use test fixtures for common scenarios ## Running Tests ```bash # Run all tests npm test # Run unit tests only npm test:unit # Run integration tests (requires database) npm test:integration # Run tests with coverage npm test:coverage ``` ## Test Structure ``` tests/ ├── unit/ # Fast, isolated unit tests ├── integration/ # Tests requiring external services ├── fixtures/ # Shared test data └── helpers/ # Test utilities ``` ## Best Practices 1. **Arrange-Act-Assert**: Structure tests clearly 2. **One assertion per test**: When possible, test one behavior 3. **Descriptive names**: Test names should describe the scenario 4. **No test interdependence**: Tests should run in any order 5. **Clean state**: Each test starts with a known state ## Coverage Goals - Aim for 80%+ line coverage - Focus on critical paths first - Don't sacrifice test quality for coverage numbers
GitHub에서 보기