@aantonov/redis-mock

Redis mock for tests

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Sep 19, 2016Mar 29, 2016Minified + gzip package size for @aantonov/redis-mock in KB

Readme

#redis-mock

NPM version Build Status Coverage Status

Installation

    $ [sudo] npm install --save @aantonov/redis-mock

Usage

    var assert = require('assert');
    var redis_client = require('@aantonov/redis-mock');
    
    it ('Should save string value', (done) => {
        var test_key = 'test_key',
            test_val = 'test_val';
            
        redis_client.set(test_key, test_val, (err) => {
            if (err) return done(err);
            
            assert.equal(redis.store[test_key], test_val);
            
            done();
        });
    });

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.