ワンクリックで
test-quality
[pr-review-focus-area: Tests] Assess test quality by detecting anti-patterns and verifying tests exercise real behavior.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
[pr-review-focus-area: Tests] Assess test quality by detecting anti-patterns and verifying tests exercise real behavior.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Research a work item, draft an implementation plan, and begin work after approval.
Guided one-shot install — discover installed plugins (or help install new ones), pick install scope, calibrate risk tolerance into a concrete allowlist + hooks, scaffold or merge CLAUDE.md, and sanity-check the result.
Finalize work — commit via /commit, push, and create PRs on feature branches.
Reviewer-side PR workflow — checks out the branch in a worktree, runs focus-area reviews plus a senior-engineering pass, optionally cross-checks against an autonomous reviewer, and posts inline findings only on explicit approval. Read-only — never edits, commits, or pushes.
Fetch PR review comments, classify by severity and confidence, and fix the selected subset.
Triage CVE and SBOM scanner output (Trivy, Grype, Snyk, Docker Scout, Dependabot) into a ranked, deduplicated action list.
| name | test-quality |
| description | [pr-review-focus-area: Tests] Assess test quality by detecting anti-patterns and verifying tests exercise real behavior. |
| user-invocable | true |
| disable-model-invocation | true |
| allowed-tools | ["Read","Grep","Glob"] |
Assess the quality of existing tests by detecting anti-patterns and verifying tests exercise real behavior.
/test-quality — review quality of test files for changed source files, or all tests if specified.
Examples shown in React/Jest syntax. Adapt patterns to your framework's equivalent APIs.
Tests that just verify a component renders what you pass in.
// BAD: just echoing the prop back
render(<Title text="Hello" />)
expect(screen.getByText("Hello")).toBeInTheDocument()
Flag when the only assertion is checking that a passed prop appears in output.
Tests where you mock the input and assert the mock was called, testing nothing real.
// BAD: mock in, mock out
const mockFn = jest.fn()
doThing(mockFn)
expect(mockFn).toHaveBeenCalled()
Flag when mocks are both the input and the assertion target.
Tests that just check a component renders without crashing, with no meaningful assertions.
// BAD: render-only
it('renders', () => {
render(<Dashboard />)
})
Flag tests with zero assertions or only expect(container).toBeDefined().
Tests that use weak assertions that would pass for almost any value.
toBeDefined() on complex objectstoBeTruthy() on non-boolean valuestoHaveLength() without checking contenttoContain() with trivial substringsTests that mock so many dependencies that they test nothing real.
Tests should exercise:
## Test Quality Report
### Anti-Patterns Found
- [WARN] src/components/__tests__/Button.test.tsx — prop-echo test (3 tests just check rendered text matches props)
- [WARN] src/lib/__tests__/api.test.ts — mock-in/mock-out (2 tests only verify mock calls)
- [WARN] src/pages/__tests__/Home.test.tsx — render-only (1 test with no assertions)
### Quality Scores
| Test File | Tests | Anti-Patterns | Functional | Score |
| -------------------------- | ----- | ------------- | ---------- | ------ |
| Button.test.tsx | 5 | 3 | 2 | 40% |
| api.test.ts | 8 | 2 | 6 | 75% |
| Home.test.tsx | 3 | 1 | 2 | 67% |
### Overall: 61% functional (10/16 tests exercise real behavior)
### Recommendations
1. Button.test.tsx: Add interaction tests (click handlers, disabled state, loading state)
2. api.test.ts: Replace mock-only tests with integration tests using MSW or similar
3. Home.test.tsx: Add assertions for page content, navigation, and error state