tests-unit-main

Design and validate unit tests for main-process use cases in hexagonal architecture.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides how to design, implement, and validate high-value unit tests for main-process application/domain logic in a hexagonal architecture.

Core Features & Use Cases

  • Standardized test structure and conventions for main-process use-case tests.
  • Mocking domain services and modeling inputs with Object Mothers.
  • Clear guidance on test coverage, boundaries, and reporting for fast reviews.

Quick Start

Create unit tests for main-process use-cases following the conventions and run npm run test:unit:main to verify results.

Frequently Asked Questions about tests-unit-main

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

FAQPage Schema
How do I structure unit tests for main-process use cases in a hexagonal architecture?

Standardize main-process unit test structure by centering tests on use-case behavior, mocking domain services, and modeling inputs with Object Mothers. This isolates application logic from IPC handlers for fast validation.

What is the best way to mock domain services when testing hexagonal architecture use cases?

Mock domain services by replacing them with controlled test doubles within your use-case unit tests. This isolates the main-process orchestration logic and ensures explicit coverage rules validate business behavior accurately.

How do I use Object Mothers to model test inputs for main-process business logic?

Use Object Mothers to construct complex domain inputs and entities for your main-process unit tests. This standardizes test data creation, ensuring use-case tests remain readable and maintainable as orchestration contracts evolve.

When do I need to run unit tests for main-process application logic?

Run main-process unit tests when adding or modifying business logic, fixing regressions, or evolving orchestration contracts between IPC handlers and use cases. Execute npm run test:unit:main to verify results.

Does this testing approach work for validating IPC handler contracts in hexagonal apps?

Yes, it validates the orchestration contracts between IPC handlers and use cases. By mocking domain services and enforcing explicit coverage rules, it ensures main-process application logic behaves correctly without UI dependencies.

What are the limitations of mocking domain services in use-case unit tests?

Mocking domain services isolates use-case orchestration but does not validate the actual domain service implementations or IPC integration. You must maintain separate integration tests to verify complete main-process behavior.