1
0
Fork 0
mirror of https://github.com/vale981/apollo-server synced 2025-11-04 16:31:38 -05:00
apollo-server/packages/apollo-server-redis/__tests__/Redis.test.ts
2018-06-20 10:04:37 +02:00

8 lines
337 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 { RedisCache } from '../src/index';
import { testKeyValueCache } from 'apollo-server-caching';
testKeyValueCache(new RedisCache({ host: 'localhost' }));