EraCode practice

Mock Next.js navigation in a client-component test

Next.jsintermediateMulti-Part

Summary

Quick daily practice on testing Next.js client components: mock the App Router navigation hook so you can assert route changes without a real browser.

Problem preview

### Goal Make this unit test pass by mocking Next.js App Router navigation. - The should call when clicked. - Fill **exactly one** missing piece to provide a working mock for . - Happy path only (no …

Attempt this challenge

Sign in to attempt the full challenge with timed AI grading, hints, and test feedback.

Mock Next.js navigation in a client-component test | Next.js practice | EraCode