rusty1s/react-dev-config

View on GitHub
demo/dist/components/Title/title.test.js

Summary

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

import Title from './index';

test('renders without crashing', function () {
  var title = shallow(React.createElement(Title, { text: 'Dummy text' }));

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