<commit_before>import getDefinition from './getDefinition.js';
import deliberately from './../../mocks/deliberately';
import set from './../../mocks/set';
import R from 'ramda';

describe('getDefinition', () => {
  it('gets correct definitions for "deliberately" entry', () => {
    expect(
      R.map(getDefinition, deliberately.sensesMarkup)
    ).toEqual([
      'done in a way that is intended or planned',
      'done or said in a slow careful way'
    ])
  });

  it('gets correct definitions for "set" second entry', () => {
    expect(
      R.map(getDefinition, set.sensesMarkup2)
    ).toEqual([
      'a group of similar things that belong together or are related in some way',
      'a television, or a piece of equipment for receiving radio signals',
      'a place where a film or television programme is filmed',
      'the scenery, furniture etc used on a stage in a play or in the place where a film or television show is being made',
      'one part of a game such as tennis or volleyball',
      'a group of people who are similar in some way and spend time together socially',
      '',
      'a performance by a singer, band, or disc jockey',
      'a group of numbers, shapes etc in mathematics',
      'a group of children who are taught a particular school subject together because they have the same level of ability in that subject',
      'a small onion that you plant in order to grow bigger ones'
    ])
  });
});<commit_msg>feature: write better tests for getDefinition<commit_after>import getDefinition from './getDefinition.js';
import set from './../../mocks/set';

describe('getDefinition', () => {
  it('gets correct definition for normal sense', () => {
    expect(
      getDefinition(set.sensesMarkup2[0])
    ).toEqual('a group of similar things that belong together or are related in some way')
  });

  it('gets correct definitions for crossref sense', () => {
    expect(
      getDefinition(set.sensesMarkup2[6])
    ).toEqual('')
  });

  xit('gets correct definitions for sense with subsenses', () => {
    expect(
      getDefinition(set.sensesMarkup1[1])
    ).toEqual('if a doctor sets a broken bone, he or she moves it into position so that the bone can grow together again\nOR\nif a broken bone sets, it joins together again')
  });
});
{'fraction_non_alphanumeric': 0.11018801923917797, 'fraction_numerical': 0.003060778312199388, 'mean_word_length': 3.292682926829268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 10, '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': '5452743', 'n_tokens_mistral': 615, 'n_tokens_neox': 606, 'n_words': 275}