import React from 'react';
import { shallow, mount } from 'enzyme';
import { Jumbotron } from '../';
describe('Jumbotron', () => {
it('should render children', () => {
const wrapper = shallow(Hello World);
expect(wrapper.text()).toBe('Hello World');
});
it('should render elements as children', () => {
const wrapper = mount(Hello from h1
);
expect(wrapper.find('h1').hostNodes().length).toBe(1);
expect(wrapper.find('h1').hostNodes().text()).toBe('Hello from h1');
});
it('should have class jumbotron', () => {
const wrapper = shallow(Hello);
expect(wrapper.hasClass('jumbotron')).toBe(true);
});
it('should render fluid jumbotron', () => {
const wrapper = shallow(Hello);
expect(wrapper.hasClass('jumbotron')).toBe(true);
expect(wrapper.hasClass('jumbotron-fluid')).toBe(true);
});
it('should render custom class', () => {
const wrapper = shallow(Hello);
expect(wrapper.hasClass('custom-class')).toBe(true);
});
});