Watching @jess.sh's Vitest browser mode talk at @viteconf.org immediately made me want to build an Astro renderer. Testing isolated Astro components in real browsers is a real prize. It took a bit of work, and still does't support Vitest 4, but I have I working package. Give it a try:
github.com
GitHub - ascorbic/vitest-browser-astro: Test Astro components in real browsers with Vitest Browser Mode
Test Astro components in real browsers with Vitest Browser Mode - ascorbic/vitest-browser-astro