tdd-workflow

Enforces test-driven development with unit, integration, and E2E tests at 80% coverage.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/diazMelgarejo/orama-system --skill tdd-workflow-diazmelgarejo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tdd-workflow
Source: https://github.com/diazMelgarejo/orama-system/tree/main/.cursor/.agents/skills/tdd-workflow
Command: npx skills add https://github.com/diazMelgarejo/orama-system --skill tdd-workflow-diazmelgarejo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often ship code without adequate tests, leading to regressions, brittle refactors, and production bugs. This Skill enforces a strict test-first workflow so every feature, bug fix, or refactor is backed by unit, integration, and E2E tests before implementation begins. ## Core Features & Use Cases - RED-GREEN-Refactor Workflow: Guides writing failing tests first, implementing minimal code to pass, then refactoring with tests green. - Test Runner Detection: Resolves the correct package manager and test runner (npm, pnpm, yarn, Bun, Jest, Vitest, bun:test) before running any test command. - Coverage Gates: Enforces a minimum 80% coverage threshold across branches, functions, lines, and statements. - Use Case: When adding a new API endpoint, the Skill walks you through writing user journeys, generating Jest/Vitest integration tests, mocking Supabase or Redis dependencies, and verifying coverage before marking the task done. ## Quick Start Ask the AI to use the tdd-workflow skill to implement your next feature with tests written before any production code.

Frequently Asked Questions about tdd-workflow

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

FAQPage Schema
How do I practice test-driven development in a TypeScript project?

Write failing tests first based on user journeys, then implement the minimal code to make them pass, and refactor while keeping tests green. This Skill structures that RED-GREEN-Refactor cycle with coverage verification at the end.

How to run tests with Bun instead of Jest or Vitest?

Check whether package.json scripts.test invokes jest/vitest or whether test files import from bun:test. Use bun test for Bun's native runner and bun run test only when the script delegates to Jest or Vitest, since mixing them is a common failure.

What is the difference between unit, integration, and E2E tests?

Unit tests cover individual functions and components in isolation, integration tests verify API endpoints and database or service interactions, and E2E tests use Playwright to automate complete user flows in a browser.

How do I mock Supabase or Redis in Jest tests?

Use jest.mock with a factory that returns stubbed methods resolving canned data, such as a mocked supabase.from chain or a mocked searchMarketsByVector function. This isolates unit tests from external services.

Why do my tests fail when running through the wrong package manager?

Invoking Jest through npx or bun run in an ESM-only project can break, while bun test runs the suite natively. Detect the runner first via scripts.test, lockfiles, or the packageManager field before executing tests.

What code coverage threshold should a project enforce?

This Skill enforces a minimum of 80% across branches, functions, lines, and statements, configured via Jest coverageThresholds or bunfig.toml for Bun. Coverage reports identify untested edge cases and error paths.