text: describe("RequestCache",function(){var a={prop:"val"};beforeEach(function(){this.requestCache=new RequestCache({sizeLimit:3})});describe("#get",function(){it("should return undefined if miss",function(){expect(this.requestCache.get("miss")).toBeUndefined()});it("should return value if hit",function(){this.requestCache.set("hit",a);expect(this.requestCache.get("hit")).toEqual(a)})});describe("#set",function(){describe("when at limit",function(){beforeEach(function(){this.requestCache.set("one",a);this.requestCache.set("two",a);this.requestCache.set("three",a)});it("should evict oldest key-value pair",function(){this.requestCache.set("four",a);expect(this.requestCache.get("one")).toBeUndefined()})});it("should store key-value",function(){this.requestCache.set("hit",a);expect(this.requestCache.cache.hit).toEqual(a)})})});