/* eslint-disable jest/require-top-level-describe */
import { render } from '@testing-library/react';
import React from 'react';
import { ModalContent } from './modal-content';
import { ModalContentSize } from './modal-content.types';
describe('ModalContent', () => {
it('should render with text inside the ModalContent', () => {
const { getByText } = render(test);
expect(getByText('test')).toBeDefined();
expect(getByText('test')).toHaveClass('mm-modal-content');
});
it('should match snapshot', () => {
const { container } = render(test);
expect(container).toMatchSnapshot();
});
it('should render with and additional className', () => {
const { getByText } = render(
test,
);
expect(getByText('test')).toHaveClass('test-class');
});
it('should render with size sm', () => {
const { getByText } = render(
<>
default
sm
>,
);
expect(getByText('sm')).toHaveClass('mm-modal-content--size-sm');
expect(getByText('default')).toHaveClass('mm-modal-content--size-sm');
});
it('should render with a ref', () => {
const ref = React.createRef();
render(test);
expect(ref.current).toBeDefined();
});
});