Skip to content

Commit b89356e

Browse files
committed
add reducer unit test
1 parent 6c3b9eb commit b89356e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import * as actions from '../../src/weather/actions.js';
2+
import * as actionTypes from '../../src/weather/actionTypes.js';
3+
import * as Status from '../../src/weather/status.js';
4+
import reducer from '../../src/weather/reducer.js';
5+
6+
describe('weather/reducer', () => {
7+
it('should return loading status', () => {
8+
const action = actions.fetchWeatherStarted();
9+
10+
const newState = reducer({}, action);
11+
12+
expect(newState.status).toBe(Status.LOADING);
13+
});
14+
});

0 commit comments

Comments
 (0)