Testing in Silo
SkillDev toolsUse when writing or updating unit tests in the Silo repo. Covers the co-located Vitest setup, the pure-logic (no @testing-library/react) style and how to extract testable helpers, driving host state directly via the valtio store, and the contract-and-edges coverage expectations.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Testing in Silo skill
What this skill tells your AI
The instructions your AI receives, as published by silo-code/silo in .agents/skills/silo-testing/SKILL.md and read by ahel’s review.
Every change that adds or changes behavior ships with unit tests in the same
change. Tests are part of the work, not a follow-up. Don't mark a task done
until pnpm test is green with coverage for what you added.
How testing works here:
- Vitest, co-located. Put
*.test.ts/*.test.tsxnext to the source it covers; the packagevitest.config.tspicks upsrc/**/*.{test,spec}.{ts,tsx}. Run everything withpnpm test, or one package withpnpm --filter <pkg> exec vitest run <path>. - Pure-logic style. The suite tests logic, not rendered React
(
@testing-library/reactis intentionally not a dependency). When the logic you're adding lives inside a component, extract it into a pure, exported helper and test that — e.g.view-switcher-model.ts(switcher show/segmented/ dropdown rules),markdown-preview/menu.ts(context-menu enablement), andmarkdown-preview/match.ts(file matching) were factored out of their components precisely so the rules are unit-testable. Components stay thin glue. - Host state can be driven directly: set up
store(the valtio proxy) and the relevant registries inbeforeEach, exercise the service, assert on the store — seeeditor-service.test.tsandeditor-registry.test.ts. - Cover the contract and the edges, not just the happy path: fallbacks,
no-ops/guards, disabled states, and "hidden/absent" cases (the editor
view-switching tests pin the priority tie-break, stale-
viewTypefallback, read-only Cut/Paste, and the single-view/diff/untitled hidden cases).
Signals
- GitHub stars
- 56
- Forks
- 5
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
silo-testing- Source
- github.com/silo-code/silo