mirror of
https://github.com/vale981/apollo-server
synced 2025-03-17 08:16:40 -04:00
9 lines
349 B
TypeScript
9 lines
349 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' }));
|