IA/skills/tests-unit-main/SKILL.md
Guides how to design, implement, and validate high-value unit tests for main-process application/domain logic in a hexagonal architecture.
npx skillsauth add esplotter/esplotter tests-unit-mainInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run with: npm run test:unit:main
This skill defines how to test main-process business behavior with consistent structure and contracts. It standardizes where tests and mocks live, what minimum flows must be covered, how to model fixtures with Mothers, and how to report results so reviews stay fast and objective.
Canonical policy source: docs/testing/tests.md.
Local layout/context source: docs/testing/tests.md.
tests-components.tests-unit-renderer.tests-unit-preload.tests-unit-main-infrastructure.tests-e2e.run() input/output + collaborator effects. No private internals.should ... format.src/app/main module structure under src/test/main.src/test/main/channel-file/...) as defined in docs/testing/tests.md.src/test/main/<module>/application/<UseCase>.spec.tssrc/test/main/<module>/domain/services/<Service>.spec.tssrc/test/main/<module>/domain/services/<CollaboratorName>Mock.tssrc/test/main/<module>/infrastructure/<type>/<CollaboratorName>Mock.tssrc/test/main/<module>/domain/{primitives|entities|vos|aggregates|dtos}/<Class>Mother.tssrc/test/shared/**/<Class>Mother.ts<CollaboratorName>Mock.ts.repositories, services) instead of flat folders.src/test/main/<module>/infrastructure/<type>/.src/test/main/<module>/domain/services/.set* / given*fail* / willFailWith*expect* (must throw with helpful message)expectCalledWith(...)with(overrides) as the primary entrypoint.*.spec.ts.should ... convention.npm run test:unit:main passes.<module>?npm run test:unit:mainReturn a structured YAML report including:
status: ok | needs_clarification | errorsummary: what was tested/changed in one paragraphfiles_changed: list of changed pathstests_added_or_updated: list of test files added/updatedmocks_added_or_updated: list of mock files added/updatedcommands_run: commands executed (at minimum npm run test:unit:main when applicable)result:
passed: booleanfailed_tests: listerror_excerpt: short excerpt when failingquestions: open questions with reason when clarification is needednext_actions: recommended follow-up actionswarnings: risks, assumptions, or deviationsdevops
Applies consistent renderer UI/UX implementation patterns using a Vercel-inspired white theme, strong accessibility defaults, and repository component conventions.
development
Use this first for any task that changes behavior or tests. This is a test strategy and routing skill, it selects the right test-suite skill(s), defines when to escalate coverage (for example e2e/compiled parity), and enforces regression rules.
tools
Guides how to design, implement, and validate high-value unit tests for renderer pure logic (stores, selectors, mappers, and utility flows) with strict no-DOM boundaries and deterministic contract assertions.
testing
Guides how to design, implement, and validate high-value unit tests for preload bridge contracts, renderer-facing exposures, and IPC delegation behavior with clear boundaries and deterministic collaborator doubles.