mav-bp-unit-testing

Enforce unit testing practices including Arrange-Act-Assert structure and mocking discipline.

10|2|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/thermiteau/maverick --skill mav-bp-unit-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mav-bp-unit-testing
Source: https://github.com/thermiteau/maverick/tree/main/skills/mav-bp-unit-testing
Command: npx skills add https://github.com/thermiteau/maverick --skill mav-bp-unit-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures unit tests are meaningful, fast, and maintainable by codifying test design, isolation, mocking discipline, and project-wide testing guidance.

Core Features & Use Cases

  • Test design & structure — Arrange-Act-Assert, one reason to fail, and clear test boundaries.
  • Mocking discipline — Guidance on using stubs, mocks, fakes, and spies to isolate units.
  • Test hygiene & reviews — Practices for naming, organization, and maintaining fast, deterministic tests.

Quick Start

Apply these standards when writing or reviewing unit tests to ensure they are fast, isolated, and well-documented.

Frequently Asked Questions about mav-bp-unit-testing

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

FAQPage Schema
How do I structure unit tests for better isolation and maintainability?

Structure unit tests using the Arrange-Act-Assert pattern and one-assert-per-test principle. This ensures each test has a single reason to fail, clear boundaries, and remains maintainable as the codebase grows.

What's the best way to isolate dependencies when writing unit tests?

Isolate dependencies by applying mocking discipline with stubs, mocks, fakes, and spies. This approach removes external side effects, ensuring your unit tests remain fast, deterministic, and truly validate isolated code behavior.

Why do my unit tests fail intermittently in CI pipelines?

Intermittent unit test failures often stem from poor test hygiene and lack of isolation. Enforcing deterministic test practices and isolating dependencies with mocks prevents flaky tests caused by shared state or external system timing.

Can I use these unit testing standards for reviewing test code?

Yes, these unit testing standards apply to both writing and reviewing unit tests. They provide clear guidance on naming, organization, and test boundaries, ensuring code reviews maintain fast, deterministic, and well-documented test suites.

When do I need to mock dependencies versus using real instances in unit tests?

Mock dependencies when external systems or shared state would make unit tests slow or non-deterministic. Use stubs, mocks, fakes, and spies to isolate the unit under test, ensuring fast execution and reliable behavior documentation.