MetaPhase-Consulting/State-TalentMAP

View on GitHub
src/reducers/clientSuggestions/clientSuggestions.test.jsx

Summary

Maintainability
A
0 mins
Test Coverage
import reducer, { INITIAL_STATE } from './clientSuggestions';

describe('reducers', () => {
  it('can set reducer SET_CLIENT_SUGGESTIONS', () => {
    expect(reducer(INITIAL_STATE, { type: 'SET_CLIENT_SUGGESTIONS',
      data: {
        hasErrored: true,
        other: 1,
      } })).toEqual({
      ...INITIAL_STATE,
      hasErrored: true,
      other: 1,
    });
  });

  it('can set reducer UNSET_CLIENT_SUGGESTIONS', () => {
    expect(reducer(INITIAL_STATE, { type: 'UNSET_CLIENT_SUGGESTIONS' })).toEqual(INITIAL_STATE);
  });
});