test-audit

Audit test suites for T1-T4 violations using AST analysis and mock detection.

8|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/QBall-Inc/the-bulwark --skill test-audit-qball-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-audit
Source: https://github.com/QBall-Inc/the-bulwark/tree/main/skills/test-audit
Command: npx skills add https://github.com/QBall-Inc/the-bulwark --skill test-audit-qball-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ts-morph, @types/jest, jest, ts-jest, tsx, typescript, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automatically audits your test suites for quality violations, ensuring tests are effective, reliable, and maintainable, thereby reducing technical debt and improving code quality.

Core Features & Use Cases

  • Automated Test Auditing: Analyzes test files for T1-T4 violations using AST analysis and mock detection.
  • Quality Gate Enforcement: Triggers automatic rewrites when test quality falls below defined thresholds.
  • Use Case: Integrate this Skill into your CI pipeline to automatically flag and potentially fix tests that are over-mocked, lack assertions, or have other quality issues before they are merged.

Quick Start

Use the test-audit skill to audit all tests in the 'src/tests' directory.

Frequently Asked Questions about test-audit

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

FAQPage Schema
How do I detect over-mocking and test quality violations in a Jest suite?

Automated test auditing uses AST analysis and mock detection to identify T1-T4 violations in your test suites. It finds over-mocking issues and triggers automatic rewrites when quality gates fail.

What are T1-T4 test violations and how are they identified?

T1-T4 test violations are quality issues like over-mocking and ineffective assertions. They are identified using AST analysis and mock detection to inspect test suites and enforce quality standards.

Can I use AST analysis to audit TypeScript test effectiveness?

Yes, AST analysis audits TypeScript test effectiveness by parsing files with ts-morph. It detects mock violations and triggers automatic rewrites when quality gates fail.

How do I integrate test quality gates into a CI pipeline?

Integrate test quality gates into CI by running an audit on test files before merge. It evaluates test effectiveness, flags over-mocking and T1-T4 violations, and triggers automatic rewrites to maintain code quality.

Does automated test auditing work with Jest and ts-jest configurations?

Yes, automated test auditing works with Jest and ts-jest configurations. It uses AST analysis and mock detection to review test suites, enforce quality standards, and trigger rewrites for over-mocking violations.