<commit_before><commit_msg>[add] textarea test<commit_after>import React from 'react';
import sinon from 'sinon';
import { shallow, mount, render } from 'enzyme';

import Textarea from './Textarea';

describe('components/atoms/button', function() {
  it('should have "textarea" class', function() {
    expect(shallow(<Textarea value="test" />).hasClass('textarea')).toEqual(true);
  });
  it('should have value', function() {
    expect(shallow(<Textarea value="test" />).prop('value')).toEqual('test');
  });
  it('simulates change events', function() {
    const onChange = sinon.spy();
    const textarea = shallow(<Textarea inputUpdate={onChange} />);
    textarea.simulate('change', {target : {value : 'test'}});
    expect(onChange.lastCall.args[0]).toEqual('test');
  });
});
{'fraction_non_alphanumeric': 0.194125159642401, 'fraction_numerical': 0.001277139208173691, 'mean_word_length': 5.426229508196721, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '2485713', 'n_tokens_mistral': 243, 'n_tokens_neox': 239, 'n_words': 53}