If the component uses `useRouter()` hook, tests will fail because the hook will be null/undefined. Jest has `jest.spyOn` to mock it (reference - https://jamespotz.github.io/blog/how-to-mock-userouter). It would be helpful to have something similar here.
If the component uses
useRouter()hook, tests will fail because the hook will be null/undefined.Jest has
jest.spyOnto mock it (reference - https://jamespotz.github.io/blog/how-to-mock-userouter). It would be helpful to have something similar here.