mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-16 12:45:10 +02:00
437651411f
* Reapply changes from PR #310 * Version 4.1.1 * Update action name * Update test * Resolved broken test
29 lines
740 B
JavaScript
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);
|
|
});
|
|
});
|
|
});
|
|
});
|