import React from 'react';
import ShallowRenderer from 'react-test-renderer/shallow';
import { GenericText } from './text';

describe('text component', () => {
  it('renders expected tag', () => {
    const renderer = new ShallowRenderer();
    renderer.render((<GenericText tag="span">Test</GenericText>));
    const result = renderer.getRenderOutput();

    expect(result.type).toEqual('span');
    expect(result.props.children).toEqual('Test');
  });
});
