Choices/src/scripts/actions/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

29 lines
740 B
JavaScript

import { expect } from 'chai';
import * as actions from './general';
describe('actions/general', () => {
describe('setIsLoading action', () => {
describe('setting loading state to true', () => {
it('returns expected action', () => {
const expectedAction = {
type: 'SET_IS_LOADING',
isLoading: true,
};
expect(actions.setIsLoading(true)).to.eql(expectedAction);
});
});
describe('setting loading state to false', () => {
it('returns expected action', () => {
const expectedAction = {
type: 'SET_IS_LOADING',
isLoading: false,
};
expect(actions.setIsLoading(false)).to.eql(expectedAction);
});
});
});
});