Next.js
End-to-End Testing Next.js with Playwright
Unit tests verify that individual functions and components work correctly.
Next.js
Unit tests verify that individual functions and components work correctly.
Test Automation
React Server Components (RSC) are a genuinely new primitive — they run only on the server, can be async, and never ship JavaScript to the browser. They're also one of the hardest things to unit-test in a Next.js application. The core problem: Jest runs in Node.js
Testing
React and Next.js have become the default stack for building multilingual web apps, with libraries like react-i18next, next-intl, and react-intl handling the heavy lifting. But a common mistake is writing no tests for the i18n layer itself — assuming that if translations load, everything works. This guide
Testing
Next.js has built-in i18n routing, but testing it is non-trivial. The routing behavior depends on request headers, cookies, the next.config.js configuration, and your chosen URL strategy. This guide covers unit testing locale-aware pages, integration testing routing logic, and end-to-end Playwright tests that
Testing
NextAuth.js v5 (now called Auth.js) is a significant rewrite that embraces Next.js App Router and Edge runtime.
Test Automation
Partial Prerendering (PPR) is Next.js 15's hybrid rendering strategy: the static shell of a page is served instantly from the CDN edge, while dynamic content streams in behind Suspense boundaries. A single page can have both a prerendered header and a live-fetched product listing — without a
Test Automation
Next.js 15 App Router introduced a file-based convention that determines how your application behaves in loading, error, and layout states.
Testing
tRPC's createCaller() lets you call router procedures directly in tests — no HTTP server, no fetch mocking, no supertest. You inject the context (auth session, database client) yourself, which means you can test authenticated and unauthenticated flows, input validation, middleware enforcement, and error handling with plain function calls. This
Test Automation
Next.js gives you a lot out of the box: routing, server components, API routes, middleware, server actions.