<commit_before>import {LOCATION_CHANGE} from 'react-router-redux';

import reducers from './reducers';
import * as types from './constants';


describe('membership reducers', () => {
    it('returns the initial state', () => {
        [
            reducers(undefined, {}),
            reducers({
                auth: {}
            }, {
                type: types.SIGN_OUT_REQUEST
            })
        ].forEach(r => expect(r).toEqual({
            auth: {
                errors: {},
                pending: false,
                user: null
            }
        }));
    });

    it('handles location change', () => {
        expect(reducers({
            auth: {}
        }, {
            type: LOCATION_CHANGE
        })).toEqual({
            auth: {
                errors: {}
            }
        });
    });
});<commit_msg>Added it handles pending request state test cases to membership reducers.<commit_after>import {LOCATION_CHANGE} from 'react-router-redux';

import reducers from './reducers';
import * as types from './constants';


describe('membership reducers', () => {
    it('returns the initial state', () => {
        [
            reducers(undefined, {}),
            reducers({
                auth: {}
            }, {
                type: types.SIGN_OUT_REQUEST
            })
        ].forEach(r => expect(r).toEqual({
            auth: {
                errors: {},
                pending: false,
                user: null
            }
        }));
    });

    it('handles location change', () => {
        expect(reducers({
            auth: {}
        }, {
            type: LOCATION_CHANGE
        })).toEqual({
            auth: {
                errors: {}
            }
        });
    });

    it('handles pending request', () => {
        [
            types.SIGN_IN_REQUEST,
            types.SIGN_UP_REQUEST
        ].forEach(type => {
            expect(reducers({
                auth: {}
            }, {
                type: type
            })).toEqual({
                auth: {
                    pending: true
                }
            });
        });
    });
});
{'fraction_non_alphanumeric': 0.14070588235294118, 'fraction_numerical': 0.0, 'mean_word_length': 1.1671763506625892, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, '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': '504533', 'n_tokens_mistral': 560, 'n_tokens_neox': 545, 'n_words': 108}