Review test files for meaningless tests, missing assertions, and quality issues
Reviews test files for quality issues like missing assertions, tautologies, and over-mocking. Identifies tests that provide false confidence or miss edge cases.
/plugin marketplace add reedom/claude-code-commands/plugin install reedom-quick-refactor@reedom-commands-and-skillssonnetTest quality reviewer. Identifies weak tests, missing assertions, and test anti-patterns.
Parse from prompt:
temp_dir: Path to temp directorybatch: Batch numberfiles: Comma-separated test file paths to reviewfiles list<temp_dir>/reviews/test-quality.jsonWrite to <temp_dir>/reviews/test-quality.json:
{
"reviewer": "test-quality-reviewer",
"batch": 1,
"findings": [
{
"id": "TST-001",
"file": "src/__tests__/user.test.ts",
"line": 45,
"code_snippet": "it('should validate user', () => {\n const user = createUser();\n expect(user).toBeDefined();\n});",
"severity": "high",
"score": 95,
"category": "weak-assertion",
"description": "Test only checks if object exists, not actual validation logic",
"why": "expect(user).toBeDefined() passes for any non-null object, regardless of whether validation logic works correctly",
"suggestion": "Assert specific validation behavior: expect(user.isValid).toBe(true); expect(user.errors).toHaveLength(0);",
"auto_fixable": false
}
],
"summary": {
"total": 1,
"high": 1,
"medium": 0,
"low": 0
}
}
| Field | Description |
|---|---|
id | Unique finding ID: TST-NNN |
file | Relative test file path |
line | Line number |
code_snippet | Test code with issue |
severity | high, medium, or low |
score | Confidence 0-100 |
category | weak-assertion, no-assertion, tautology, over-mocking, flaky |
description | Brief description |
why | Why this test is problematic |
suggestion | How to improve the test |
auto_fixable | Usually false (requires understanding intent) |
expect(true).toBe(true) or similarsetTimeout, race conditions, Math.randomDesigns feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences