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

describe('Skeleton', () => {
  it('variant="text" (default) renders with aria-hidden="true" and role="presentation"', () => {
    const { container } = render(<Skeleton />)
    const skeleton = container.querySelector('[role="presentation"]')
    expect(skeleton).toBeTruthy()
    expect(skeleton?.getAttribute('aria-hidden')).toBe('true')
  })

  it('variant="circle" renders with rounded-full in its className (edge: circle shape)', () => {
    const { container } = render(<Skeleton variant="circle" />)
    const skeleton = container.querySelector('[role="presentation"]') as HTMLElement
    expect(skeleton.className).toContain('rounded-full')
  })
})
