rsc-testing

Example Next.js project testing React Server Components with React Testing Library in Vitest

Stars
8

This is an example Next.js project testing React Server Components with React Testing Library in Vitest.

It follows my workarounds for React Server Components .

Using Jest? See the Jest branch.

Getting Started

Install dependencies and run tests:

npm install-test

You can also run the Next.js server:

npm run dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.