mirror of
https://github.com/vale981/apollo-server
synced 2025-03-09 04:26:39 -04:00
8 lines
353 B
TypeScript
8 lines
353 B
TypeScript
// use mock implementations for underlying databases
|
|
jest.mock('redis', () => require('redis-mock'));
|
|
jest.useFakeTimers(); // mocks out setTimeout that is used in redis-mock
|
|
|
|
import { RedisKeyValueCache } from '../src/index';
|
|
import { testKeyValueCache } from 'apollo-server-caching';
|
|
|
|
testKeyValueCache(new RedisKeyValueCache({ host: 'localhost' }));
|