requestCacheReducer docs & tests

This commit is contained in:
Art Lowel
2017-03-08 18:30:55 +01:00
parent a535b86e0b
commit eaaf12d645
5 changed files with 426 additions and 1 deletions

View File

@@ -95,9 +95,11 @@ describe("objectCacheReducer", () => {
});
it("shouldn't do anything in response to the REMOVE action for an object that isn't cached", () => {
const action = new RemoveFromObjectCacheAction("this isn't cached");
const wrongKey = "this isn't cached";
const action = new RemoveFromObjectCacheAction(wrongKey);
const newState = objectCacheReducer(testState, action);
expect(testState[wrongKey]).toBeUndefined();
expect(newState).toEqual(testState);
});