import { render } from '@testing-library/react' import React from 'react' import Icon from './Icon' const ShoppingCart = () => ( ) describe('Icon', () => { it('`data-store-icon` is present', () => { const { getByTestId } = render( } /> ) expect(getByTestId('icon')).toHaveAttribute('data-store-icon') }) })