<commit_before>import * as types from '../../../../../app/renderer/src/actions/types';
import * as actions from '../../../../../app/renderer/src/actions/creators';

describe('action creators', () => {
  it('should create an action to reset the query', () => {
    const expectedAction = {
      type: types.RESET_QUERY,
    };
    expect(actions.resetQuery()).toEqual(expectedAction);
  });

  it('should create an action to update the query', () => {
    const expectedAction = {
      type: types.UPDATE_QUERY,
      q: 'foo',
    };
    expect(actions.updateQuery('foo')).toEqual(expectedAction);
  });

  it('should create an action to update the results', () => {
    const results = [
      {
        title: 'Foo 1',
        subtitle: 'Bar 1',
      },
      {
        title: 'Foo 2',
        subtitle: 'Bar 2',
      },
    ];
    const expectedAction = {
      type: types.UPDATE_RESULTS,
      results,
    };
    expect(actions.updateResults(results)).toEqual(expectedAction);
  });

  it('should create an action to reset the results', () => {
    const expectedAction = {
      type: types.RESET_RESULTS,
    };
    expect(actions.resetResults()).toEqual(expectedAction);
  });

  it('should create an action to reset the selected item', () => {
    const expectedAction = {
      type: types.RESET_SELECTED_ITEM,
    };
    expect(actions.resetSelectedItem()).toEqual(expectedAction);
  });

  it('should create an action to select the previous item', () => {
    const expectedAction = {
      type: types.SELECT_PREVIOUS_ITEM,
    };
    expect(actions.selectPreviousItem()).toEqual(expectedAction);
  });

  it('should create an action to select the next item', () => {
    const expectedAction = {
      type: types.SELECT_NEXT_ITEM,
    };
    expect(actions.selectNextItem()).toEqual(expectedAction);
  });

  it('should create an action to set the theme', () => {
    const expectedAction = {
      type: types.SET_THEME,
      theme: 'foo-theme',
    };
    expect(actions.setTheme('foo-theme')).toEqual(expectedAction);
  });
});<commit_msg>tests/specs for missing action creators (#82)<commit_after>import * as types from '../../../../../app/renderer/src/actions/types';
import * as actions from '../../../../../app/renderer/src/actions/creators';

describe('action creators', () => {
  it('should create an action to reset the query', () => {
    const expectedAction = {
      type: types.RESET_QUERY,
    };
    expect(actions.resetQuery()).toEqual(expectedAction);
  });

  it('should create an action to update the query', () => {
    const expectedAction = {
      type: types.UPDATE_QUERY,
      q: 'foo',
    };
    expect(actions.updateQuery('foo')).toEqual(expectedAction);
  });

  it('should create an action to update the results', () => {
    const results = [
      {
        title: 'Foo 1',
        subtitle: 'Bar 1',
      },
      {
        title: 'Foo 2',
        subtitle: 'Bar 2',
      },
    ];
    const expectedAction = {
      type: types.UPDATE_RESULTS,
      results,
    };
    expect(actions.updateResults(results)).toEqual(expectedAction);
  });

  it('should create an action to reset the results', () => {
    const expectedAction = {
      type: types.RESET_RESULTS,
    };
    expect(actions.resetResults()).toEqual(expectedAction);
  });

  it('should create an action to reset the selected item', () => {
    const expectedAction = {
      type: types.RESET_SELECTED_ITEM,
    };
    expect(actions.resetSelectedItem()).toEqual(expectedAction);
  });

  it('should create an action to select the previous item', () => {
    const expectedAction = {
      type: types.SELECT_PREVIOUS_ITEM,
    };
    expect(actions.selectPreviousItem()).toEqual(expectedAction);
  });

  it('should create an action to select the next item', () => {
    const expectedAction = {
      type: types.SELECT_NEXT_ITEM,
    };
    expect(actions.selectNextItem()).toEqual(expectedAction);
  });

  it('should create an action to set the theme', () => {
    const expectedAction = {
      type: types.SET_THEME,
      theme: 'foo-theme',
    };
    expect(actions.setTheme('foo-theme')).toEqual(expectedAction);
  });

  it('should create an action to reset the details', () => {
    const expectedAction = {
      type: types.RESET_DETAILS,
    };
    expect(actions.resetDetails()).toEqual(expectedAction);
  });

  it('should create an action to close the details', () => {
    const expectedAction = {
      type: types.CLOSE_DETAILS,
    };
    expect(actions.closeDetails()).toEqual(expectedAction);
  });

  it('should create an action to open the details', () => {
    const expectedAction = {
      type: types.OPEN_DETAILS,
    };
    expect(actions.openDetails()).toEqual(expectedAction);
  });
});
{'fraction_non_alphanumeric': 0.15592077538980195, 'fraction_numerical': 0.002107037505267594, 'mean_word_length': 2.9005751848808545, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4324024', 'n_tokens_mistral': 1388, 'n_tokens_neox': 1372, 'n_words': 320}