Use when writing or reviewing a single good test independent of any framework — structuring it as Arrange-Act-Assert / Four-Phase, meeting FIRST, naming it, choosing and naming the right test double (Dummy / Stub / Spy / Mock / Fake), deciding what to mock and what not to, telling state from behaviour verification, and spotting test smells. Triggers on test double, mock vs stub vs fake vs spy, what should I mock, over-mocking, AAA, FIRST, fragile/flaky/obscure test, Object Mother, Test Data Builder, fixture setup — even when the user doesn't say 'testing'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/xonovex-skill-testing:testing-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
How to structure, name, populate, and verify one test — and how to pick the right test double — independent of any framework. It governs the shape of an individual test, not the rhythm in which you write tests.
How to structure, name, populate, and verify one test — and how to pick the right test double — independent of any framework. It governs the shape of an individual test, not the rhythm in which you write tests.
// Arrange — one Dummy, one Stub, one Spy, one Mock, one Fake
const auditId = "ignored"; // Dummy: fills the signature, never read
const fares = stubFare({cityCenter: 1250}); // Stub: canned answer (Responder)
const receipts = spyReceipts(); // Spy: records each send(...)
const gateway = mockGateway().expect("charge", 1250, "EUR"); // Mock: command expectation
const cards = inMemoryCardStore(); // Fake: real but shortcut storage
// Act — exactly one action
const confirmation = chargeRide(trip, gateway, receipts, fares, cards, auditId);
// Assert — state first, then the one behaviour expectation
expect(confirmation.status).toBe("paid"); // state verification
expect(receipts.sent).toHaveLength(1); // spy: outcome, not call order
gateway.verify(); // behaviour verification of the command
Guides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.
npx claudepluginhub xonovex/platform --plugin xonovex-skill-testing