import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import DateSubheader from '../DateSubheader.vue'

describe('DateSubheader', () => {
  it('renders the date label as an h3', () => {
    const wrapper = mount(DateSubheader, { props: { label: 'Wed, 12 Mar' } })
    const h3 = wrapper.find('h3')
    expect(h3.exists()).toBe(true)
    expect(h3.text()).toBe('Wed, 12 Mar')
  })

  it('applies the date-subheader class', () => {
    const wrapper = mount(DateSubheader, { props: { label: 'Fri, 14 Mar' } })
    expect(wrapper.find('.date-subheader').exists()).toBe(true)
  })
})
