Choices/src/scripts/actions/groups.test.js
Josh Johnson e6882f3e4b
Add missing type definitions + rename sortFn (#734)
* Add wrapped element getters + fix some types

* Remove comment

* Add missing config options to types

* Add types to constants

* Rename sortFn to sorter

* Update PR template

* Add refactor to PR template

* Add passed element types to constants

* Add js doc comments to actions

* Add "returns" to js doc comments

* Add missing choice prop to type

* Add types to store.js

* Add jsdoc comments to components

* Ignore strict null checks

* Move loading action into misc.js

* Further type def additions

* Rename itemCompare to valueCompare

* Update badges

* Rename scrollToChoice to scrollToChildElement
2019-11-03 13:18:16 +00:00

25 lines
547 B
JavaScript

import { expect } from 'chai';
import * as actions from './groups';
describe('actions/groups', () => {
describe('addGroup action', () => {
it('returns ADD_GROUP action', () => {
const value = 'test';
const id = 'test';
const active = true;
const disabled = false;
const expectedAction = {
type: 'ADD_GROUP',
value,
id,
active,
disabled,
};
expect(actions.addGroup({ value, id, active, disabled })).to.eql(
expectedAction,
);
});
});
});