Technical notes on web development, DevOps, and AI integration.
1 article
Vitest refuses to render components under Vite 8? Make the source files the test data: lock the rating flag invariant with toContain.
TL;DR: Vitest could not transform JSX after Vite 8 moved to rolldown and oxc without a React plugin, breaking the entity card render test. Instead the author added a text tripwire that reads source files and asserts rating_enabled !== false on six surfaces. It checks code shape not runtime, so integration tests verify the flag gates display without leaking rating data.