How to use the redis-mock.RedisClient function in redis-mock

To help you get started, we’ve selected a few redis-mock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github shalvah / RemindMeOfThisTweet / spec / support / mocks.js View on Github external
const mockCache = () => {
    const redis = require("redis-mock");
    require('bluebird').promisifyAll(redis.RedisClient.prototype);
    const cache = redis.createClient();
    mock("../../src/cache", cache);
    return cache;
};
github shalvah / DownloadThisVideo / spec / support / mocks.js View on Github external
const mockCache = () => {
    const redis = require("redis-mock");
    require('bluebird').promisifyAll(redis.RedisClient.prototype);
    const cache = redis.createClient();
    mock('../../src/services/cache', cache);
    return cache;
};

redis-mock

Redis client mock object for unit testing

MIT
Latest version published 4 years ago

Package Health Score

59 / 100
Full package analysis