<commit_before>import { mount } from 'enzyme';
import React from 'react';
import ConfirmMessage from '../src/components/ConfirmMessage';
import Button from '../src/components/Button';

describe('ConfirmMessage', () => {
  let wrapper;
  const onClick = jest.fn();

  describe('prop "popup.pop" is false ', () => {
    const popup = { pop: false };
    beforeEach(() => {
      wrapper = mount(<ConfirmMessage popup={popup} onClick={onClick} />);
    });

    it('should be defined', () => {
      expect(wrapper).toBeDefined();
    });

    it('should  not render', () => {
      expect(wrapper.find('div').length).toBe(0);
    });
  });

  describe('prop "popup.pop" is true', () => {
    const popup = { pop: true };
    beforeEach(() => {
      wrapper = mount(<ConfirmMessage popup={popup} onClick={onClick} />);
    });

    it('should be defined', () => {
      expect(wrapper).toBeDefined();
    });

    it('should render', () => {
      expect(wrapper.find('div').length).toBeGreaterThan(0);
    });

    it('should have two Button-components', () => {
      expect(wrapper.find(Button).length).toBe(2);
    });

    it("should receive pop object as prop 'popup'", () => {
      const prop = wrapper.props().popup;
      expect(prop).toBeDefined();
    });<commit_msg>removed old describe block<commit_after>import { mount } from 'enzyme';
import React from 'react';
import ConfirmMessage from '../src/components/ConfirmMessage';
import Button from '../src/components/Button';

describe('ConfirmMessage', () => {
  let wrapper;
  const onClick = jest.fn();

  describe('prop "popup.pop" is true', () => {
    const popup = { pop: true };
    beforeEach(() => {
      wrapper = mount(<ConfirmMessage popup={popup} onClick={onClick} />);
    });

    it('should be defined', () => {
      expect(wrapper).toBeDefined();
    });

    it('should render', () => {
      expect(wrapper.find('div').length).toBeGreaterThan(0);
    });

    it('should have two Button-components', () => {
      expect(wrapper.find(Button).length).toBe(2);
    });

    it("should receive pop object as prop 'popup'", () => {
      const prop = wrapper.props().popup;
      expect(prop).toBeDefined();
    });
{'fraction_non_alphanumeric': 0.19516643866849065, 'fraction_numerical': 0.002279981760145919, 'mean_word_length': 3.2192307692307693, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 24, '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': '1347372', 'n_tokens_mistral': 655, 'n_tokens_neox': 631, 'n_words': 140}