import { render } from '@testing-library/react'; import { RouterContext } from 'next/dist/shared/lib/router-context'; import { NextRouter } from 'next/router'; import * as React from 'react'; import { Footer } from './Footer'; import { githubUrl } from './utils'; const withTestRouter = (tree: React.ReactElement, router: Partial = {}) => ( {tree} ); describe('DocumentationFooter', () => { test('displays default links', () => { const router = { asPath: '/', pathname: '/example/' }; const { container } = render(withTestRouter(