---
title: "Vue 3 Pinia Unit Testing: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/github-unit-test-vue-pinia/
description: "Writes and reviews unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases: behavior-first assertions on components, composables and stores, with createTestingPinia setups from a checked-in pattern cookbook."
---

# Vue 3 Pinia Unit Testing: review, setup & limitations · Undominated.ai

> Writes and reviews unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases: behavior-first assertions on components, composables and stores, with createTestingPinia setups from a checked-in pattern cookbook.

[← Explore all skills](/skills/)

TESTING AND RELIABILITY / GitHub community

# Vue 3 Pinia Unit Testing

Writes and reviews unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases: behavior-first assertions on components, composables and stores, with createTestingPinia setups from a checked-in pattern cookbook.

 [See setup guidance ↓](#setup)[Original source ↗](https://github.com/github/awesome-copilot/tree/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia)

SOURCE REVIEW

 Reviewed 2026-10-15
 Evidence 6 linked sources
 Publisher GitHub community
 Licence [MIT ↗](https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/LICENSE)
 Revision 2dfe04eaeb5f
 [Read what was—and wasn’t—checked ↓](#review)

“Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases. Use when creating or updating tests for components, composables, and stores; mocking Pinia with createTestingPinia; applying Vue Test Utils patterns; and enforcing black-box assertions over implementation details.”

 [GitHub community · upstream description ↗](https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - Structures the work around the behavior boundary first — component UI, composable or store — and restricts wrapper.vm access to exceptional cases, enforcing black-box assertions over implementation details.
- Treats the checked-in references/pinia-patterns.md as the local source of truth for standard Pinia test setups and falls back to Pinia's cookbook only when the checked-in examples do not cover the case.

### A good fit for

 - Unit-testing Vue 3 components, composables and Pinia stores with Vitest
- Reviewing an existing test suite for implementation-coupled assertions and missing coverage gaps
- Choose between action spies and real Pinia actions according to the behavior a test must prove.

### Weigh up before choosing

 - Assumes the Vitest + @pinia/testing + Vue Test Utils stack; projects on Jest or without Pinia are out of scope.
- The cookbook covers standard store and component setups; complex provide/inject or router-mounted compositions are not addressed.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - skills/unit-test-vue-pinia/SKILL.md
- skills/unit-test-vue-pinia/references/pinia-patterns.md
- LICENSE
- vercel-labs/skills@7407f3893ad4dceab546ac002c3ef806e4000c73:README.md

### Our findings

 - Core rules require one behavior per test, observable input/output assertions before any instance-level check, and mock resets in beforeEach.
- The cookbook shows createTestingPinia with createSpy: vi.fn as the default and toggling stubActions only when behavior inside an action must actually run.
- The workflow ends by returning or reviewing tests with behavior-oriented names and noting remaining coverage gaps rather than claiming completion.
- The definition accepts minimal createTestingPinia setups without createSpy when action-spy assertions are absent, and limits real action execution to tests that need action behavior or side effects.

### Not established by this review

 - No Vue component, composable or store test was written or run.
- The Vitest and @pinia/testing toolchain was not executed.
- Not executed: it was not installed or run.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Add a skill to your workflow.

[Upstream setup instructions ↗](https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/README.md)

DOCUMENTED COMMAND

 npx skills add github/awesome-copilot/skills/unit-test-vue-pinia Copy command ↗

Run in your terminal to choose your AI tools, project or global scope, and installation method. This short command follows the current upstream version; the review covers the revision shown above.

 Optional: install the reviewed revision

Keeps the original source and installer version where recorded, while leaving your AI tools and installation scope for you to choose.

 npx skills add https://github.com/github/awesome-copilot/tree/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia Copy reviewed-revision command ↗ - Install the complete skill directory with its references; the pinia-patterns cookbook is the working reference.
- Choose your AI tools and project or global scope in the installer, then review its permissions before using the skill.

### Before you start

 - Node.js/npm for this installer
- An agent that supports the Agent Skills format
- A Vue 3 project with Vitest, Pinia, @pinia/testing and @vue/test-utils installed

### Compatibility

Agent Skills-compatible coding agents · Vue 3 + TypeScript + Vitest + Pinia projects with @pinia/testing and @vue/test-utils

### Reads and writes test files; runs the project's test runner

 - Read components, composables, stores and existing tests
- Write and edit Vitest test files when authorized
- Run the project's test runner to verify written tests

### Cost model

The instruction package is MIT-licensed; agent usage and CI minutes have their own costs.

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [Skill definition at reviewed revision ↗](https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia/SKILL.md) Checked 2026-10-07 https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia/SKILL.md Supports: summary, upstreamDescription, whySelected, bestFor, limitations, review, compatibility, access
- [Reviewed reference or helper: references/pinia-patterns.md ↗](https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia/references/pinia-patterns.md) Checked 2026-10-07 https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia/references/pinia-patterns.md Supports: review, whySelected, bestFor
- [Upstream license or licensing declaration ↗](https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/LICENSE) Checked 2026-10-07 https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/LICENSE Supports: license
- [Publisher installation and project documentation ↗](https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/README.md) Checked 2026-10-07 https://github.com/github/awesome-copilot/blob/2dfe04eaeb5faf9c168d78041d660c0123893d85/README.md Supports: install, compatibility, access
- [Skills installer source formats and selective installation ↗](https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/README.md) Checked 2026-10-07 https://github.com/vercel-labs/skills/blob/7407f3893ad4dceab546ac002c3ef806e4000c73/README.md Supports: install
- [Pinned continuation review W35 ↗](https://raw.githubusercontent.com/github/awesome-copilot/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia/SKILL.md) Checked 2026-10-15 https://raw.githubusercontent.com/github/awesome-copilot/2dfe04eaeb5faf9c168d78041d660c0123893d85/skills/unit-test-vue-pinia/SKILL.md Supports: review.findings, bestFor

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Vitest ↗ Routes an agent through Vitest one topic at a time: configuration shared with the Vite pipeline, the test/describe/expect APIs and hooks, mocking with the vi utilities, snapshot testing, V8 versus Istanbul coverage, fixtures via test.extend, environments, and type-level testing.](/skills/jetbrains-vitest/)[### Bug Receipt ↗ Creates an evidence-bearing defect or incident handoff that distinguishes verified, partial and blocked outcomes.](/skills/github-bug-receipt/)[### Diagnosing Bugs ↗ A debugging procedure that establishes a reproducible symptom, tests competing explanations and preserves a regression check.](/skills/mattpocock-diagnosing-bugs/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
