Update reducer.test.js
This commit is contained in:
@@ -10,6 +10,7 @@ describe('reducer', () => {
|
||||
const initialState = { count: 0 };
|
||||
const action = { type: 'increment' };
|
||||
const expectedState = { count: 1 };
|
||||
|
||||
expect(reducer(initialState, action)).toEqual(expectedState);
|
||||
});
|
||||
|
||||
@@ -17,12 +18,14 @@ describe('reducer', () => {
|
||||
const initialState = { count: 1 };
|
||||
const action = { type: 'decrement' };
|
||||
const expectedState = { count: 0 };
|
||||
|
||||
expect(reducer(initialState, action)).toEqual(expectedState);
|
||||
});
|
||||
|
||||
it('should handle unknown action', () => {
|
||||
const initialState = { count: 0 };
|
||||
const action = { type: 'UNKNOWN' };
|
||||
|
||||
expect(reducer(initialState, action)).toEqual(initialState);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user