test-standards

Detect test quality anti-patterns in JavaScript, TypeScript, and Python test suites.

6|1|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/auldsyababua/instructor-workflow --skill test-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-standards
Source: https://github.com/auldsyababua/instructor-workflow/tree/main/skills/test-standards
Command: npx skills add https://github.com/auldsyababua/instructor-workflow --skill test-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill validates test quality by automatically scanning JavaScript, TypeScript, and Python test files for anti-patterns such as mesa-optimization, missing or vacuous assertions, tautological checks, and error-swallowing patterns. It helps teams ensure tests meaningfully validate behavior rather than passing trivially.

Core Features & Use Cases

  • Detects mesa-optimization, no assertions, tautological assertions, vacuous property checks, and mock-only validation.
  • Flags happy-path biases and missing async protections to improve test coverage and reliability.
  • Produces structured findings that guide targeted test improvements.

Quick Start

Run the scanner on your tests with deterministic output:

  • python scripts/test_quality_scanner.py ./tests --format json
  • python scripts/test_quality_scanner.py ./tests --output test-quality-report.json

Frequently Asked Questions about test-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect test quality issues in my JavaScript and TypeScript test suites?

Test quality scanning identifies anti-patterns like missing assertions, tautological checks, and error-swallowing in your JavaScript and TypeScript tests. Run the scanner on your test directory to produce structured findings that reveal which tests validate behavior meaningfully versus passing trivially, enabling targeted fixes before code ships.

What are mesa-optimization and vacuous assertions in unit tests?

Mesa-optimization occurs when tests pass without validating core behavior; vacuous assertions check conditions that are always true. These anti-patterns make tests unreliable at catching regressions. The scanner detects both patterns across JavaScript, TypeScript, and Python test files so you can strengthen coverage and ensure assertions genuinely validate behavior.

Can I scan Python tests for quality issues along with JavaScript and TypeScript?

Yes, the scanner validates test quality across JavaScript, TypeScript, and Python test suites simultaneously. It flags the same anti-patterns—no assertions, tautological checks, mock-only validation, and error-swallowing—in all three languages, producing unified JSON output suitable for CI integration regardless of your test stack.

How do I integrate test quality scanning into my CI pipeline?

The scanner outputs deterministic, structured JSON reports designed for CI integration. Run `python scripts/test_quality_scanner.py ./tests --format json` or specify an output file with `--output test-quality-report.json` to generate findings that automation workflows can parse, route to developers, and use for gating test changes during validation.

What happens if my tests swallow exceptions or lack async protections?

Error-swallowing patterns and missing async protections allow bugs to hide in production. The scanner flags these issues to help you identify tests that silently ignore failures, enabling you to add proper exception handling and async validation so tests reliably catch real defects before deployment.

Does the scanner work when test files are modified by automation agents?

Yes, the scanner is designed to validate test quality after test changes occur, including modifications by automation agents. It applies pattern-based detection during QA validation, test creation, and maintenance workflows to ensure meaningful coverage and robust behavior remain intact across all test changes.