import Subtitle from './Subtitle.component';

describe('<Heading>', () => {
  it('Happy: Render Subtitle', () => {
    const wrapper = shallow(<Subtitle variation="special">Test</Subtitle>);
    expect(wrapper).toHaveLength(1);

    const json = renderJSON(<Subtitle variation="special">Test</Subtitle>);
    expect(json.type).toBe('div');
  });

  it('Happy: Render Subtitle without variation', () => {
    const json = renderJSON(<Subtitle>Test</Subtitle>);
    expect(json.type).toBe('div');
  });

  it('SAD: without props', () => {
    expect(() => shallow(<Subtitle />)).toThrow();
  });
});
