Testing Astro Components with Testing Library (Without Breaking Everything Along the Way)
Testing Astro components with Testing Library seems straightforward until you hit a conflict between jsdom and esbuild that crashes the environment before a single test runs. In this article I explain the root cause, why the obvious fixes don't work, and how to solve it with a 20-line pattern that instantiates JSDOM locally — just like React Testing Library does internally.
Leer artículo →