import { render } from '@testing-library/react'
import { CircularProgress } from 'components/CircularProgress'
import useStore from 'store'
describe('', () => {
afterAll(() => {
useStore.clearState()
})
it('should render', () => {
const { container } = render()
expect(container).toBeInTheDocument()
})
it('should render `...` when animations disabled', () => {
useStore.setState({ enableAnimations: false })
const { getByText } = render()
const threeDots = getByText('...')
expect(threeDots).toBeInTheDocument()
})
it('should render the component with animation classes when animations enabled', () => {
useStore.setState({ enableAnimations: true })
const { container } = render()
const progressWithAnimations = container.querySelector('.animate-progress')
expect(progressWithAnimations).toBeInTheDocument()
})
})