<commit_before>import React from 'react';
import { mount } from 'enzyme';
import './i18n';
import { Translation } from '../src/Translation';

jest.unmock('../src/Translation');

describe('Translation', () => {
  function TestComponent() {
    return <Translation>{t => <div>{t('key1')}</div>}</Translation>;
  }

  it('should render correct content', () => {
    const wrapper = mount(<TestComponent />);
    // console.log(wrapper.debug());
    expect(wrapper.contains(<div>test</div>)).toBe(true);<commit_msg>Translation.spec.js, using toMatchInlineSnapshot, 1 test suite<commit_after>import React from 'react';
import { render, screen } from '@testing-library/react';
import './i18n';
import { Translation } from '../src/Translation';

jest.unmock('../src/Translation');

describe('Translation', () => {
  function TestComponent() {
    return <Translation>{t => <div>{t('key1')}</div>}</Translation>;
  }

  it('should render correct content', () => {
    const { container } = render(<TestComponent />);
    // screen.debug()
    expect(container.firstChild).toMatchInlineSnapshot(`
      <div>
        test
      </div>
    `);
{'fraction_non_alphanumeric': 0.19593998234774934, 'fraction_numerical': 0.00617828773168579, 'mean_word_length': 4.108108108108108, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 23, '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': '6056616', 'n_tokens_mistral': 340, 'n_tokens_neox': 328, 'n_words': 68}