We May Not Need Component Testing
summary
Compares Vitest + Vue Test Utils versus Playwright component testing using a tiny pizza-store demo (card and search components) and three scenarios each: toggle popover, render items, and remove item; Vitest mounts components, easily mocks composables and emits, runs fast but offers no real browser or CSS verification; Playwright runs in a real browser, verifies routing and visible styling and supports behavioral/accessibility flows, but mocking composables (and isolating remove-item) requires extra workarounds. Recommends Vitest for small isolated unit tests and Playwright for integration/visual needs.
AI-written summary · about
chapters (6)
- 0:00We May Not Need Component Testing
- 2:14Where should Component Testing belong?
- 4:44Unit test or Integration test?
- 5:01Demo app
- 7:09Demo
- 22:46Vitest vs Playwright
related talks
41mWe may not need component (unit) testing
13mComponent Testing with Playwright for Vue
32mPlaywright Component Tests: Are they the Testing-Library killer?
20mComponent Testing with Playwright
24mWriting Good Tests for Vue Applications
28mTestable Nuxt
28mTesting Web Applications with Playwright
24mCost-Effective Testing with Storybook and Playwright in Vue Applications
