import * as React from 'react'; import { render } from '@testing-library/react'; import { ButtonClose } from '../index'; describe('ButtonClose', () => { it('should render correctly', () => { const wrapper = render(Helloworld); expect(() => wrapper.unmount()).not.toThrow(); }); it('ref should be forwarded', () => { const ref = React.createRef(); render(Helloworld); expect(ref.current).not.toBeNull(); }); });