Example files and tests for dev.to article How to mock Next router with Jest. The example is build on create-next-app. So you can just run npm run dev to run the example or npm run test to run the test files.