{"id":"38f8daff-c2d3-4582-a62d-33de7aab45d5","shortId":"4Etp8J","kind":"skill","title":"vue-testing-best-practices","tagline":"Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.","description":"Vue.js testing best practices, patterns, and common gotchas.\n\n### Testing\n- Setting up test infrastructure for Vue 3 projects → See [testing-vitest-recommended-for-vue](reference/testing-vitest-recommended-for-vue.md)\n- Tests keep breaking when refactoring component internals → See [testing-component-blackbox-approach](reference/testing-component-blackbox-approach.md)\n- Tests fail intermittently with race conditions → See [testing-async-await-flushpromises](reference/testing-async-await-flushpromises.md)\n- Composables using lifecycle hooks or inject fail to test → See [testing-composables-helper-wrapper](reference/testing-composables-helper-wrapper.md)\n- Getting \"injection Symbol(pinia) not found\" errors in tests → See [testing-pinia-store-setup](reference/testing-pinia-store-setup.md)\n- Components with async setup won't render in tests → See [testing-suspense-async-components](reference/testing-suspense-async-components.md)\n- Snapshot tests keep passing despite broken functionality → See [testing-no-snapshot-only](reference/testing-no-snapshot-only.md)\n- Choosing end-to-end testing framework for Vue apps → See [testing-e2e-playwright-recommended](reference/testing-e2e-playwright-recommended.md)\n- Tests need to verify computed styles or real DOM events → See [testing-browser-vs-node-runners](reference/testing-browser-vs-node-runners.md)\n- Testing components created with defineAsyncComponent fails → See [async-component-testing](reference/async-component-testing.md)\n- Teleported modal content can't be found in wrapper queries → See [teleport-testing-complexity](reference/teleport-testing-complexity.md)\n\n## Reference\n\n- [Vue.js Testing Guide](https://vuejs.org/guide/scaling-up/testing)\n- [Vue Test Utils](https://test-utils.vuejs.org/)\n- [Vitest Documentation](https://vitest.dev/)\n- [Playwright Documentation](https://playwright.dev/)","tags":["vue","testing","best","practices","skills","antfu","agent-skills"],"capabilities":["skill","source-antfu","skill-vue-testing-best-practices","topic-agent-skills","topic-skills"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/antfu/skills/vue-testing-best-practices","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add antfu/skills","source_repo":"https://github.com/antfu/skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 4987 github stars · SKILL.md body (1,862 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:52:46.351Z","embedding":null,"createdAt":"2026-04-18T20:25:20.317Z","updatedAt":"2026-05-18T18:52:46.351Z","lastSeenAt":"2026-05-18T18:52:46.351Z","tsv":"'/)':214,219,224 '/guide/scaling-up/testing)':208 '3':40 'app':148 'approach':62 'async':73,111,122,182 'async-component-test':181 'await':74 'best':4,27 'blackbox':61 'break':52 'broken':130 'browser':169 'choos':139 'common':31 'complex':200 'compon':15,55,60,109,123,175,183 'compos':77,89 'comput':160 'condit':69 'content':188 'cover':10 'creat':176 'defineasynccompon':178 'despit':129 'document':216,221 'dom':164 'e2e':23,152 'end':141,143 'end-to-end':140 'error':99 'event':165 'fail':65,83,179 'flushpromis':75 'found':98,192 'framework':145 'function':131 'get':93 'gotcha':32 'guid':205 'helper':90 'hook':80 'infrastructur':37 'inject':82,94 'intermitt':66 'intern':56 'keep':51,127 'lifecycl':79 'mock':17 'modal':187 'need':157 'node':171 'pass':128 'pattern':19,29 'pinia':96,105 'playwright':21,153,220 'playwright.dev':223 'playwright.dev/)':222 'practic':5,28 'project':41 'queri':195 'race':68 'real':163 'recommend':46,154 'refactor':54 'refer':202 'reference/async-component-testing.md':185 'reference/teleport-testing-complexity.md':201 'reference/testing-async-await-flushpromises.md':76 'reference/testing-browser-vs-node-runners.md':173 'reference/testing-component-blackbox-approach.md':63 'reference/testing-composables-helper-wrapper.md':92 'reference/testing-e2e-playwright-recommended.md':155 'reference/testing-no-snapshot-only.md':138 'reference/testing-pinia-store-setup.md':108 'reference/testing-suspense-async-components.md':124 'reference/testing-vitest-recommended-for-vue.md':49 'render':115 'runner':172 'see':42,57,70,86,102,118,132,149,166,180,196 'set':34 'setup':107,112 'skill' 'skill-vue-testing-best-practices' 'snapshot':125,136 'source-antfu' 'store':106 'style':161 'suspens':121 'symbol':95 'teleport':186,198 'teleport-testing-complex':197 'test':3,9,13,16,18,24,26,33,36,44,50,59,64,72,85,88,101,104,117,120,126,134,144,151,156,168,174,184,199,204,210 'test-utils.vuejs.org':213 'test-utils.vuejs.org/)':212 'testing-async-await-flushpromis':71 'testing-browser-vs-node-runn':167 'testing-component-blackbox-approach':58 'testing-composables-helper-wrapp':87 'testing-e2e-playwright-recommended':150 'testing-no-snapshot-on':133 'testing-pinia-store-setup':103 'testing-suspense-async-compon':119 'testing-vitest-recommended-for-vu':43 'topic-agent-skills' 'topic-skills' 'use':6,78 'util':14,211 'verifi':159 'vitest':11,45,215 'vitest.dev':218 'vitest.dev/)':217 'vs':170 'vue':2,12,39,48,147,209 'vue-testing-best-practic':1 'vue.js':8,25,203 'vuejs.org':207 'vuejs.org/guide/scaling-up/testing)':206 'won':113 'wrapper':91,194","prices":[{"id":"81d03699-43f2-41c9-8b62-294add3111b2","listingId":"38f8daff-c2d3-4582-a62d-33de7aab45d5","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"antfu","category":"skills","install_from":"skills.sh"},"createdAt":"2026-04-18T20:25:20.317Z"}],"sources":[{"listingId":"38f8daff-c2d3-4582-a62d-33de7aab45d5","source":"github","sourceId":"antfu/skills/vue-testing-best-practices","sourceUrl":"https://github.com/antfu/skills/tree/main/skills/vue-testing-best-practices","isPrimary":false,"firstSeenAt":"2026-04-18T21:53:55.185Z","lastSeenAt":"2026-05-18T18:52:46.351Z"},{"listingId":"38f8daff-c2d3-4582-a62d-33de7aab45d5","source":"skills_sh","sourceId":"antfu/skills/vue-testing-best-practices","sourceUrl":"https://skills.sh/antfu/skills/vue-testing-best-practices","isPrimary":true,"firstSeenAt":"2026-04-18T20:25:20.317Z","lastSeenAt":"2026-05-07T22:40:16.451Z"}],"details":{"listingId":"38f8daff-c2d3-4582-a62d-33de7aab45d5","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"antfu","slug":"vue-testing-best-practices","github":{"repo":"antfu/skills","stars":4987,"topics":["agent-skills","skills"],"license":"mit","html_url":"https://github.com/antfu/skills","pushed_at":"2026-05-01T16:46:24Z","description":"Anthony Fu's curated collection of agent skills.","skill_md_sha":"c600b529219af11ff551f34865bdc0e7c6ef8fd8","skill_md_path":"skills/vue-testing-best-practices/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/antfu/skills/tree/main/skills/vue-testing-best-practices"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"vue-testing-best-practices","license":"MIT","description":"Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing."},"skills_sh_url":"https://skills.sh/antfu/skills/vue-testing-best-practices"},"updatedAt":"2026-05-18T18:52:46.351Z"}}