it('should throw and error if the given collection exists but have no clusters', () => { const collection = gplay.collection.NEW_FREE; return gplay.list({ collection, category: gplay.category.BUSINESS, num: 100 }) .catch((error) => { assert.equal(error.message, `The collection ${collection} is invalid for the given category, top apps or new apps`); }); });
it("should call client.getBuffer with key & return with data1", () => { let p = cacher.get(key); expect(cacher.client.getBuffer).toHaveBeenCalledTimes(1); expect(cacher.client.getBuffer).toHaveBeenCalledWith(prefix + key); return p.catch(protectReject).then((d) => { expect(d).toEqual(data1); }); });