// @flow
import React from 'react';
import { mountWrappedComponent } from '../../../utils/tests';

import type { InlineStyledTextProps } from './inline-styled-text.proptypes';
import { InlineStyledText } from './index';

const DEFAULT_PROPS: InlineStyledTextProps = {
  text: 'This is a sentence with [[styled text]] and [[even more here]]',
  baseSpanProps: { fontSize: 'f5' },
  inlineSpanProps: {
    casing: 'uppercase',
    colorName: 'brand-primary-base',
  },
};

describe('InlineStyledText', () => {
  describe('snapshot', () => {
    it('matches the previous snapshot', () => {
      const inlineStyledText = mountWrappedComponent(
        <InlineStyledText {...DEFAULT_PROPS} />,
      );
      expect(inlineStyledText).toMatchSnapshot();
    });
  });
});
