35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { render } from '@testing-library/react'
|
|
import { LoadingFallback } from '../LoadingFallback'
|
|
|
|
describe('LoadingFallback', () => {
|
|
it('renders without crashing for page variant', () => {
|
|
const { container } = render(<LoadingFallback variant="page" />)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
|
|
it('renders without crashing for card variant', () => {
|
|
const { container } = render(<LoadingFallback variant="card" />)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
|
|
it('renders without crashing for list variant', () => {
|
|
const { container } = render(<LoadingFallback variant="list" />)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
|
|
it('renders without crashing for chart variant', () => {
|
|
const { container } = render(<LoadingFallback variant="chart" />)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
|
|
it('renders without crashing for chat variant', () => {
|
|
const { container } = render(<LoadingFallback variant="chat" />)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
|
|
it('defaults to page variant when no variant is specified', () => {
|
|
const { container } = render(<LoadingFallback />)
|
|
expect(container.firstChild).toBeInTheDocument()
|
|
})
|
|
})
|