<commit_before>import {textAreaTool} from '../textAreaTool';
import {shallow} from 'enzyme';

describe('textAreaTool', () => {
  describe('insertAtCaretGetText', () => {
    it('is defined', () => {
      //Assert
      expect(textAreaTool).not.to.be.undefined;
    });

    it('returns empty string passing textArea and caret equals empty', () => {
      //Arrange
      const textArea = new HTMLTextAreaElement();
      textArea.value = ''
      const caret = '';
      const offsetCursor = 0;

      //Act
      const result = textAreaTool.insertAtCaretGetText(textArea, caret, offsetCursor)

      //Assert
      expect(result).to.equal('');
    });
  });
});
<commit_msg>Fix create new textArea element in spec<commit_after>import {textAreaTool} from '../textAreaTool';
import {shallow} from 'enzyme';

describe('textAreaTool', () => {
  describe('insertAtCaretGetText', () => {
    it('is defined', () => {
      //Assert
      expect(textAreaTool).not.to.be.undefined;
    });

    it('returns empty string passing textArea and caret equals empty', () => {
      //Arrange
      const textArea = document.createElement("TEXTAREA") as HTMLTextAreaElement;
      textArea.value = ''
      const caret = '';
      const offsetCursor = 0;

      //Act
      const result = textAreaTool.insertAtCaretGetText(textArea, caret, offsetCursor)

      //Assert
      expect(result).to.equal('');
    });
  });
});

{'fraction_non_alphanumeric': 0.15531914893617021, 'fraction_numerical': 0.0014184397163120568, 'mean_word_length': 2.9523809523809526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4660581', 'n_tokens_mistral': 428, 'n_tokens_neox': 409, 'n_words': 91}