github avatar

Unit Test Vue Pinia

This one helps you write and review unit tests for Vue 3 projects using Pinia for state management. It pushes you toward behavior-first testing: assert what the user sees or what the component emits, not internal implementation details. The Pinia guidance is opinionated and detailed, defaulting to createTestingPinia with vi.fn spies for action assertions, and it explicitly calls out when to use stubActions: false or real store instances. It includes a references/pinia-patterns.md file as your local source of truth, which is a smart touch for team consistency. The workflow is tight: identify the behavior boundary, set up the minimal Pinia config, drive through public inputs, assert outputs. If you're tired of brittle tests that break on refactors, this will nudge you toward the right patterns.

skills.sh installs
1.8K
GitHub stars
41K
last updated
Aug 21, 2026

Install

$ npx -y skills add github/awesome-copilot --skill unit-test-vue-pinia --agent claude-code

Installs into .claude/skills of the current project.

Files

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

  1. Identify the behavior boundary first: component UI behavior, composable behavior, or store behavior.
  2. Choose the narrowest test style that can prove that behavior.
  3. Set up Pinia with the least powerful option that still covers the scenario.
  4. Drive the test through public inputs such as props, form updates, button clicks, emitted child events, and store APIs.
  5. Assert observable outputs and side effects before considering any instance-level assertion.
  6. Return or review tests with clear behavior-oriented names and note any remaining coverage gaps.

Core Rules

Sponsors

Details

Repository
github.com/github/awesome-copilot
Categories
Frontend Development, Testing & QA, Git & Pull Requests, Code Review & Quality, AI & Agent Building, Python
First seen
Apr 16, 2026

More from github/awesome-copilot

All 318
1nickcrew avatarreact-performance-optimizationnickcrew/claude-ctx-pluginreact performance optimization1.7Kskills.sh installs
2daymade avatarui-designerdaymade/claude-code-skillsExtract design systems from reference UI images and generate implementation-ready UI design prompts. Use when users provide UI screenshots/mockups and want to c1.7Kskills.sh installs
3mager avatarfrontend-designmager/frontend-designFrontend design skill that generates, restyles, and guides UI development in mager's actual design taste — concept-led interfaces that feel authored, tactile, e1.7Kskills.sh installs
4onmax avatarnuxt-studioonmax/nuxt-skillsConfigure and operate the self-hosted Nuxt Studio editor for Nuxt Content. Use when working with nuxt-studio installation, editor customization, OAuth or custom1.7Kskills.sh installs
5forcedotcom avatargenerating-ui-bundle-custom-appforcedotcom/sf-skillsMUST activate when the project contains a uiBundles/*/src/ directory and the task involves creating or configuring a Custom Application for hosting a UI bundle 1.6Kskills.sh installs
6forcedotcom avatargenerating-ui-bundle-metadataforcedotcom/afv-librarygenerating ui bundle metadata1.5Kskills.sh installs