Added unit test

This commit is contained in:
Philipp Czora
2018-08-02 08:44:13 +02:00
parent bdffaed268
commit a5d6ff3110

View File

@@ -435,9 +435,14 @@ describe("selector tests", () => {
} }
} }
}; };
expect(getGroupsFromState(state)).toEqual([{ name: "a" }, { name: "b" }]); expect(getGroupsFromState(state)).toEqual([{ name: "a" }, { name: "b" }]);
}); });
it("should return null when there are no groups in the state", () => {
expect(getGroupsFromState({})).toBe(null)
});
it("should return true, when fetch groups is pending", () => { it("should return true, when fetch groups is pending", () => {
const state = { const state = {
pending: { pending: {