import { forEach } from 'ramda';
import { List } from 'semantic-ui-react';

import formats from '.';
import Newline from './Newline';

describe('formats module', () => {
  const testCases = [
    { type: 'br', format: Newline },
    { type: 'li', format: List.Item },
    { type: 'ol', format: List.List },
    { type: 'ul', format: List.List },
  ];

  forEach(({ type, format }) => {
    it(`returns the correct format component for the "${type}" type`, () => {
      expect(formats[type]).toBe(format);
    });
  }, testCases);
});
