UNPKG

react-event-calendar

Version:

React JS component that will display supplied event data within a calendar view of a given month.

25 lines (17 loc) 666 B
jest.unmock('../src/components/CalendarTitle'); import React from 'react'; import ReactDOM from 'react-dom'; import TestUtils from 'react-addons-test-utils'; import CalendarTitle from '../src/components/CalendarTitle'; describe('CalendarTitle', () => { let component; let node; beforeEach(() => { component = TestUtils.renderIntoDocument(<div><CalendarTitle title="Sunday"/></div>); node = ReactDOM.findDOMNode(component); }); it('displays a title supplied', () => { // Verify that its textContent is "Sunday" expect(node.querySelector('div').textContent).toBe('Sunday'); }) })