Back to Skills

test-standards-enforcer

verified

Enforce testing best practices - AAA pattern, naming conventions, isolation, coverage thresholds. Blocks non-compliant tests. Use when writing or reviewing tests.

View on GitHub

Marketplace

orchestkit

yonatangross/skillforge-claude-plugin

Plugin

ork

development

Repository

yonatangross/skillforge-claude-plugin
33stars

plugins/ork/skills/test-standards-enforcer/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/yonatangross/skillforge-claude-plugin/blob/main/plugins/ork/skills/test-standards-enforcer/SKILL.md -a claude-code --skill test-standards-enforcer

Installation paths:

Claude
.claude/skills/test-standards-enforcer/
Powered by add-skill CLI

Instructions

Enforce 2026 testing best practices with **BLOCKING** validation.

## Validation Rules

### BLOCKING Rules (exit 1)

| Rule | Check | Example Violation |
|------|-------|-------------------|
| **Test Location** | Tests must be in `tests/` or `__tests__/` | `src/utils/helper.test.ts` |
| **AAA Pattern** | Tests must have Arrange/Act/Assert structure | No clear sections |
| **Descriptive Names** | Test names must describe behavior | `test('test1')` |
| **No Shared State** | Tests must not share mutable state | `let globalVar = []` without reset |
| **Coverage Threshold** | Coverage must be ≥ 80% | 75% coverage |

### File Location Rules

```
ALLOWED:
  tests/unit/user.test.ts
  tests/integration/api.test.ts
  __tests__/components/Button.test.tsx
  app/tests/test_users.py
  tests/conftest.py

BLOCKED:
  src/utils/helper.test.ts      # Tests in src/
  components/Button.test.tsx    # Tests outside test dir
  app/routers/test_routes.py    # Tests mixed with source
```

### Naming Conventions

**TypeScript/JavaScript:**
```typescript
// GOOD - Descriptive, behavior-focused
test('should return empty array when no items exist', () => {})
test('throws ValidationError when email is invalid', () => {})
it('renders loading spinner while fetching', () => {})

// BLOCKED - Too short, not descriptive
test('test1', () => {})
test('works', () => {})
it('test', () => {})
```

**Python:**
```python
# GOOD - snake_case, descriptive
def test_should_return_user_when_id_exists():
def test_raises_not_found_when_user_missing():

# BLOCKED - Not descriptive, wrong case
def testUser():      # camelCase
def test_1():        # Not descriptive
```

## AAA Pattern (Required)

Every test must follow Arrange-Act-Assert:

### TypeScript Example

```typescript
describe('calculateDiscount', () => {
  test('should apply 10% discount for orders over $100', () => {
    // Arrange
    const order = createOrder({ total: 150 });
    const calculator = new DiscountCalculator();

    // Act
    const discount 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6385 chars