I rarely use Jest or Vitest for UI testing anymore
I rarely use Jest or Vitest for UI testing anymore.
Here's why:
Testing in a real browser using Playwright or Cypress gives me more confidence, more power, and a better DX.
Testing UI components via Jest or Vitest tends to lead to duplicated effort, because I still need to integration test all features in a real browser to know it works.
So, I primarily use Jest/Vitest to test logic such as pure functions. Otherwise, I favor Playwright or Cypress.