tdd

Solid

Enforce test-driven development — write tests FIRST, then implement. Mandatory for new features and bug fixes.

Testing & QA 55 stars 28 forks Updated today MIT

Install

View on GitHub

Quality Score: 85/100

Stars 20%
58
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# TDD — Test-Driven Development (Enforced) **This is not a suggestion. This is the workflow.** When adding features or fixing bugs in claude-code-discord-bridge, you MUST write tests before writing implementation code. No exceptions. ## When to Activate - Adding any new feature or functionality - Fixing a bug (write a test that reproduces the bug FIRST) - Refactoring code (ensure existing tests pass, add missing ones) - Adding a new Cog, parser rule, UI component, or database operation ## The Cycle: RED → GREEN → REFACTOR ### Step 1: RED — Write Failing Tests Write tests that describe the desired behavior. Run them. **They must fail.** ```bash uv run pytest tests/test_new_feature.py -v # Expected: FAILED (because the code doesn't exist yet) ``` If tests pass before you write any implementation, your tests are wrong. ### Step 2: GREEN — Write Minimal Implementation Write the **minimum code** to make the tests pass. No more. ```bash uv run pytest tests/test_new_feature.py -v # Expected: PASSED ``` ### Step 3: REFACTOR — Clean Up Improve the implementation while keeping all tests green. Then run the full suite: ```bash uv run pytest tests/ -v --cov=claude_discord --cov-report=term-missing ``` ### Step 4: VERIFY — Lint + Format + Full Suite ```bash uv run ruff check claude_discord/ uv run ruff format claude_discord/ uv run pytest tests/ -v --cov=claude_discord ``` ## What to Test First (by module type) ### New Parser Rule ```python # tests/test_parser.py — Wri...

Details

Author
ebibibi
Repository
ebibibi/ebi-agent-chat-relay
Created
6 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category