qa-testing-enforcer
CommunityEnforce tests for every code change
Authorfilimorniga-ux
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Prevents the introduction of untested business logic and UI flows by enforcing a strict policy that every new or modified code artifact must be accompanied by automated tests, avoiding regressions in a mission-critical pharmacy ERP.
Core Features & Use Cases
- Decision rules: Distinguishes when to create unit tests (Vitest) for pure business logic and when to create E2E tests (Playwright) for critical user flows.
- Conventions & Structure: Requires mirrored test files for source files (for example src/actions -> tests/actions) and mandates the Arrange-Act-Assert pattern.
- Safety & Quality: Requires DB mocks for unit tests, use of the existing Playwright login helper for E2E, explicit negative test cases, and forbids unsafe practices like using any in tests or commenting out failing tests.
- Use Case: When adding a discount calculation function, generate src/domain/discounts.ts and tests/domain/discounts.test.ts with happy path and failure scenarios, using Vitest and TypeScript types.
Quick Start
Create a Vitest unit test for src/domain/discounts.ts and a corresponding tests/domain/discounts.test.ts that follows Arrange-Act-Assert, uses mocks for database interactions, includes both success and failure cases, and enforces TypeScript typing without any.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: qa-testing-enforcer Download link: https://github.com/filimorniga-ux/farmacias-vallenar-suit/archive/main.zip#qa-testing-enforcer Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.