test-discipline

Enforce test suite updates alongside API interface changes to prevent CI regressions.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/jonnymuir/Umbraco.Prism --skill test-discipline-jonnymuir
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-discipline
Source: https://github.com/jonnymuir/Umbraco.Prism/tree/main/.copilot/skills/test-discipline
Command: npx skills add https://github.com/jonnymuir/Umbraco.Prism --skill test-discipline-jonnymuir

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents CI failures and technical debt caused by stale tests, mismatched assertions, and incorrect mocking patterns during API development.

Core Features & Use Cases

  • Assertion Synchronization: Ensures test expectations (like file counts or scenario arrays) remain aligned with the actual filesystem state.
  • API Change Management: Enforces the pattern of updating tests in the same commit as public interface changes.
  • Mocking Best Practices: Provides guidance on using generic matchers to avoid platform-specific failures in CI environments.

Quick Start

Use the test-discipline skill to audit the current test suite for stale assertions and verify that all recent API changes have corresponding test updates.

Frequently Asked Questions about test-discipline

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

FAQPage Schema
How do I prevent CI regressions when modifying an API interface?

Enforce test integrity by requiring atomic commits that update tests alongside public API changes, ensuring assertions match the actual filesystem state and preventing CI regressions.

Why do my unit tests pass locally but fail in CI environments?

Unit tests fail in CI due to platform-specific mocking. Apply platform-agnostic mocking strategies using generic matchers to ensure consistent test execution across local and CI environments.

How do I audit my test suite for stale assertions and mismatched expectations?

Audit test suites by verifying that expectations like file counts or scenario arrays match the current filesystem state and recent API changes, detecting stale assertions and mismatched mocks.

What are the best practices for mocking APIs during refactoring?

Best practices for mocking during refactoring involve using generic matchers to avoid platform-specific failures and maintaining strict synchronization between interface changes and test suite updates.

Do I need to update tests in the same commit as API changes?

Yes, updating tests in the same commit as public API changes is required. This atomic commit pattern prevents technical debt and CI failures caused by stale tests and mismatched assertions.