.github/skills/tests-unit-main-infrastructure/SKILL.md
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.
npx skillsauth add esplotter/esplotter tests-unit-main-infrastructureInstall 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-infrastructure
This skill defines how to test infrastructure implementations in the main process through their public contracts. It standardizes where tests and doubles live, what persistence/migration/notification behavior must be covered, and how to report outcomes so infrastructure reviews stay fast and objective.
Canonical policy source: docs/testing/tests.md.
Local layout/context source: docs/testing/tests.md.
src/app/main/**/infrastructure/**.tests-unit-main.tests-unit-preload.tests-unit-renderer.tests-components.tests-e2e.should ... format.src/test/main/<module>/infrastructure/src/test/main/<module>/infrastructure/<type>/<AdapterOrRepository>.spec.ts<type> folders: repositories, services, adapterssrc/test/main/<module>/infrastructure/<type>/<CollaboratorName>Mock.tssrc/test/main/<module>/domain/**/<Class>Mother.ts or src/test/shared/**/<Class>Mother.ts).<CollaboratorName>Mock.ts.set* / given*fail* / willFailWith*expect* with descriptive failuresshould ... convention.npm run test:unit:main-infrastructure passes.<module> and which repository/service/adapter changed?npm run test:unit:main-infrastructureReturn 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-infrastructure 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.