test-discipline

Update tests in the same commit after API changes to prevent CI failures.

Updated Nov 27, 2024
One-click install
npx skills add https://github.com/Izak90/Izak90.github.io --skill test-discipline-izak90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-discipline
Source: https://github.com/Izak90/Izak90.github.io/tree/main/isaac_treinos_ar_livre/.copilot/skills/test-discipline
Command: npx skills add https://github.com/Izak90/Izak90.github.io --skill test-discipline-izak90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When APIs or public interfaces change, tests must be updated in the same commit. Stale tests block CI for other contributors.

Core Features & Use Cases

  • Update tests in the same commit after API changes.
  • Keep test assertions in sync with disk reality to avoid CI failures.
  • Ensure when files are added or removed, test expectations are updated in the same commit.

Quick Start

Update affected tests in the same commit after API changes and run the test suite to verify consistency.

Frequently Asked Questions about test-discipline

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

FAQPage Schema
How do I keep automated tests in sync when APIs change?

To keep automated tests in sync when APIs change, update the affected test assertions in the same commit as the API modifications. This ensures test expectations match actual disk content and prevents CI failures caused by stale tests.

Why do stale tests block CI pipelines for other contributors?

Stale tests block CI pipelines because test assertion arrays diverge from actual disk content after API changes. When files are added or removed without updating expectations, automated tests fail, blocking merges for other contributors.

How to update test expectations across modules after file changes?

Update test expectations across modules by modifying test assertion arrays in the same commit after API changes. Run the test suite to verify consistency and ensure assertions reflect actual file counts and public interfaces on disk.

When do I need to update test assertions to match disk reality?

You need to update test assertions to match disk reality whenever APIs or public interfaces change. Updating tests in the same commit as API changes ensures assertion arrays reflect actual disk content and fail when they diverge.

Does this test synchronization approach work with existing CI pipelines?

Yes, this test synchronization approach works with existing CI pipelines. It applies to projects with automated tests that reference file counts or public interfaces across modules, ensuring assertion arrays reflect actual disk content to avoid blocking CI.

What is test-API drift and how does it affect automated testing?

Test-API drift occurs when APIs or public interfaces change but test assertions are not updated in the same commit. It causes automated tests to fail because assertion arrays no longer reflect actual disk content, blocking CI pipelines for contributors.