<commit_before><commit_msg>add tests for ui duck<commit_after>import { TOGGLE_MEMBER_PANEL, toggleMemberPanel } from '../ui'
import reducer from '../ui'
import initialState from 'vclub/redux/initialClubState'

// action creator
test('toggleMemberPanel action creates proper action', () => {
  const expectedAction = {
    type: TOGGLE_MEMBER_PANEL,
  }
  expect(toggleMemberPanel()).toEqual(expectedAction)
})

// reducer
test('reducer returns initial state', () => {
  const { ui: uiInitialState } = initialState
  expect(reducer(undefined, {}))
    .toEqual(uiInitialState)
})

test('reducer should handle TOGGLE_MEMBER_PANEL', () => {
  const { rooms: uiInitialState } = initialState

  const expectedState = {
    ...uiInitialState,
    showMemberPanel: !uiInitialState.showMemberPanel,
  }

  expect(reducer(uiInitialState, toggleMemberPanel())).toEqual(expectedState)
})
{'fraction_non_alphanumeric': 0.1267123287671233, 'fraction_numerical': 0.0, 'mean_word_length': 5.176056338028169, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3721087', 'n_tokens_mistral': 269, 'n_tokens_neox': 268, 'n_words': 55}