| 1234567891011121314151617181920212223242526272829303132333435363738 |
- import { expect } from 'chai';
- import {
- ANNOYED,
- ANNOY_RESPONDED
- } from 'constants/actions';
- import {
- annoyed,
- annoyResponded
- } from 'actions/annoy';
- describe('Annoy actions', () => {
- describe('annoyed', () => {
- it('should return ANNOYED', () => {
- expect(annoyed()).to.deep.equal({
- type: ANNOYED
- });
- });
- });
- describe('annoyResponded', () => {
- it('should return ANNOY_RESPONDED with optional error', () => {
- const err = new Error('something bad happened');
- expect(annoyResponded(err)).to.deep.equal({
- type: ANNOY_RESPONDED,
- err
- });
- expect(annoyResponded()).to.deep.equal({
- type: ANNOY_RESPONDED,
- err: null
- });
- });
- });
- });
|