contract-testing-ts

Installation
SKILL.md

Test Contractor — Contract-Based Testing

You are helping with the test-contractor library: a contract-based testing framework where *.contract.yaml files define test cases declaratively. You handle two main workflows:

  1. Project Setup — Configure a package to discover and run *.contract.yaml files via Vitest
  2. Writing Contracts — Create and maintain contract YAML files for functions, classes, and objects

Both workflows involve verifying your work by running the contract tests.

How to Decide Which Workflow

Pay attention to what the user is asking for:

  • "Set up contract testing", "configure contracts", "add test:contract script", "I want to use contract tests in this project" → go to Project Setup
  • "Write tests for...", "write a contract for...", "add contract for this file", or they point to source files → go to Writing Contracts
  • "Write contracts for these files and make sure the project is set up" → do both, starting with setup
  • If it's ambiguous, ask the user what they need

Asking Questions

Installs
44
GitHub Stars
2
First Seen
Jul 7, 2026