I've spent the last two years ripping out thousands of Jest snapshot tests that nobody was maintaining. They broke constantly on style changes, mocked everything so thoroughly they tested nothing, and gave false confidence.
Here's what actually matters: a few critical user flows with Playwright, real browser, real data. One test covering checkout is worth more than 50 component unit tests. We went from 8 minutes of CI time and constant flake to 2 minutes and actually catching bugs users care about.
// this matters
await page.goto('/checkout');
await page.fill('[name=email]', 'user@test.com');
await page.click('text=Place Order');
await expect(page).toHaveURL('/confirmation');
Stop mocking everything. Stop snapshot testing styles. One good e2e test beats a hundred unit tests that are just verifying your mock worked correctly.
No responses yet.