/frontend-vue:testingfrom frontend-vue
Use when writing, fixing or reviewing tests for a Vue project — a unit test for a composable or a lib function, a component test with Vue Test Utils or Testing Library for Vue, a Pinia store test, a Nuxt test with @nuxt/test-utils, an end-to-end flow with Playwright — or when deciding what to test at which level, what to mock, how to run the suite before a merge, or why a test is flaky. NOT for the toolchain configs themselves (frontend-vue:tooling) and NOT for Apex or React tests.
Ships in frontend-vue. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
In: a Vue 3 project with Vitest, and code that changed.
Out: the logic is tested where it lives: pure functions and composables as units, components
through their rendered output and emitted events, stores through their actions, the few flows that
matter end to end; the suite runs in one command before a merge and is green. The checkable
expectations are in evals/rubric.json.
| Code | Test | Tool |
|---|---|---|
src/lib/* pure functions | input → output, the edge cases named in the issue | Vitest |
| composables | behaviour through a tiny host component or withSetup helper; VueUse itself is not retested | Vitest + @vue/test-utils |
| components | what the user sees and does: render with props, find by role or text, click, assert emitted events and DOM; never internal refs | @testing-library/vue (preferred for user-facing) or @vue/test-utils |
| Pinia stores | actions and their effect on state, with createTestingPinia or a fresh setActivePinia(createPinia()) per test | Vitest + Pinia |
| Nuxt pages and server routes | @nuxt/test-utils with mountSuspended, registerEndpoint, $fetch | Vitest |
| the three to five flows the product cannot lose | the browser, against a running build | Playwright |
wrapper.vm.internalRef.'a handled row sinks to the bottom and comes back on undo').vi.mock('@/api/workspace') with a typed fake; msw when many tests share a server.createTestingPinia({ stubActions: false }) when the action matters,
stubbed otherwise; pass initialState rather than calling actions in setup.vi.useFakeTimers(), vi.setSystemTime, seeded randoms;
a test that depends on the wall clock is a flaky test.npm run check, see frontend-vue:tooling) runs types, lint,
style lint and vitest run; the pre-push hook or CI runs it, and red is red.// features/feed/FeedItem.test.ts
import { render, screen, fireEvent } from '@testing-library/vue';
import FeedItem from './FeedItem.vue';
const item = { id: 'c1', ref: 'PROJ-7', kind: 'comment', who: 'Pat', at: '2026-11-02T10:00:00Z', body: 'please look', url: 'https://tracker.example/PROJ-7' };
test('a fresh comment is marked seen when clicked', async () => {
const { emitted } = render(FeedItem, { props: { item, fresh: true, source: { id: 'tracker', type: 'tracker', label: 'Tracker' } } });
await fireEvent.click(screen.getByText('PROJ-7').closest('li')!);
expect(emitted().seen).toEqual([[ 'c1' ]]);
});
vitest run → green; the new test fails when the change is reverted (run it once against the
old code, or against a deliberately broken line).grep -rn "wrapper.vm\.\|\.vm\.\$" src --include=*.test.ts → nothing.grep -rn "toMatchSnapshot" src --include=*.test.ts → only small fragments, each with a reason.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub aquivalabs/bladeforge --plugin frontend-vue11 skills in this plugin
/bem-stylesBEM in scoped stylesUse when writing or reviewing the styles of a Vue component — the <style scoped> block, BEM class names for its block, elements and modifiers, state classes bound from the template, design tokens as CSS variables, SCSS inside the component, Stylelint complaints about selector patterns, or moving rules from a global stylesheet into a component. Also when two components share a class name by accident. NOT for the SCSS token system itself or rem sizing (frontend-css:scss-modules, frontend-css:rem), nor for React components (frontend-react:component-structure)./component-architectureComponent architectureUse before creating a Vue component or when deciding where one lives and what it may know — a reusable UI primitive, a feature component bound to the domain, a layout piece of the app chrome, a page or view, a component that only exists for one parent. Also when a component grew into two, when a feature reaches into another feature's component, when a page holds logic, or when asked "where does X go" in a Vue project. NOT for the inside of the .vue file (frontend-vue:sfc-conventions), nor for React (frontend-react:component-placement).