Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mockCache = () => {
const redis = require("redis-mock");
require('bluebird').promisifyAll(redis.RedisClient.prototype);
const cache = redis.createClient();
mock("../../src/cache", cache);
return cache;
};
const mockCache = () => {
const redis = require("redis-mock");
require('bluebird').promisifyAll(redis.RedisClient.prototype);
const cache = redis.createClient();
mock('../../src/services/cache', cache);
return cache;
};