tests-unit-main-infrastructure

Design, implement, and validate unit tests for main-process infrastructure using real adapter behavior.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ESPlotter/ESPlotter --skill tests-unit-main-infrastructure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tests-unit-main-infrastructure
Source: https://github.com/ESPlotter/ESPlotter/tree/main/.github/skills/tests-unit-main-infrastructure
Command: npx skills add https://github.com/ESPlotter/ESPlotter --skill tests-unit-main-infrastructure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides how to design, implement, and validate high-value unit tests for main-process infrastructure implementations (repositories, services, and adapters) using real adapter behavior with isolated external boundaries.

Core Features & Use Cases

  • Defines a standard test layout and expectations for testing infrastructure components against their public contracts.
  • Encourages deterministic test doubles, object mothers, and migration-aware scenarios to keep infra reviews fast and objective.
  • Supports ensuring observers/notifications, persistence semantics, and fallback paths are exercised.

Quick Start

Run the unit infrastructure test suite to validate main-process components against public contracts.

Frequently Asked Questions about tests-unit-main-infrastructure

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

FAQPage Schema
How do I write unit tests for main-process infrastructure components like repositories and adapters?

Testing infrastructure against public contracts requires real adapter implementations without internal mocking, ensuring deterministic tests with proper setup/teardown. This approach mandates coverage for happy-path, failure/fallback paths, and migration scenarios.

How do I test infrastructure migrations and error handling in a deterministic way?

Testing infrastructure migrations deterministically requires deterministic test doubles and object mothers alongside migration-aware scenarios. This exercises observers, persistence semantics, and fallback paths while keeping infrastructure reviews fast and objective.

Does testing main-process infrastructure require mocking internal adapters?

Testing main-process infrastructure prohibits internal mocking of adapters. The approach mandates using real infrastructure implementations with isolated external boundaries to validate actual adapter behavior against public contracts.

What is the best way to ensure infrastructure unit tests cover fallback paths and observers?

The best way to ensure infrastructure unit tests cover fallback paths and observers is to mandate coverage for both happy-path and failure scenarios. This includes exercising observers, notifications, and persistence semantics against public contracts.

When do I need migration-aware scenarios for testing infrastructure implementations?

Migration-aware scenarios are needed when updating infrastructure implementations under src/test/main/**/infrastructure/**. They ensure deterministic tests validate persistence semantics, defaults, observers, and fallback paths during infrastructure updates.