import React from 'react' import { render } from '@testing-library/react' import IconButton from './IconButton' describe('IconButton', () => { const testId = 'store-icon-button' it('data-store-icon-button is present', () => { const { getByTestId } = render( foo} /> ) const iconButton = getByTestId(testId) expect(iconButton).toBeInTheDocument() expect(iconButton).toHaveAttribute('data-store-icon-button') }) it('icon is present', () => { const { getByTestId } = render( foo} /> ) expect(getByTestId('icon')).toBeInTheDocument() }) })