<commit_before>import homeReducer from '../app/Resources/js/reducers/homeReducer'
import Constants from '../app/Resources/js/constants/home'
import {getYmdStr} from '../app/Resources/js/utils/util'

const initialState = {
    fetching: false,
    timelineJson: {},
    username: '',
    currentDate: getYmdStr(new Date())
}

describe('homeReducer', () => {
    it('undefined Action', () => {
        expect(homeReducer(undefined, {})).toEqual(
            initialState
        )
    })
    it('AJAX_FETCH_START', () => {
        initialState.fetching = true
        const expectState = initialState

        expect(homeReducer(undefined, {
            type: Constants.AJAX_FETCH_START
        })).toEqual(
            expectState
        )
    })
})
<commit_msg>:green_apple:<commit_after>import homeReducer from '../app/Resources/js/reducers/homeReducer'
import Constants from '../app/Resources/js/constants/home'
import {getYmdStr} from '../app/Resources/js/utils/util'

const initialState = {
    fetching: false,
    timelineJson: {},
    username: '',
    currentDate: getYmdStr(new Date())
}

describe('homeReducer', () => {
    it('undefined Action', () => {
        expect(homeReducer(undefined, {})).toEqual(
            initialState
        )
    })
    it('AJAX_FETCH_START', () => {
        initialState.fetching = true
        const expectState = initialState

        expect(homeReducer(undefined, {
            type: Constants.AJAX_FETCH_START
        })).toEqual(
            expectState
        )
    })
    it('FETCH_SINGLE_DATE', () => {
        initialState.fetching = false
        const expectState = initialState

        expect(homeReducer(initialState, {
            type: Constants.FETCH_SINGLE_DATE,
            timelineJson: {},
            currentDate: initialState.currentDate
        })).toEqual(
            expectState
        )
    })
})

{'fraction_non_alphanumeric': 0.13408119658119658, 'fraction_numerical': 0.0, 'mean_word_length': 2.411657559198543, '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': '7108924', 'n_tokens_mistral': 572, 'n_tokens_neox': 554, 'n_words': 90}