You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
702 B
22 lines
702 B
import counter from '../../app/reducers/counter';
|
|
import { INCREMENT_COUNTER, DECREMENT_COUNTER } from '../../app/actions/counter';
|
|
|
|
describe('reducers', () => {
|
|
describe('counter', () => {
|
|
it('should handle initial state', () => {
|
|
expect(counter(undefined, {})).toMatchSnapshot();
|
|
});
|
|
|
|
it('should handle INCREMENT_COUNTER', () => {
|
|
expect(counter(1, { type: INCREMENT_COUNTER })).toMatchSnapshot();
|
|
});
|
|
|
|
it('should handle DECREMENT_COUNTER', () => {
|
|
expect(counter(1, { type: DECREMENT_COUNTER })).toMatchSnapshot();
|
|
});
|
|
|
|
it('should handle unknown action type', () => {
|
|
expect(counter(1, { type: 'unknown' })).toMatchSnapshot();
|
|
});
|
|
});
|
|
});
|
|
|