lam-vd-workflow-kit-testing-instructions.ocm.json json Copy{
"ocm": "1",
"id": "lam-vd-workflow-kit-testing-instructions",
"kind": "skill",
"name": "testing",
"description": "Testing rules applied to every test file. Enforces test pyramid (many unit, fewer integration, minimal e2e), behavior-focused test names ('should <behavior> when <condition>'), strict AAA structure (Arrange-Act-Assert), coverage targets per layer (Domain ≥90%, Application ≥80%, Infrastructure smoke+contract, UI critical-flow e2e), boundary-only mocking (mock HTTP/DB/time/random — never domain), and explicit edge-case coverage (empty/null, boundary values, concurrency, dependency error paths, i18n/unicode/timezone). Flags 🟠 anti-patterns: order-dependent tests, real network/DB without cleanup, conditional logic inside tests, placeholder asserts, meaningless test names.",
"publisher": "lam-vd",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding",
"legal"
],
"tags": [
"skill-md",
"github-instructions"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Testing rules applied to every test file. Enforces test pyramid (many unit, fewer integration, minimal e2e), behavior-focused test names ('should <behavior> when <condition>'), strict AAA structure (Arrange-Act-Assert), coverage targets per layer (Domain ≥90%, Application ≥80%, Infrastructure smoke+contract, UI critical-flow e2e), boundary-only mocking (mock HTTP/DB/time/random — never domain), and explicit edge-case coverage (empty/null, boundary values, concurrency, dependency error paths, i18n/unicode/timezone). Flags 🟠 anti-patterns: order-dependent tests, real network/DB without cleanup, conditional logic inside tests, placeholder asserts, meaningless test names."
],
"primary": false,
"metadata": {
"source": {
"provider": "github-instructions",
"repository": "https://github.com/lam-vd/workflow-kit",
"path": ".github/instructions/testing.instructions.md",
"ref": "27bc59f326c42f9206cc9f7912d0b8be93f2396f",
"url": "https://github.com/lam-vd/workflow-kit/blob/27bc59f326c42f9206cc9f7912d0b8be93f2396f/.github/instructions/testing.instructions.md",
"key": "lam-vd/workflow-kit/.github/instructions/testing.instructions.md"
},
"applies_to": "**/*.{test,spec}.{ts,tsx,js,jsx,py,go,java,kt,rb}"
},
"instructions": "# Testing Rules\n\n## Pyramid\n- **Unit** (many): pure logic, branches, edge cases.\n- **Integration** (medium): module + DB + external mocks.\n- **E2E** (few): happy path + 1–2 critical user flows.\n\n## Naming\n- Test names describe behavior, NOT implementation.\n- Format: `should <expected behavior> when <condition>`.\n- Example: `should return 400 when email is empty`.\n\n## Structure (AAA)\n```\n// Arrange\nconst input = ...\n// Act\nconst result = sut(input)\n// Assert\nexpect(result).toBe(...)\n```\n\n## Coverage targets\n- Domain layer: ≥ 90%.\n- Application: ≥ 80%.\n- Infrastructure: smoke + contract tests.\n-",
"cost": {
"context_tokens": 335
}
}