[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DA1DS4HS3P1CQZTHMDQW08":3,"skill-same:01M7DA1DS4HS3P1CQZTHMDQW08":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":14,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M7DA1DS4HS3P1CQZTHMDQW08","Vue Test Utils Testing",null,"Vue.js component testing using Vue Test Utils with mount\u002Fshallow mount, event simulation, Vuex\u002FPinia store testing, and composition API testing.","GrupoANDevelopment-m\u002Falberto-ai","GrupoANDevelopment-m","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F257455179?v=4","01M7D69X2N2KEVN0SJF6WGM6SH","Antônio  Ndombe","01M7D69X3P5JTT8H8S904N3888",0,"MIT","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fvue-test-utils\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: \"Vue Test Utils Testing\"\ndescription: \"Vue.js component testing using Vue Test Utils with mount\u002Fshallow mount, event simulation, Vuex\u002FPinia store testing, and composition API testing.\"\nversion: 1.0.0\nauthor: qaskills\nlicense: MIT\ntags: [vue, test-utils, component, pinia, vuex]\ntestingTypes: [unit, integration]\nframeworks: [vue]\nlanguages: [typescript, javascript]\ndomains: [web]\nagents: [claude-code, cursor, github-copilot, windsurf, codex, aider, continue, cline, zed, bolt]\n---\n\n# Vue Test Utils Testing\n\nThis skill makes the agent write Vue 3 component tests with Vue Test Utils (VTU) + Vitest that assert on rendered output and user-observable behavior, not implementation internals. Trigger it whenever you see `.vue` SFCs, `@vue\u002Ftest-utils`, `mount`\u002F`shallowMount`, Pinia\u002FVuex stores under test, or a Vitest config in a Vue project.\n\n## Core Principles\n\n1. **Prefer `mount` over `shallowMount`.** Full `mount` renders children so you test real behavior. Reach for `shallowMount` only to isolate a component from an expensive\u002Firrelevant child — and know that stubbing children hides integration bugs.\n2. **Query by accessible roles and `data-testid`, not by CSS classes.** Classes are styling and churn constantly; `find('[data-testid=\"submit\"]')` and `getByRole` survive refactors and assert what users actually see.\n3. **`await` every state change.** Vue's DOM updates are asynchronous. After `trigger`, `setValue`, `setProps`, or a store mutation you must `await wrapper.vm.$nextTick()` (or `await trigger(...)`, which returns nextTick) before asserting, or you assert against stale DOM.\n4. **Test the component's contract: props in, events\u002FDOM out.** Assert emitted events with `wrapper.emitted()`, assert rendered text\u002Fattributes, and pass props. Do not assert on private `data`\u002Frefs or call internal methods.\n5. **Use a real Pinia instance with `createTestingPinia`, not hand-mocked stores.** It gives you real getters, auto-spied actions, and `initialState` — far more faithful than stubbing the store object.\n6. **Stub the network, render the component.** Mock `fetch`\u002Faxios at the module boundary with `vi.mock`; never let component tests hit a live API.\n\n## Setup\n\n```bash\nnpm install -D vitest @vue\u002Ftest-utils@2 @vitest\u002Fcoverage-v8 jsdom \\\n  @pinia\u002Ftesting pinia\n```\n\n```ts\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig';\nimport vue from '@vitejs\u002Fplugin-vue';\n\nexport default defineConfig({\n  plugins: [vue()],\n  test: {\n    environment: 'jsdom',\n    globals: true, \u002F\u002F describe\u002Fit\u002Fexpect without imports\n    setupFiles: ['.\u002Ftests\u002Fsetup.ts'],\n    coverage: { provider: 'v8', reporter: ['text', 'html'] },\n  },\n});\n```\n\n```ts\n\u002F\u002F tests\u002Fsetup.ts\nimport { config } from '@vue\u002Ftest-utils';\n\u002F\u002F Global stubs\u002Fplugins for every test, e.g. stub \u003CRouterLink>\nconfig.global.stubs = { RouterLink: { template: '\u003Ca>\u003Cslot \u002F>\u003C\u002Fa>' } };\n```\n\n## Patterns \u002F Workflow\n\n### 1. Render and assert on output\n\n```ts\n\u002F\u002F Counter.vue exposes a button that increments a label\nimport { mount } from '@vue\u002Ftest-utils';\nimport { describe, it, expect } from 'vitest';\nimport Counter from '@\u002Fcomponents\u002FCounter.vue';\n\ndescribe('Counter', () => {\n  it('renders the initial count from a prop', () => {\n    const wrapper = mount(Counter, { props: { start: 3 } });\n    expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('3');\n  });\n\n  it('increments when the button is clicked', async () => {\n    const wrapper = mount(Counter, { props: { start: 0 } });\n    await wrapper.get('[data-testid=\"increment\"]').trigger('click');\n    expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('1');\n  });\n});\n```\n\n### 2. Form input, v-model, and emitted events\n\n```ts\nimport { mount } from '@vue\u002Ftest-utils';\nimport SearchBox from '@\u002Fcomponents\u002FSearchBox.vue';\n\nit('emits \"search\" with the trimmed query on submit', async () => {\n  const wrapper = mount(SearchBox);\n\n  await wrapper.get('input[type=\"search\"]').setValue('  vue testing  ');\n  await wrapper.get('form').trigger('submit.prevent');\n\n  \u002F\u002F emitted() returns arrays of arrays: one entry per emission\n  const events = wrapper.emitted('search');\n  expect(events).toHaveLength(1);\n  expect(events![0]).toEqual(['vue testing']);\n});\n\nit('disables the button while the query is empty', async () => {\n  const wrapper = mount(SearchBox);\n  const button = wrapper.get('button[type=\"submit\"]');\n  expect(button.attributes('disabled')).toBeDefined();\n\n  await wrapper.get('input[type=\"search\"]').setValue('x');\n  expect(button.attributes('disabled')).toBeUndefined();\n});\n```\n\n### 3. Props, slots, and conditional rendering\n\n```ts\nimport { mount } from '@vue\u002Ftest-utils';\nimport Alert from '@\u002Fcomponents\u002FAlert.vue';\n\nit('renders the danger variant and the default slot', () => {\n  const wrapper = mount(Alert, {\n    props: { variant: 'danger' },\n    slots: { default: 'Something broke' },\n  });\n  expect(wrapper.classes()).toContain('alert--danger');\n  expect(wrapper.text()).toContain('Something broke');\n});\n\nit('reacts to a prop change', async () => {\n  const wrapper = mount(Alert, { props: { variant: 'info' } });\n  await wrapper.setProps({ variant: 'danger' });\n  expect(wrapper.classes()).toContain('alert--danger');\n});\n\nit('hides itself when \"open\" is false', () => {\n  const wrapper = mount(Alert, { props: { open: false } });\n  expect(wrapper.find('[data-testid=\"alert\"]').exists()).toBe(false);\n});\n```\n\n### 4. Testing a component backed by Pinia\n\n```ts\nimport { mount } from '@vue\u002Ftest-utils';\nimport { createTestingPinia } from '@pinia\u002Ftesting';\nimport { vi } from 'vitest';\nimport CartSummary from '@\u002Fcomponents\u002FCartSummary.vue';\nimport { useCartStore } from '@\u002Fstores\u002Fcart';\n\nit('shows the item count from the store and dispatches checkout', async () => {\n  const wrapper = mount(CartSummary, {\n    global: {\n      plugins: [\n        createTestingPinia({\n          createSpy: vi.fn, \u002F\u002F actions are auto-stubbed + spied\n          initialState: { cart: { items: [{ id: 1 }, { id: 2 }] } },\n        }),\n      ],\n    },\n  });\n\n  expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('2');\n\n  const store = useCartStore();\n  await wrapper.get('[data-testid=\"checkout\"]').trigger('click');\n  expect(store.checkout).toHaveBeenCalledOnce();\n});\n\nit('updates the DOM when a getter-backed value changes', async () => {\n  const wrapper = mount(CartSummary, {\n    global: { plugins: [createTestingPinia({ createSpy: vi.fn })] },\n  });\n  const store = useCartStore();\n  store.items.push({ id: 9 }); \u002F\u002F mutate real state\n  await wrapper.vm.$nextTick();\n  expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('1');\n});\n```\n\n### 5. Async component with a mocked fetch\n\n```ts\nimport { mount, flushPromises } from '@vue\u002Ftest-utils';\nimport { vi, beforeEach } from 'vitest';\nimport UserCard from '@\u002Fcomponents\u002FUserCard.vue';\n\nbeforeEach(() => {\n  global.fetch = vi.fn().mockResolvedValue({\n    ok: true,\n    json: async () => ({ id: 1, name: 'Ada Lovelace' }),\n  } as Response);\n});\n\nit('renders a loading state then the fetched user', async () => {\n  const wrapper = mount(UserCard, { props: { userId: 1 } });\n  expect(wrapper.text()).toContain('Loading');\n\n  await flushPromises(); \u002F\u002F resolve fetch + re-render\n  expect(wrapper.text()).toContain('Ada Lovelace');\n  expect(fetch).toHaveBeenCalledWith('\u002Fapi\u002Fusers\u002F1');\n});\n\nit('shows an error message when the request fails', async () => {\n  (global.fetch as any).mockResolvedValueOnce({ ok: false, status: 500 });\n  const wrapper = mount(UserCard, { props: { userId: 1 } });\n  await flushPromises();\n  expect(wrapper.get('[data-testid=\"error\"]').text()).toMatch(\u002Ffailed\u002Fi);\n});\n```\n\n### 6. Testing a composable in isolation\n\nComposables that use lifecycle hooks (`onMounted`) need a host component; pure ones can be called directly.\n\n```ts\nimport { withSetup } from '.\u002FwithSetup'; \u002F\u002F tiny mount helper\nimport { useCounter } from '@\u002Fcomposables\u002FuseCounter';\n\nit('increments and exposes a reactive count', async () => {\n  const [result, app] = withSetup(() => useCounter(5));\n  expect(result.count.value).toBe(5);\n  result.increment();\n  expect(result.count.value).toBe(6);\n  app.unmount();\n});\n```\n\n```ts\n\u002F\u002F tests\u002FwithSetup.ts — runs a composable inside a real app instance\nimport { createApp } from 'vue';\n\nexport function withSetup\u003CT>(composable: () => T): [T, ReturnType\u003Ctypeof createApp>] {\n  let result!: T;\n  const app = createApp({ setup() { result = composable(); return () => {}; } });\n  app.mount(document.createElement('div'));\n  return [result, app];\n}\n```\n\n## Best Practices\n\n- **Add `data-testid` to elements you assert on.** It decouples tests from markup\u002Fclasses and makes intent explicit.\n- **Use `wrapper.get()` when an element must exist** (it throws a clear error if missing) and `wrapper.find().exists()` when checking for absence.\n- **Prefer `findComponent(ChildStub)` with a `name`\u002F`ref`** over CSS selectors when asserting child props: `wrapper.findComponent(ProductCard).props('price')`.\n- **Reset mocks between tests** with `vi.clearAllMocks()` in `afterEach` (or `clearMocks: true` in config) so spy call counts don't leak.\n- **Use `createTestingPinia({ stubActions: false })`** when you need actions to actually run (e.g. testing a store-driven flow end to end).\n- **Test the rendered text\u002Frole a user would perceive**, then layer in emitted-event assertions for the parent contract.\n\n## Anti-Patterns\n\n1. **Forgetting `await` after a state change.** `wrapper.trigger('click'); expect(...)` asserts before Vue re-renders and gives flaky, confusing failures. Always `await` the trigger\u002F`$nextTick`\u002F`flushPromises`.\n2. **Asserting on internal `wrapper.vm` data or calling private methods.** Tests coupled to implementation break on every refactor. Drive via the DOM and assert via the DOM\u002Femitted events.\n3. **Selecting by CSS class.** `find('.btn-primary')` shatters the moment a designer renames a class. Use `data-testid` or roles.\n4. **Defaulting to `shallowMount` everywhere.** Stubbing all children means you never test that the pieces actually work together; bugs slip through the seams.\n5. **Hand-rolling a fake store object.** It drifts from the real store's getters\u002Factions. Use `createTestingPinia` so getters compute and actions are spied for free.\n6. **Letting tests hit a real API or a real router.** Mock `fetch`\u002Faxios with `vi.mock` and stub `RouterLink`\u002F`router-view`; otherwise tests are slow, flaky, and network-dependent.\n\n## When to Trigger This Skill\n\n- \"Write Vue component tests\" \u002F \"test this `.vue` component\" \u002F \"add unit tests for my Vue app\"\n- Anything mentioning `@vue\u002Ftest-utils`, `mount`, `shallowMount`, `flushPromises`, `createTestingPinia`\n- \"Test my Pinia \u002F Vuex store\" or \"test this composable\"\n- \"My Vue test is flaky \u002F asserts the wrong DOM\" (usually a missing `await`)\n- Setting up Vitest + jsdom for a Vue 3 project\n","# Vue Test Utils Testing\n\nThis skill makes the agent write Vue 3 component tests with Vue Test Utils (VTU) + Vitest that assert on rendered output and user-observable behavior, not implementation internals. Trigger it whenever you see `.vue` SFCs, `@vue\u002Ftest-utils`, `mount`\u002F`shallowMount`, Pinia\u002FVuex stores under test, or a Vitest config in a Vue project.\n\n## Core Principles\n\n1. **Prefer `mount` over `shallowMount`.** Full `mount` renders children so you test real behavior. Reach for `shallowMount` only to isolate a component from an expensive\u002Firrelevant child — and know that stubbing children hides integration bugs.\n2. **Query by accessible roles and `data-testid`, not by CSS classes.** Classes are styling and churn constantly; `find('[data-testid=\"submit\"]')` and `getByRole` survive refactors and assert what users actually see.\n3. **`await` every state change.** Vue's DOM updates are asynchronous. After `trigger`, `setValue`, `setProps`, or a store mutation you must `await wrapper.vm.$nextTick()` (or `await trigger(...)`, which returns nextTick) before asserting, or you assert against stale DOM.\n4. **Test the component's contract: props in, events\u002FDOM out.** Assert emitted events with `wrapper.emitted()`, assert rendered text\u002Fattributes, and pass props. Do not assert on private `data`\u002Frefs or call internal methods.\n5. **Use a real Pinia instance with `createTestingPinia`, not hand-mocked stores.** It gives you real getters, auto-spied actions, and `initialState` — far more faithful than stubbing the store object.\n6. **Stub the network, render the component.** Mock `fetch`\u002Faxios at the module boundary with `vi.mock`; never let component tests hit a live API.\n\n## Setup\n\n```bash\nnpm install -D vitest @vue\u002Ftest-utils@2 @vitest\u002Fcoverage-v8 jsdom \\\n  @pinia\u002Ftesting pinia\n```\n\n```ts\n\u002F\u002F vitest.config.ts\nimport { defineConfig } from 'vitest\u002Fconfig';\nimport vue from '@vitejs\u002Fplugin-vue';\n\nexport default defineConfig({\n  plugins: [vue()],\n  test: {\n    environment: 'jsdom',\n    globals: true, \u002F\u002F describe\u002Fit\u002Fexpect without imports\n    setupFiles: ['.\u002Ftests\u002Fsetup.ts'],\n    coverage: { provider: 'v8', reporter: ['text', 'html'] },\n  },\n});\n```\n\n```ts\n\u002F\u002F tests\u002Fsetup.ts\nimport { config } from '@vue\u002Ftest-utils';\n\u002F\u002F Global stubs\u002Fplugins for every test, e.g. stub \u003CRouterLink>\nconfig.global.stubs = { RouterLink: { template: '\u003Ca>\u003Cslot \u002F>\u003C\u002Fa>' } };\n```\n\n## Patterns \u002F Workflow\n\n### 1. Render and assert on output\n\n```ts\n\u002F\u002F Counter.vue exposes a button that increments a label\nimport { mount } from '@vue\u002Ftest-utils';\nimport { describe, it, expect } from 'vitest';\nimport Counter from '@\u002Fcomponents\u002FCounter.vue';\n\ndescribe('Counter', () => {\n  it('renders the initial count from a prop', () => {\n    const wrapper = mount(Counter, { props: { start: 3 } });\n    expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('3');\n  });\n\n  it('increments when the button is clicked', async () => {\n    const wrapper = mount(Counter, { props: { start: 0 } });\n    await wrapper.get('[data-testid=\"increment\"]').trigger('click');\n    expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('1');\n  });\n});\n```\n\n### 2. Form input, v-model, and emitted events\n\n```ts\nimport { mount } from '@vue\u002Ftest-utils';\nimport SearchBox from '@\u002Fcomponents\u002FSearchBox.vue';\n\nit('emits \"search\" with the trimmed query on submit', async () => {\n  const wrapper = mount(SearchBox);\n\n  await wrapper.get('input[type=\"search\"]').setValue('  vue testing  ');\n  await wrapper.get('form').trigger('submit.prevent');\n\n  \u002F\u002F emitted() returns arrays of arrays: one entry per emission\n  const events = wrapper.emitted('search');\n  expect(events).toHaveLength(1);\n  expect(events![0]).toEqual(['vue testing']);\n});\n\nit('disables the button while the query is empty', async () => {\n  const wrapper = mount(SearchBox);\n  const button = wrapper.get('button[type=\"submit\"]');\n  expect(button.attributes('disabled')).toBeDefined();\n\n  await wrapper.get('input[type=\"search\"]').setValue('x');\n  expect(button.attributes('disabled')).toBeUndefined();\n});\n```\n\n### 3. Props, slots, and conditional rendering\n\n```ts\nimport { mount } from '@vue\u002Ftest-utils';\nimport Alert from '@\u002Fcomponents\u002FAlert.vue';\n\nit('renders the danger variant and the default slot', () => {\n  const wrapper = mount(Alert, {\n    props: { variant: 'danger' },\n    slots: { default: 'Something broke' },\n  });\n  expect(wrapper.classes()).toContain('alert--danger');\n  expect(wrapper.text()).toContain('Something broke');\n});\n\nit('reacts to a prop change', async () => {\n  const wrapper = mount(Alert, { props: { variant: 'info' } });\n  await wrapper.setProps({ variant: 'danger' });\n  expect(wrapper.classes()).toContain('alert--danger');\n});\n\nit('hides itself when \"open\" is false', () => {\n  const wrapper = mount(Alert, { props: { open: false } });\n  expect(wrapper.find('[data-testid=\"alert\"]').exists()).toBe(false);\n});\n```\n\n### 4. Testing a component backed by Pinia\n\n```ts\nimport { mount } from '@vue\u002Ftest-utils';\nimport { createTestingPinia } from '@pinia\u002Ftesting';\nimport { vi } from 'vitest';\nimport CartSummary from '@\u002Fcomponents\u002FCartSummary.vue';\nimport { useCartStore } from '@\u002Fstores\u002Fcart';\n\nit('shows the item count from the store and dispatches checkout', async () => {\n  const wrapper = mount(CartSummary, {\n    global: {\n      plugins: [\n        createTestingPinia({\n          createSpy: vi.fn, \u002F\u002F actions are auto-stubbed + spied\n          initialState: { cart: { items: [{ id: 1 }, { id: 2 }] } },\n        }),\n      ],\n    },\n  });\n\n  expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('2');\n\n  const store = useCartStore();\n  await wrapper.get('[data-testid=\"checkout\"]').trigger('click');\n  expect(store.checkout).toHaveBeenCalledOnce();\n});\n\nit('updates the DOM when a getter-backed value changes', async () => {\n  const wrapper = mount(CartSummary, {\n    global: { plugins: [createTestingPinia({ createSpy: vi.fn })] },\n  });\n  const store = useCartStore();\n  store.items.push({ id: 9 }); \u002F\u002F mutate real state\n  await wrapper.vm.$nextTick();\n  expect(wrapper.get('[data-testid=\"count\"]').text()).toBe('1');\n});\n```\n\n### 5. Async component with a mocked fetch\n\n```ts\nimport { mount, flushPromises } from '@vue\u002Ftest-utils';\nimport { vi, beforeEach } from 'vitest';\nimport UserCard from '@\u002Fcomponents\u002FUserCard.vue';\n\nbeforeEach(() => {\n  global.fetch = vi.fn().mockResolvedValue({\n    ok: true,\n    json: async () => ({ id: 1, name: 'Ada Lovelace' }),\n  } as Response);\n});\n\nit('renders a loading state then the fetched user', async () => {\n  const wrapper = mount(UserCard, { props: { userId: 1 } });\n  expect(wrapper.text()).toContain('Loading');\n\n  await flushPromises(); \u002F\u002F resolve fetch + re-render\n  expect(wrapper.text()).toContain('Ada Lovelace');\n  expect(fetch).toHaveBeenCalledWith('\u002Fapi\u002Fusers\u002F1');\n});\n\nit('shows an error message when the request fails', async () => {\n  (global.fetch as any).mockResolvedValueOnce({ ok: false, status: 500 });\n  const wrapper = mount(UserCard, { props: { userId: 1 } });\n  await flushPromises();\n  expect(wrapper.get('[data-testid=\"error\"]').text()).toMatch(\u002Ffailed\u002Fi);\n});\n```\n\n### 6. Testing a composable in isolation\n\nComposables that use lifecycle hooks (`onMounted`) need a host component; pure ones can be called directly.\n\n```ts\nimport { withSetup } from '.\u002FwithSetup'; \u002F\u002F tiny mount helper\nimport { useCounter } from '@\u002Fcomposables\u002FuseCounter';\n\nit('increments and exposes a reactive count', async () => {\n  const [result, app] = withSetup(() => useCounter(5));\n  expect(result.count.value).toBe(5);\n  result.increment();\n  expect(result.count.value).toBe(6);\n  app.unmount();\n});\n```\n\n```ts\n\u002F\u002F tests\u002FwithSetup.ts — runs a composable inside a real app instance\nimport { createApp } from 'vue';\n\nexport function withSetup\u003CT>(composable: () => T): [T, ReturnType\u003Ctypeof createApp>] {\n  let result!: T;\n  const app = createApp({ setup() { result = composable(); return () => {}; } });\n  app.mount(document.createElement('div'));\n  return [result, app];\n}\n```\n\n## Best Practices\n\n- **Add `data-testid` to elements you assert on.** It decouples tests from markup\u002Fclasses and makes intent explicit.\n- **Use `wrapper.get()` when an element must exist** (it throws a clear error if missing) and `wrapper.find().exists()` when checking for absence.\n- **Prefer `findComponent(ChildStub)` with a `name`\u002F`ref`** over CSS selectors when asserting child props: `wrapper.findComponent(ProductCard).props('price')`.\n- **Reset mocks between tests** with `vi.clearAllMocks()` in `afterEach` (or `clearMocks: true` in config) so spy call counts don't leak.\n- **Use `createTestingPinia({ stubActions: false })`** when you need actions to actually run (e.g. testing a store-driven flow end to end).\n- **Test the rendered text\u002Frole a user would perceive**, then layer in emitted-event assertions for the parent contract.\n\n## Anti-Patterns\n\n1. **Forgetting `await` after a state change.** `wrapper.trigger('click'); expect(...)` asserts before Vue re-renders and gives flaky, confusing failures. Always `await` the trigger\u002F`$nextTick`\u002F`flushPromises`.\n2. **Asserting on internal `wrapper.vm` data or calling private methods.** Tests coupled to implementation break on every refactor. Drive via the DOM and assert via the DOM\u002Femitted events.\n3. **Selecting by CSS class.** `find('.btn-primary')` shatters the moment a designer renames a class. Use `data-testid` or roles.\n4. **Defaulting to `shallowMount` everywhere.** Stubbing all children means you never test that the pieces actually work together; bugs slip through the seams.\n5. **Hand-rolling a fake store object.** It drifts from the real store's getters\u002Factions. Use `createTestingPinia` so getters compute and actions are spied for free.\n6. **Letting tests hit a real API or a real router.** Mock `fetch`\u002Faxios with `vi.mock` and stub `RouterLink`\u002F`router-view`; otherwise tests are slow, flaky, and network-dependent.\n\n## When to Trigger This Skill\n\n- \"Write Vue component tests\" \u002F \"test this `.vue` component\" \u002F \"add unit tests for my Vue app\"\n- Anything mentioning `@vue\u002Ftest-utils`, `mount`, `shallowMount`, `flushPromises`, `createTestingPinia`\n- \"Test my Pinia \u002F Vuex store\" or \"test this composable\"\n- \"My Vue test is flaky \u002F asserts the wrong DOM\" (usually a missing `await`)\n- Setting up Vitest + jsdom for a Vue 3 project\n",{"name":5,"tags":24,"agents":30,"author":41,"domains":42,"license":15,"version":44,"languages":45,"frameworks":48,"description":7,"testingTypes":49},[25,26,27,28,29],"vue","test-utils","component","pinia","vuex",[31,32,33,34,35,36,37,38,39,40],"claude-code","cursor","github-copilot","windsurf","codex","aider","continue","cline","zed","bolt","qaskills",[43],"web","1.0.0",[46,47],"typescript","javascript",[25],[50,51],"unit","integration","main","eac438ea9216a7cb8a570cab803eb01eeafc6793","skills\u002Fqa\u002Fvue-test-utils","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m","https:\u002F\u002Fid-preview--d5bef06d-6c9e-4563-a3d4-a855b9d61610.lovable.app\u002F","Eu sou Antonio B. B. Ndombe \r\nEu sou um Pesquisador e desenvolvedor de sistema autonomia cognitivos, fundador de sistemas ODCs ( organismos digital conscientes)","2026-11-04 06:53:39",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Vue Test Utils Testing\"",{"tool":66,"command":67},"bunx","bunx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Vue Test Utils Testing\"",{"tool":69,"command":70},"pnpm","pnpm dlx skills add GrupoANDevelopment-m\u002Falberto-ai --skill \"Vue Test Utils Testing\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fskills\u002Fqa\u002Fvue-test-utils\u002FSKILL.md",true,[],[75,83,90,97,104,111],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M7DASC6FSCJP49JZBSK0NY1Z","nemoclaw-user-reference","Describes the NemoClaw integration layer and blueprint architecture and how they orchestrate compatible agent sandboxes. Use when looking up architecture, agent integration, plugin structure, or blueprint design. Trigger keywords - nemoclaw architecture, nemoclaw agent architecture, nemoclaw plugin blueprint structure, nemoclaw vs openshell, which cli, nemoclaw cli, openshell cli, sandbox commands, nemoclaw cli commands, nemoclaw command reference, nemoclaw network policy, sandbox egress control operator approval, nemoclaw troubleshooting, nemoclaw debug sandbox issues.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-reference\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M7DAS5S79VK33XFGVAM2TFWF","nemoclaw-user-overview","Explains how OpenClaw, OpenShell, and NemoClaw form the ecosystem, NemoClaw's position in the stack, what NemoClaw adds beyond the community sandbox, and when to prefer NemoClaw versus integrating OpenShell and OpenClaw directly. Use when users ask about the relationship between OpenClaw, OpenShell, and NemoClaw, or when to use NemoClaw versus OpenShell. Trigger keywords - nemoclaw ecosystem, openclaw openshell, nemoclaw vs openshell, sandboxed openclaw, how nemoclaw works, nemoclaw sandbox lifecycle blueprint, nemoclaw overview, openclaw always-on assistants, nvidia openshell, nvidia nemotron, nemoclaw release notes, nemoclaw changelog.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-overview\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M7DAS0PQEMET5MNGZ1ABSZVS","nemoclaw-user-monitor-sandbox","Inspects sandbox health, traces agent behavior, and diagnoses problems. Use when monitoring a running sandbox, debugging agent issues, or checking sandbox logs. Trigger keywords - monitor nemoclaw sandbox, debug nemoclaw agent issues.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-monitor-sandbox\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":19},"01M7DARQYGF7E9A69VH6S3CGN9","nemoclaw-user-manage-sandboxes","Explains operational tasks after the quickstart: listing sandboxes, status and health checks, logs, diagnostics, port forwards, multiple sandboxes, credential reset, rebuilds, network presets, upgrades, and uninstall. Trigger keywords - manage nemoclaw sandboxes, nemoclaw status, nemoclaw list, nemoclaw dashboard port, nemoclaw rebuild, nemoclaw upgrade sandboxes, nemoclaw uninstall, sandbox mutability, sandbox runtime configuration, sandbox rebuild, nemoclaw backup, nemoclaw restore, workspace backup, openshell sandbox download upload, nemoclaw messaging channels, nemoclaw telegram, nemoclaw discord, nemoclaw slack, nemoclaw wechat, nemoclaw whatsapp, openshell channel messaging, nemoclaw workspace files, soul.md, user.md, identity.md, agents.md, sandbox persistence.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-sandboxes\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":19},"01M7DARH8BRTG51TRCAB7YWDJ4","nemoclaw-user-manage-policy","Adds, removes, or modifies allowed endpoints in the sandbox policy. Use when customizing network policy, changing egress rules, or configuring sandbox endpoint access. Trigger keywords - customize nemoclaw network policy, sandbox egress policy configuration, nemoclaw integration policy examples, post-install policy setup, openshell approval workflow, policy preset, nemoclaw approve network requests, sandbox egress approval tui.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-manage-policy\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":79,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":19},"01M7DARAT62M2VR37590VCZ5NS","nemoclaw-user-get-started","Installs NemoClaw, launches a sandbox, and runs the first agent prompt. Use when onboarding, installing, or launching a NemoClaw sandbox for the first time. Trigger keywords - nemoclaw quickstart, install nemoclaw openclaw sandbox, nemohermes quickstart, hermes agent nemoclaw, run hermes openshell sandbox, nemoclaw prerequisites, nemoclaw supported platforms, nemoclaw hardware software, nemoclaw windows wsl2 setup, nemoclaw install windows docker desktop.","https:\u002F\u002Fgithub.com\u002FGrupoANDevelopment-m\u002Falberto-ai\u002Fblob\u002Fmain\u002Fupstream\u002Fnemoclaw\u002Fskills\u002Fnemoclaw-user-get-started\u002FSKILL.md",[],[]]