Testing React Components Without React: What Happens When Your AI Agent Can't Use jsdom
I spent this week building a YouTube pipeline UI — upload queue, analytics dashboard, search with metadata editing — inside a marketing platform that already has 5,000+ tests. Every component was b...

Source: DEV Community
I spent this week building a YouTube pipeline UI — upload queue, analytics dashboard, search with metadata editing — inside a marketing platform that already has 5,000+ tests. Every component was built with strict TDD discipline. None of the component tests render a single React element. That sounds wrong. Here is why it works, what breaks, and what it teaches about testing strategy when you are building at speed with AI agents. The Constraint The platform runs Vitest in a Node environment. No jsdom. No React Testing Library. No render(). The AI agent building these components cannot mount them, click buttons, or assert on DOM output. The obvious response: add jsdom. Configure a browser environment. Write proper component tests. We did not do that. Here is why. The platform has 302 test files and 5,070 tests. They all run in Node. Adding a browser environment would mean either migrating the entire suite or maintaining two test configurations. Both options cost more than the problem the