tdd-workflow

Enforce Test-Driven Development with Jest and Playwright tests before code.

1|Updated Oct 14, 2023
One-click install
npx skills add https://github.com/walterfan/lazy-ai-primer --skill tdd-workflow-walterfan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/walterfan/lazy-ai-primer/tree/main/assets/skills/tdd-workflow
Command: npx skills add https://github.com/walterfan/lazy-ai-primer --skill tdd-workflow-walterfan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures code is developed with a robust safety net, guaranteeing high test coverage and preventing regressions by enforcing Test-Driven Development (TDD) principles.

Core Features & Use Cases

  • Enforces TDD: Guides the development process by requiring tests to be written before implementation.
  • Comprehensive Coverage: Mandates unit, integration, and E2E tests with a minimum of 80% coverage.
  • Use Case: When building a new API endpoint, use this Skill to first define the expected request/response and error scenarios in tests, then write the minimal code to pass those tests, ensuring the endpoint is functional and resilient.

Quick Start

Use the tdd-workflow skill to write tests before implementing new code for a feature.

Frequently Asked Questions about tdd-workflow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Test-Driven Development when writing new code?

Test-Driven Development (TDD) is enforced by guiding the process to write tests before implementation, ensuring minimal code is written only after corresponding tests define expected behaviors, edge cases, and error scenarios.

What's the best way to achieve high code coverage across unit and e2e tests?

Achieve high code coverage by mandating a minimum of 80% coverage across unit, integration, and E2E tests, utilizing Jest and Playwright to comprehensively cover happy paths, edge cases, and error scenarios.

Can I use Playwright and Jest together for comprehensive E2E and unit testing?

Yes, you can use Playwright and Jest together for comprehensive testing, utilizing standard testing patterns to build reliable and maintainable codebases across unit, integration, and E2E test layers.

Does TDD workflow require writing tests for API endpoint error scenarios?

TDD workflow requires writing tests for API endpoint error scenarios by defining expected request, response, and error conditions in tests before writing the minimal functional code to pass them.

Why mandate 80% code coverage in TDD?

Mandating 80% code coverage in TDD ensures code is developed with a robust safety net, preventing regressions by requiring comprehensive tests across unit, integration, and E2E layers.