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.
 
 
 

21 lines
691 B

import balanceReducer, { GET_BALANCE, RECEIVE_BALANCE } from 'reducers/balance'
describe('reducers', () => {
describe('balanceReducer', () => {
it('should handle initial state', () => {
expect(balanceReducer(undefined, {})).toMatchSnapshot()
})
it('should handle INCREMENT_COUNTER', () => {
expect(balanceReducer(undefined, { type: GET_BALANCE })).toMatchSnapshot()
})
it('should handle DECREMENT_COUNTER', () => {
expect(balanceReducer(undefined, { type: RECEIVE_BALANCE })).toMatchSnapshot()
})
it('should handle unknown action type', () => {
expect(balanceReducer(undefined, { type: 'unknown' })).toMatchSnapshot()
})
})
})