Files
directus/api/src/__mocks__/cache.ts
Sam Milledge 19424feefa Fixes for GraphQL variables in HTTP GET requests (#7416)
* Fix missing GraphQL variables in HTTP GET requests

* Fix GraphQL query request caching

 - Fix incorrect response when the query contains variables
 - Added tests for cache keys and cache middleware

* Update api/src/utils/get-cache-key.test.ts

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-08-16 23:16:41 +00:00

7 lines
176 B
TypeScript

export const cache = {
get: jest.fn().mockResolvedValue(undefined),
set: jest.fn().mockResolvedValue(true),
};
export const getCache = jest.fn().mockReturnValue({ cache });