{"repo":"storybookjs/vitest-plugin-rsc","free":true,"listed":false,"github":"https://github.com/storybookjs/vitest-plugin-rsc","clone":"git clone https://github.com/storybookjs/vitest-plugin-rsc.git","description":"Render React Server Components in Vitest Browser Mode.","language":"TypeScript","stars":54,"topics":["nextjs","react","react-server-components","rsc","testing","vite","vitest","vitest-plugin"],"license":"MIT","category":"dev-tools","readme_excerpt":"vitest-plugin-rsc Render React Server Components in Vitest Browser Mode. vitest-plugin-rsc runs the RSC side of your component test in Vitest Browser Mode. The Server Component still goes through the RSC transform and Flight serialization, but it executes in the same browser test runtime as your assertions. That unlocks a kind of test unit tests and E2E tests can't easily reach: DB → RSC → pixels → actions → DB → pixels. One slice at a time. Pick one piece of the app — a wishlist carousel, a notes form, a settings panel, or a full page.tsx route. Seed exactly the state that piece needs, render it, interact with the hydrated UI in a real browser, run Server Actions, and assert the rerendered result. Table Of Contents - Why This Exists - What You Get - Requirements - Next.js Version Support - Quick Start - Install - Register The Plugin - Boot The Runtime - Browser-Compatible Server Code - Test Concurrency - Example: Server Action Form - Example: Drizzle + PGlite Setup - Next.js App Router Helpers - Router Hooks And Links - Request Headers And Cookies - Cache And Revalidation - Playgrounds - Architecture Why This Exists Covering every state with only E2E is usually impractical. E2E runs are slow because each test has to drive the UI into the state you want to assert against, hard to parallelize because tests share infrastructure, and flaky because they aren't isolated. Validation errors, user roles, locales, feature flags, loading/empty/error states, time-dependent UI — most of ","default_branch":null,"files":null,"tree":[],"storefront":"/r/storybookjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/storybookjs/vitest-plugin-rsc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}