UNPKG

@swrve/core

Version:

Core set of Swrve UI Components

22 lines (17 loc) 610 B
import React from 'react' import { render } from '@testing-library/react' import Loader from '../loader' describe('<Loader/>', () => { it('should render correctly', () => { const { container } = render(<Loader />) expect(container).toMatchSnapshot() }) it('should accept additional css classes from props', () => { const { container } = render(<Loader use="secondary" className="p-8" />) expect(container).toMatchSnapshot() }) it('should handle additional props', () => { const { container } = render(<Loader id="mySpinner" />) expect(container).toMatchSnapshot() }) })