unit-test-vue-pinia
Installation
SKILL.md
unit-test-vue-pinia
Use this skill to create or review unit tests for Vue components, composables, and Pinia stores. Keep tests small, deterministic, and behavior-first.
Workflow
- Identify the behavior boundary first: component UI behavior, composable behavior, or store behavior.
- Choose the narrowest test style that can prove that behavior.
- Set up Pinia with the least powerful option that still covers the scenario.
- Drive the test through public inputs such as props, form updates, button clicks, emitted child events, and store APIs.
- Assert observable outputs and side effects before considering any instance-level assertion.
- Return or review tests with clear behavior-oriented names and note any remaining coverage gaps.