<commit_before>import test from 'tape'
import {commentViewState, feedViewState, posts, postsViewState, users} from 'src/redux/reducers'
import {unauthenticated} from 'src/redux/action-creators'

test('unauthenticated action clears reducer state', t => {

  const ordinaryReducers = [commentViewState, posts, postsViewState, users]

  const ordinaryReducersReduced = ordinaryReducers.map(reducer => reducer({'1':{},'2':{}}, unauthenticated()))

  ordinaryReducersReduced.forEach(reducedResult => t.equal(Object.keys(reducedResult).length, 0))

  const feedViewStateReduced = feedViewState({feed: ['1','2']}, unauthenticated())
  t.equal(feedViewStateReduced.feed.length, 0)

  t.end()
})<commit_msg>Repairing test for feedViewState reducer<commit_after>import test from 'tape'
import {commentViewState, feedViewState, posts, postsViewState, users} from 'src/redux/reducers'
import {unauthenticated} from 'src/redux/action-creators'

test('unauthenticated action clears reducer state', t => {

  const ordinaryReducers = [commentViewState, posts, postsViewState, users]

  const ordinaryReducersReduced = ordinaryReducers.map(reducer => reducer({'1':{},'2':{}}, unauthenticated()))

  ordinaryReducersReduced.forEach(reducedResult => t.equal(Object.keys(reducedResult).length, 0))

  const feedViewStateReduced = feedViewState({visibleEntries: ['1','2'], hiddenEntries:['3','4'], isHiddenRevealed: true}, unauthenticated())
  t.equal(feedViewStateReduced.visibleEntries.length, 0)
  t.equal(feedViewStateReduced.hiddenEntries.length, 0)
  t.notOk(feedViewStateReduced.isHiddenRevealed)

  t.end()
})
{'fraction_non_alphanumeric': 0.13713212273011896, 'fraction_numerical': 0.00939261114589856, 'mean_word_length': 7.591397849462366, 'pattern_counts': {'":': 0, '<': 3, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4736280', 'n_tokens_mistral': 528, 'n_tokens_neox': 498, 'n_words': 98}