<commit_before>/** @jsx React.DOM */

jest.dontMock('../src/date_input.jsx');

React = require('react/addons');
var TestUtils = React.addons.TestUtils;
var DateInput = require('../src/date_input.jsx');

describe('DateInput', function() {
  it('triggers an event handler when the Enter key is pressed', function() {
    var dateMock = { format: function(){} };
    var handlerCalled = false;
    var enterHandler = function() {
      handlerCalled = true;
    };

    runs(function(){
      var dateInput = TestUtils.renderIntoDocument(<commit_msg>Don't have global vars in date_input_test<commit_after>/** @jsx React.DOM */

jest.dontMock('../src/date_input.jsx');

describe('DateInput', function() {
  var React, TestUtils, DateInput;

  beforeEach(function() {
    React = require('react/addons');
    TestUtils = React.addons.TestUtils;
    DateInput = require('../src/date_input.jsx');
  });

  it('triggers an event handler when the Enter key is pressed', function() {
    var dateMock = { format: function(){} };
    var handlerCalled = false;
    var enterHandler = function() {
      handlerCalled = true;
    };

    runs(function(){
      var dateInput = TestUtils.renderIntoDocument(
{'fraction_non_alphanumeric': 0.14824120603015076, 'fraction_numerical': 0.0, 'mean_word_length': 3.742063492063492, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2452019', 'n_tokens_mistral': 368, 'n_tokens_neox': 365, 'n_words': 89}