55afe80c31
Fixes #16864 The `router` can be missing in a test environment when trying to render a `Link` component. This PR bails out of `router.prefetch()` when `router` is missing. The alternative is for users to mock `next/link` or to mock the `router` and wrap their test components. Please let me know any feedback. |
||
---|---|---|
.. | ||
create-next-app | ||
eslint-plugin-next | ||
next | ||
next-bundle-analyzer | ||
next-codemod | ||
next-env | ||
next-mdx | ||
next-plugin-google-analytics | ||
next-plugin-sentry | ||
next-plugin-storybook | ||
next-polyfill-module | ||
next-polyfill-nomodule | ||
react-dev-overlay | ||
react-refresh-utils |