import React from 'react'; import { render } from '@testing-library/react'; import { Chip } from '../Chip'; describe('Chip', () => { test('overflow', () => { const { asFragment } = render( 4 more ); expect(asFragment()).toMatchSnapshot(); }); test('closable', () => { const { asFragment } = render( Chip ); expect(asFragment()).toMatchSnapshot(); }); test('closable with tooltip', () => { const { asFragment } = render( 1234567890123456789 ); expect(asFragment()).toMatchSnapshot(); }); test('readonly', () => { const { asFragment } = render( 4 more ); expect(asFragment()).toMatchSnapshot(); }); test('custom max-width text', () => { const { asFragment } = render( 4 more ); expect(asFragment()).toMatchSnapshot(); }); test("with role='gridcell'", () => { const { asFragment } = render( I'm a roled chip ); expect(asFragment()).toMatchSnapshot(); }); });