Configure tests

From laurigates/claude-plugins · View interactive version

Configure tests is an AI agent skill from the GitHub repository laurigates/claude-plugins. Test frameworks: Vitest, Jest, pytest, cargo-nextest. Use when setting up test infrastructure, migrating to a modern framework, or validating coverage config.

How to use this skill

Skill file

/configure:tests

Check and configure testing frameworks against best practices (Vitest, Jest, pytest, cargo-nextest).

When to Use This Skill

| Use this skill when... | Use another approach when... |

|------------------------|------------------------------|

| Setting up testing infrastructure | Just running tests (use /test:run skill) |

| Checking test framework configuration | Tests already properly configured |

| Migrating to modern test frameworks (Vitest, pytest, nextest) | Writing individual tests (write tests directly) |

| Validating coverage configuration | Debugging failing tests (check test output) |

| Ensuring test best practices | Simple project with no testing needed |

Context

Modern testing stack preferences:

Parameters

Parse these from $ARGUMENTS:

| Flag | Description |

|------|-------------|

| --check-only | Report status without offering fixes |

| --fix | Apply all fixes automatically without prompting |

| --framework <framework> | Override framework detection (vitest, jest, pytest, nextest) |

Version Checking

CRITICAL: Before flagging outdated versions, verify latest releases:

  1. Vitest: Check vitest.dev or GitHub releases
  2. Jest: Check jestjs.io or npm
  3. pytest: Check pytest.org or PyPI
  4. cargo-nextest: Check nexte.st or GitHub releases

Use WebSearch or WebFetch to verify current versions before reporting outdated frameworks.

Execution

Execute this testing framework compliance check:

Step 1: Detect framework

Identify the project language and existing test framework:

| Indicator | Language | Detected Framework |

|-----------|----------|-------------------|

| vitest.config.* | JavaScript/TypeScript | Vitest |

| jest.config.* | JavaScript/TypeScript | Jest |

| pyproject.toml [tool.pytest] | Python | pytest |

| pytest.ini | Python | pytest |

| Cargo.toml | Rust | cargo test |

| .nextest.toml | Rust | cargo-nextest |

If --framework flag is provided, use that value instead.

Step 2: Analyze current state

Read the detected framework's configuration and check completeness. For each framework, verify:

Vitest:

Jest:

pytest:

cargo-nextest:

Step 3: Report results

Print a compliance report with:

If --check-only, stop here.

Step 4: Apply fixes (if --fix or user confirms)

Install dependencies and create configuration using templates from REFERENCE.md:

  1. Missing config: Create framework config file from template
  2. Missing dependencies: Install required packages
  3. Missing coverage: Add coverage configuration with 80% threshold
  4. Missing scripts: Add test scripts to package.json
  5. Missing test directories: Create standard test directory structure

Step 5: Set up test organization

Create standard test directory structure for the detected language. See directory structure patterns in REFERENCE.md.

Step 6: Configure CI/CD integration

Check for test commands in GitHub Actions workflows. If missing, add CI test commands using the CI templates from REFERENCE.md.

Step 7: Handle migration (if upgrading)

If migrating between frameworks (e.g., Jest to Vitest, unittest to pytest), follow the migration guide in REFERENCE.md.

Step 8: Update standards tracking

Update .project-standards.yaml:

standards_version: "2025.1"
last_configured: "<timestamp>"
components:
  tests: "2025.1"
  tests_framework: "<vitest|jest|pytest|nextest>"
  tests_coverage_threshold: 80
  tests_ci_integrated: true

For detailed configuration templates, migration guides, CI/CD integration examples, and directory structure patterns, see REFERENCE.md.

Agentic Optimizations

| Context | Command |

|---------|---------|

| Detect test framework | find . -maxdepth 1 \( -name 'vitest.config.*' -o -name 'jest.config.*' -o -name 'pytest.ini' \) 2>/dev/null |

| Check coverage config | grep -l 'coverage' package.json pyproject.toml 2>/dev/null |

| List test files | find . \( -path '*/tests/*' -o -path '*/test/*' -o -name '*.test.*' -o -name '*.spec.*' \) 2>/dev/null \| head -n 10 |

| Quick compliance check | /configure:tests --check-only |

| Auto-fix configuration | /configure:tests --fix |

Error Handling

See Also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.