wip: working on reducer test

This commit is contained in:
Torkel Ödegaard 2018-09-12 12:18:24 +02:00
parent 78d36f784f
commit a317158b72

View File

@ -0,0 +1,17 @@
import { Action, ActionTypes } from './actions';
import { inititalState, folderReducer } from './reducers';
describe('folder reducer', () => {
it('should set teams', () => {
const payload = [getMockTeam()];
const action: Action = {
type: ActionTypes.LoadTeams,
payload,
};
const result = teamsReducer(initialTeamsState, action);
expect(result.teams).toEqual(payload);
});
});