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.
24 lines
705 B
24 lines
705 B
import balanceReducer, {
|
|
GET_BALANCE,
|
|
RECEIVE_BALANCE
|
|
} from '../../app/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()
|
|
})
|
|
})
|
|
})
|
|
|