- Home
- Skills
- Testing & Debugging
- Framework-Aware TDD — Jest, Vitest, Pytest, Go
Framework-Aware TDD — Jest, Vitest, Pytest, Go
Framework-depth TDD: red-green-refactor for Jest, Vitest, Pytest, and Go — confirm before production edits.
$24
Works with the AI Agents you already use
Framework-Aware TDD — Jest, Vitest, Pytest, Go
Example session with this skill installed
I need to add tests for the calculate_discount function in utils/pricing.py. We use pytest and I want to use TDD for a new 'bulk_buy' rule.
- Read your context and instructions
- Compiled the framework-aware tdd
I've analyzed the project and detected a Pytest environment. I will now prepare a TDD slice for the bulk discount logic.
TDD slice
Stack: Python / Pytest
Behavior: Apply a 10% discount when the quantity is 10 or more items.
Red
- Test:
test_calculate_discount_bulk_threshold - Assertion:
assert calculate_discount(price=100, qty=10) == 90 - Status: Failing (behavior not yet implemented)
Green
- Changes:
tests/test_pricing.py[test-only] - Note: Production code edit to
utils/pricing.pyneeds confirm to handle the conditional logic.
Verify
- Command:
pytest tests/test_pricing.py -k "bulk_threshold" - Result: 1 failed (as expected)
Still open
- Edge case: Negative quantity handling
- Edge case: Zero price inputs
Next steps
- Confirm if I should proceed with editing
utils/pricing.pyto implement the logic. - Should I use
@pytest.mark.parametrizeto include multiple quantity thresholds in one go?
Connects securely to your tools. The creator never sees your data.
About this skill
Writing tests that actually catch bugs requires more than just generating assertions. Most AI generators produce shallow tests that ignore framework idioms or break production code. This skill enforces a disciplined Red-Green-Refactor workflow tailored to your specific environment.
What it does
- Framework detection identifies your specific test runner like Jest, Vitest, Pytest, or Go to use native idioms.
- Red-Green-Refactor loop ensures every test fails for the right reason before production code is modified.
- Table-driven generation uses
it.eachor@pytest.mark.parametrizefor clean, data-heavy test suites. - Constraint enforcement prevents the agent from deleting tests, skipping failures, or editing production files without explicit approval.
How it works
- Detect the stack and existing test layout to determine the correct runner commands and folder conventions.
- Plan the specific behavior slice, sketching the failing assertion and required fixtures for approval.
- Execute the test writes and run focused commands, stopping for confirmation if production code needs changes.
- Refactor the suite by deduplicating fixtures and summarizing any remaining gaps in the slice.
Frameworks & tools
Supports Jest, Vitest, Pytest, and Go testing package. Compatible with react-testing-library and native Go httptest utilities.
Why this beats prompting it yourself
Generic prompts often result in bloated mocks or tests that pass even when code is broken. This skill forces a strict sequence that proves the test's validity and respects your project's production code boundaries.
Use cases
- Implement TDD for a new backend logic function in Go or Python.
- Repair a suite of failing Vitest components after a dependency update.
- Add unit test coverage for a legacy utility file without changing the source.
- Convert hard-coded test cases into framework-native table-driven tests.
Known limitations
Does not support E2E browser automation or UI suites like Playwright. Requires an existing test runner or explicit permission to install a toolchain.
Does not support E2E browser suites like Playwright or Cypress. Requires an existing test runner or user permission to add toolchains. Scope limited to unit and contract tests.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 24 days ago
Requires