Bujidao
|
fb5d9d0eea
|
feat(rules): add Vue testing rules
Add rules/vue/testing.md:
- Vitest + Vue Test Utils + @pinia/testing stack
- Component mounting (mount vs shallowMount), stubs and mocks
- Composable testing with effectScope and mountComposable helper
- Pinia store testing pattern (setActivePinia + )
- Vue Router testing with createMemoryHistory
- Async assertion pitfalls (flushPromises/nextTick)
- Testing implementation details vs rendered output
- Coverage thresholds: 80%+ for composables/stores, smoke tests for components
- Vitest configuration with jsdom environment and v8 coverage
|
2026-06-12 17:54:09 +08:00 |
|