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

describe('<FormulaSkeleton>', () => {
  it('renders the default single-row skeleton', () => {
    const { container } = render(<FormulaSkeleton />)
    expect(
      container.querySelectorAll('.MuiSkeleton-root').length,
    ).toBeGreaterThan(0)
  })

  it('renders multiple rows when count > 1', () => {
    const { container } = render(<FormulaSkeleton count={3} />)
    expect(container.firstChild).not.toBeNull()
    // Per-row Skeletons must scale with count.
    expect(
      container.querySelectorAll('.MuiSkeleton-root').length,
    ).toBeGreaterThan(1)
  })
})
