mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
wip: working on reducer test
This commit is contained in:
parent
78d36f784f
commit
a317158b72
17
public/app/features/folders/state/reducers.test.ts
Normal file
17
public/app/features/folders/state/reducers.test.ts
Normal 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);
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user