rusty1s/react-dev-config

View on GitHub
demo/src/components/Title/title.test.jsx

Summary

Maintainability
A
3 hrs
Test Coverage
import React from 'react';
import { shallow } from 'enzyme';

import Title from './index';

test('renders without crashing', () => {
  const title = shallow(<Title text="Dummy text" />);

  expect(title.find('h1')).toHaveLength(1);
  expect(title.hasClass('main')).toBeTruthy();
  expect(title.text()).toBe('Dummy text');
});