<commit_before>jest.dontMock('../Calendar');

var moment = require('moment');
var React = require('react/addons');
var TU = React.addons.TestUtils;
var Calendar = require('../Calendar');


describe('Calendar', function() {

    var calendar = TU.renderIntoDocument(
        <Calendar date={moment("03/04/2015", "DD/MM/YYYY")} />
    );


    it('displays the correct month', function() {
        console.info('displays the correct month');
        var month = TU.findRenderedDOMComponentWithClass(calendar, 'month');
        expect(month.getDOMNode().textContent).toEqual('April');
    });


    it('displays the correct year', function() {
        console.info('displays the correct year');
        var month = TU.findRenderedDOMComponentWithClass(calendar, 'year');
        expect(month.getDOMNode().textContent).toEqual('2015');
    });


});<commit_msg>calendar test<commit_after>jest.dontMock('../Calendar');

var moment = require('moment');
var React = require('react/addons');
var TU = React.addons.TestUtils;
var Calendar = require('../Calendar');


describe('Calendar', function() {

    var calendar = TU.renderIntoDocument(
        <Calendar date={moment("03/04/2015", "DD/MM/YYYY")} />
    );


    it('displays the correct month', function() {
        console.info('displays the correct month');
        var month = TU.findRenderedDOMComponentWithClass(calendar, 'month');
        expect(month.getDOMNode().textContent).toEqual('April');
    });


    it('displays the correct year', function() {
        console.info('displays the correct year');
        var month = TU.findRenderedDOMComponentWithClass(calendar, 'year');
        expect(month.getDOMNode().textContent).toEqual('2015');
    });


    it('should be able to go to previous month', function() {
        var previous = TU.findRenderedDOMComponentWithClass(calendar, 'previous');
        TU.Simulate.click(previous);
        var month = TU.findRenderedDOMComponentWithClass(calendar, 'month');
        expect(month.getDOMNode().textContent).toEqual('March');
    });

});
{'fraction_non_alphanumeric': 0.15974596971177332, 'fraction_numerical': 0.01172447484123107, 'mean_word_length': 3.7517401392111367, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6536491', 'n_tokens_mistral': 624, 'n_tokens_neox': 579, 'n_words': 118}