import { render, screen } from '@testing-library/react'
import { describe, expect, it } from 'vitest'

import PageTitle from '@/components/common/PageTitle'


describe ('PageTitle', () => {
  it ('renders children as a level 1 heading', () => {
    render (<PageTitle>Test title</PageTitle>)

    const heading = screen.getByRole ('heading', { level: 1 })

    expect (heading.textContent).toBe ('Test title')
  })
})
