<commit_before>import {
  initialState,
  settingsReducer,
  ActionSettingsChangeTheme,
  ActionSettingsChangeAnimationsPage,
  ActionSettingsChangeAnimationsPageDisabled,
  ActionSettingsChangeAnimationsElements,
  ActionSettingsChangeAutoNightMode
} from './settings.reducer';

describe('SettingsReducer', () => {
  it('should return default state', () => {
    const action = {} as any;
    const state = settingsReducer(undefined, action);
    expect(state).toBe(initialState);
  });

  it('should update theme', () => {
    const action = new ActionSettingsChangeTheme({ theme: 'dark' });
    const state = settingsReducer(undefined, action);
    expect(state.theme).toEqual('dark');
  });

  it('should update pageAnimations', () => {
    const action = new ActionSettingsChangeAnimationsPage({
      pageAnimations: false
    });
    const state = settingsReducer(undefined, action);
    expect(state.pageAnimations).toEqual(false);<commit_msg>test(settings): add Change Language test (#301)<commit_after>import {
  initialState,
  settingsReducer,
  ActionSettingsChangeTheme,
  ActionSettingsChangeAnimationsPage,
  ActionSettingsChangeAnimationsPageDisabled,
  ActionSettingsChangeAnimationsElements,
  ActionSettingsChangeAutoNightMode,
  ActionSettingsChangeLanguage
} from './settings.reducer';

describe('SettingsReducer', () => {
  it('should return default state', () => {
    const action = {} as any;
    const state = settingsReducer(undefined, action);
    expect(state).toBe(initialState);
  });

  it('should update language', () => {
    const action = new ActionSettingsChangeLanguage({ language: 'sk' });
    const state = settingsReducer(undefined, action);
    expect(state.language).toEqual('sk');
  });

  it('should update theme', () => {
    const action = new ActionSettingsChangeTheme({ theme: 'dark' });
    const state = settingsReducer(undefined, action);
    expect(state.theme).toEqual('dark');
  });

  it('should update pageAnimations', () => {
    const action = new ActionSettingsChangeAnimationsPage({
      pageAnimations: false
    });
    const state = settingsReducer(undefined, action);
    expect(state.pageAnimations).toEqual(false);
{'fraction_non_alphanumeric': 0.1255153458543289, 'fraction_numerical': 0.001374255611543747, 'mean_word_length': 5.016528925619835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, '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': '811856', 'n_tokens_mistral': 599, 'n_tokens_neox': 579, 'n_words': 123}