actorkit-storybook-testing

Installation
SKILL.md

Actor-Kit Storybook Testing

Test actor-kit components in Storybook without WebSockets or Cloudflare Workers. Mock clients replace the real network layer with synchronous, controllable state — letting you render any actor state, simulate transitions, and assert UI behavior in play functions.

When to Use

  • Building stories for components that consume useSelector, useSend, or useMatches from an actor-kit context
  • Testing game UIs across multiple phases (lobby → active → finished)
  • Verifying UI for edge cases (empty states, error states, max players)
  • Simulating async operations (question parsing, timers, uploads)
  • Testing multi-actor UIs (e.g., a player actor + session actor)

Key Concepts

Mock Client

createActorKitMockClient<TMachine> creates a client with the same interface as the real WebSocket client but no network I/O:

Installs
2
Repository
jonmumm/skills
GitHub Stars
2
First Seen
May 1, 2026
actorkit-storybook-testing — jonmumm/skills