import React from 'react'; import { mount } from '../../utils/test-enzyme'; import Spinner from './Spinner'; import { Circular, Wrapper } from './styles'; describe(' component', () => { test('should render the component in default state', () => { const wrapper = mount(); const wrapperComponent = wrapper.find(Wrapper); const circular = wrapper.find(Circular); expect(circular.props().size).toBe(50); expect(wrapperComponent.props().centered).toBe(false); }); test('should render the component in custom state', () => { const wrapper = mount(); const wrapperComponent = wrapper.find(Wrapper); const circular = wrapper.find(Circular); expect(circular.props().size).toBe(10); expect(wrapperComponent.props().centered).toBe(true); expect(wrapper.html()).toMatchSnapshot(); }); });