Socialify

Folder ..

Viewing header.test.tsx
14 lines (10 loc) • 301.0 B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import { render } from '@testing-library/react'

import Header from './header'

jest.mock('next/router', () => ({
  useRouter: jest.fn()
}))

test('Header renders', () => {
  const { container } = render(<Header />)
  const header = container.firstElementChild!

  expect(header).toMatchSnapshot()
})