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

describe('<SpreadSkeleton>', () => {
  it('renders the default skeleton', () => {
    const { container } = render(<SpreadSkeleton />)
    expect(container.firstChild).not.toBeNull()
  })

  it('renders the requested number of rows', () => {
    const { container } = render(<SpreadSkeleton count={2} />)
    expect(
      container.querySelectorAll('.MuiSkeleton-root').length,
    ).toBeGreaterThan(1)
  })
})
