Vitest or Cypress? Why not both?!
summary
Argues that the same feature tests can run both in Cypress and Vitest by building a small driver interface (methods like findByLabelText, findByRole, findText, goTo) with two implementations: a Cypress driver that visits real pages and a Vitest driver that pushes routes into Vue Router and renders the app in Node DOM. Demo runs 1540 tests in about 15 seconds under Vitest while Cypress runs much slower, showing the bridge works and preserves fast feedback and browser confidence.
AI-written summary · about
chapters (10)
- 0:00Introduction to testing
- 1:57Test framework features
- 4:41End-to-end testing with Cypress
- 9:39The problem of slow tests
- 11:51Component testing with Vitest
- 14:31Risks of component testing
- 18:19Balancing speed and confidence
- 20:24Running the same tests twice
- 24:17Building a testing bridge
- 30:57Conclusion
related talks
22mCypress Component Testing
48mComponent Testing with Vite, Vue, and Cypress
38mComponent Testing with Vite, Vue, and Cypress
20mVitest: testing DX reimagined
53mTesting with Vite and the Cypress Component Test Runner
56mCypress: Where Automated Acceptance Testing Isn’t Just for QA Anymore
23mRun your end-to-end tests at light speed with Cypress
41mCypressIO
