<commit_before>'use strict';

import React from 'react';
import MalarkeyComponent from '../index';
import {describeWithDOM, mount, spyLifecycle} from 'enzyme';

import {expect} from 'chai';

describe('MalarkeyComponent', () => {
  describeWithDOM('MalarkeyComponent DOM', () => {
    it('should mount', () => {
      spyLifecycle(MalarkeyComponent);
      mount(<MalarkeyComponent />);
      expect(MalarkeyComponent.prototype.componentDidMount.calledOnce).to.be.true;
    });
  });
});<commit_msg>Add shallow DOM test<commit_after>'use strict';

import React from 'react';
import MalarkeyComponent from '../index';
import {shallow, describeWithDOM, mount, spyLifecycle} from 'enzyme';

import {expect} from 'chai';

describe('MalarkeyComponent', () => {
  it('should render a <div />', () => {
    const wrapper = shallow(<MalarkeyComponent />);
    expect(wrapper.find('div')).to.have.length(1);
  });
});

describeWithDOM('MalarkeyComponent DOM', () => {
  it('should mount', () => {
    spyLifecycle(MalarkeyComponent);
    mount(<MalarkeyComponent />);
    expect(MalarkeyComponent.prototype.componentDidMount.calledOnce).to.be.true;
  });
});
{'fraction_non_alphanumeric': 0.17247386759581881, 'fraction_numerical': 0.0008710801393728223, 'mean_word_length': 5.015706806282722, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 14, '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': '2440733', 'n_tokens_mistral': 357, 'n_tokens_neox': 350, 'n_words': 68}