testing-gate
A Claude Code Agent Skill that writes valuable unit and integration tests for TypeScript projects — NestJS APIs and React components — on Vitest or Jest, with React Testing Library and MSW for UI/API interception, then hands the result to the qoq skill's gate command before declaring the work done. This page reflects skill version 0.1.0 (metadata.version in SKILL.md). It ships inside the same repository as the qoq skill, so wherever qoq is installed, testing-gate can assume it's present too — no discovery step needed for that dependency.
Aims for tests that cover real functionality and reasonable edge cases, not 100% coverage for its own sake.
Installation
Installed the same way as the qoq skill — via the skills CLI, agent-skills-cli, or the qoq-agent-skills plugin marketplace, all pointed at the testing-gate skill instead of qoq:
npx skills add ladamczyk-it/qoq --skill testing-gate
/plugin marketplace add ladamczyk-it/qoq
/plugin install qoq@qoq-agent-skills
The qoq plugin bundles both skills, so installing it via the marketplace makes testing-gate available alongside qoq with a single install.
How you invoke it
Ask directly — "test this controller/service/component", "write tests for X", "add unit/integration tests" — even without naming Vitest, Jest, React Testing Library, or QoQ. The skill infers the test type from the request rather than defaulting to one:
- A request scoped to one piece with no wider context ("test this controller") defaults to unit tests for that isolated piece.
- A request describing a flow spanning multiple pieces ("test that submitting the form creates the user and shows a confirmation") is integration scope.
Five phases
- Discovery — works out the test runner (Vitest or Jest), whether its config enables globals (changes whether
describe/it/expectare referenced directly or imported), whether the project is React, and the exact scoped and full-suite run commands — all read from the repo itself, never guessed. Also checks for a project-roottesting-gate.md, which overrides the skill's built-in conventions wherever the two conflict. - Scope clarification — states the inferred unit/integration approach back to the user before writing anything, so a wrong inference is caught before it costs a rewrite.
- Write the tests — applies the conventions in
references/conventions.mdinvisibly: cover happy paths and reasonable edge cases (not exhaustive coverage for its own sake), mock only what's external/non-deterministic/necessary for isolation, preferasync/await, and — for React —userEventand role/accessible-attribute queries overfireEvent/test IDs, plus MSW for network-boundary interception. Also writes lint-clean by construction against this repo's own Jest/Vitest/Testing-Library ESLint rules (no.only/.skip, unique test titles, at least one assertion per test, no conditionally-registered tests, and more). - Validate — runs the specific test(s) just written, then the full suite, using exactly the commands Phase 1 discovered.
- QoQ gate (mandatory) — gates the exact test files just created or modified through
Skill(skill: "qoq", args: "gate <files>"), following the samePASS/FAILcontract everyqoqproducer does. A green test run in Phase 4 is necessary but not sufficient — the task isn't done untilgatereturnsPASS.