Choices/src/scripts/reducers/general.test.js
Josh Johnson 437651411f
Fix render blocking (#456)
* Reapply changes from PR #310

* Version 4.1.1

* Update action name

* Update test

* Resolved broken test
2019-01-26 12:36:47 +00:00

24 lines
572 B
JavaScript

import { expect } from 'chai';
import general, { defaultState } from './general';
describe('reducers/general', () => {
it('should return same state when no action matches', () => {
expect(general(defaultState, {})).to.equal(defaultState);
});
describe('SET_IS_LOADING', () => {
it('sets loading state', () => {
const expectedState = {
loading: true,
};
const actualState = general(undefined, {
type: 'SET_IS_LOADING',
isLoading: true,
});
expect(expectedState).to.eql(actualState);
});
});
});