Post

Ariakit has hundreds of component tests duplicated across happy-dom and Playwright. happy-dom is 6× faster, so humans and agents use it for quick feedback during dev. Playwright is authoritative and runs once when each task is complete. This setup has sped up development. Highly recommend it.

I recommend migrating from pure Playwright to Vitest Browser Mode. Components shouldn't need multi-page setups so Playwright is largely an overkill. With Vitest, you'lll be able to run the same test file against happy-dom and real browser, which is huge.

We may try that at some point, but we're not just testing components. We're also testing our examples, which cover all the use cases. Some involve page navigation and broader page context beyond the component itself.

1 repost2 likes

Got it. Yes, for things needing page navigation and deeper browser integrations, Playwright is still the best choice. For anything rest, migration to Vitest will be something you won't regret.