<commit_before><commit_msg>FileTransferButtons のテストを追加。<commit_after>import React from 'react';
import {shallow} from 'enzyme';
import assert from 'assert';

import FileTransferButtons from '../FileTransferButtons';

describe('FileTransferButtons', () => {
  const wrapper = shallow(
    <FileTransferButtons
      onImageSelected={() => 'called onImageSelected'}
      previewImageDataUrl="called previewImageDataUrl"
      downloadImageFileName="called downloadImageFileName"
    />
  );
  it('UploadButtonとDownloadButtonがレンダリングされる', () => {
    assert(wrapper.find('UploadButton').length === 1);
    assert(wrapper.find('DownloadButton').length === 1);
  });
  it('porps.onImageSelectedがUploadButtonに渡される', () => {
    assert(
      wrapper.find('UploadButton').prop('onChange')() ===
        'called onImageSelected'
    );
  });
  it('porps.previewImageDataUrlとprops.downloadImageFileNameがDownloadButtonに渡される', () => {
    assert(
      wrapper.find('DownloadButton').prop('href') ===
        'called previewImageDataUrl'
    );
    assert(
      wrapper.find('DownloadButton').prop('download') ===
        'called downloadImageFileName'
    );
  });
});
{'fraction_non_alphanumeric': 0.15271786022433131, 'fraction_numerical': 0.001725625539257981, 'mean_word_length': 4.497630331753554, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5895655', 'n_tokens_mistral': 338, 'n_tokens_neox': 338, 'n_words': 48}