{"_id":"@aredridel/redis-mock","_rev":"3-eeb3bcc8bdf930b03c56c5dde00d0f5f","name":"@aredridel/redis-mock","description":"Redis client mock object for unit testing","dist-tags":{"latest":"0.4.9-1"},"versions":{"0.4.9-1":{"name":"@aredridel/redis-mock","version":"0.4.9-1","description":"Redis client mock object for unit testing","author":{"name":"Kristian Faeldt","email":"kristian.faeldt@gmail.com"},"main":"./lib/redis-mock","license":"MIT","repository":{"type":"git","url":"git+https://github.com/yeahoffline/redis-mock.git"},"devDependencies":{"should":"5.1.0","mocha":"2.2.1","redis":"0.12.1"},"scripts":{"test":"make test"},"keywords":["redis","redis-mock","mock-redis","redis test","redis mock","redis testing","redis fake","redis-js","redis js","redisjs","redis standalone","redis inmemory","redis memory","in-memory"],"contributors":[{"name":"lahabana","email":"charly.molter@gmail.com","url":"Charly Molter"},{"name":"yeahoffline","email":"frank.gasser@gmail.com","url":"Frank"},{"name":"cmawhorter","email":"cory.mawhorter@gmail.com","url":"cory"},{"name":"pmarques","url":"Patrick Marques"}],"bugs":{"url":"https://github.com/yeahoffline/redis-mock/issues","email":"frank.gasser@gmail.com"},"engine":"node >= 0.10.0","gitHead":"dcaf54de58d9d730a5f82e2069b97285eec45d8c","homepage":"https://github.com/yeahoffline/redis-mock#readme","_id":"@aredridel/redis-mock@0.4.9-1","_shasum":"7e8d7a5009f26b56e61ea4be393ffa161acff979","_from":".","_npmVersion":"3.3.3","_nodeVersion":"4.1.0","_npmUser":{"name":"aredridel","email":"aredridel@dinhe.net"},"dist":{"shasum":"7e8d7a5009f26b56e61ea4be393ffa161acff979","tarball":"https://registry.npmjs.org/@aredridel/redis-mock/-/redis-mock-0.4.9-1.tgz","integrity":"sha512-/M9wrjI4cf6iGyllynFaBQp7AUdYFzraBUGVFKdk4qJtq7S9FcQ88E0x4AxHwoqqZl0OScbAtlVOfLFExOUQow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWTFA/BcB1V2b56xgxp+Yu2M9vtFBvS/82oOGq3TFi9QIgY2BvvMI/HsRIYe17YoKxnR5I9LWH3IkrtPVmsC9tW9c="}]},"maintainers":[{"name":"aredridel","email":"aredridel@dinhe.net"}]}},"readme":"redis-mock\n============\n\n[![NPM](https://nodei.co/npm/redis-mock.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/redis-mock/)\n\n[![Build Status](https://travis-ci.org/yeahoffline/redis-mock.svg?branch=master)](https://travis-ci.org/yeahoffline/redis-mock)\n[![Coverage Status](https://coveralls.io/repos/yeahoffline/redis-mock/badge.svg)](https://coveralls.io/r/yeahoffline/redis-mock)\n\nThe goal of the `redis-mock` project is to create a feature-complete mock of https://github.com/mranney/node_redis, so that it may be used interchangeably when writing unit tests for code that depends on `redis`.\n\nAll operations are performed in-memory, why no Redis installation is required.\n100% redis compatible (see cross verification)\n\n# Installation\n\n````bash\n$ npm install redis-mock --save-dev\n````\n\n\n## Usage\n\n### node.js/io.js\n\nThe below code demonstrates a example of using the redis-mock client in node.js/io.js\n\n\n```js\nvar redis = require(\"redis-mock\"),\n    client = redis.createClient();\n```\n\n\n# API\n\nCurrently implemented are the following redis commands:\n\n### General\n* createClient\n* end\n\n### Events\n* ready\n* connect\n* end\n* quit\n* subscribe\n* unsubscribe\n* message\n\n### Publish/subscribe\n* publish\n* subscribe\n* unsubscribe\n\n### Keys\n* del\n* keys\n* exists\n* expire\n* ttl\n* incr\n* incrby\n* incrbyfloat\n\n### Strings\n* get\n* set\n* getset\n* mget\n* setex\n* setnx\n* ping\n\n### Hashing\n* hset\n* hsetnx\n* hget\n* hexists\n* hdel\n* hlen\n* hgetall\n* hmset\n* hmget\n* hkeys\n* hincrby\n* hincrbyfloat\n\n### Lists\n* llen\n* lpush\n* rpush\n* lpushx\n* rpushx\n* lpop\n* rpop\n* blpop\n* brpop\n* lindex\n* lset\n\n### Server\n* flushdb\n* flushall\n\n\n\n\n# Cross verification\n\nIf you want to add new tests to the test base it is important that they work too on node_redis (we are creating a mock...).\nYou can therefore run the tests using `redis` instead of `redis-mock`. To do so:\n\n````bash\n$ make check-tests\n````\n\n\nYou will need to have a running instance of `redis` on you machine and our tests use flushdb a lot so make sure you don't have anything important on it.\n\n\n# Roadmap\nredis-mock is work in progress, feel free to report an issue\n\n\n# Versions\n0.4.9 merge getset + expire fix (thanks to sobotklp)\n0.4.8 merge issue #1 (thanks to williamkapke)\n0.4.7 update devDependencies (should, mocha)\n\n\n\n\n## LICENSE - \"MIT License\"\n\nCopyright (c) 2012 Kristian Faeldt <kristian.faeldt@gmail.com>\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"name":"aredridel","email":"aredridel@dinhe.net"}],"time":{"modified":"2022-06-12T14:47:26.906Z","created":"2015-09-17T22:54:33.433Z","0.4.9-1":"2015-09-17T22:54:33.433Z"},"homepage":"https://github.com/yeahoffline/redis-mock#readme","keywords":["redis","redis-mock","mock-redis","redis test","redis mock","redis testing","redis fake","redis-js","redis js","redisjs","redis standalone","redis inmemory","redis memory","in-memory"],"repository":{"type":"git","url":"git+https://github.com/yeahoffline/redis-mock.git"},"contributors":[{"name":"lahabana","email":"charly.molter@gmail.com","url":"Charly Molter"},{"name":"yeahoffline","email":"frank.gasser@gmail.com","url":"Frank"},{"name":"cmawhorter","email":"cory.mawhorter@gmail.com","url":"cory"},{"name":"pmarques","url":"Patrick Marques"}],"author":{"name":"Kristian Faeldt","email":"kristian.faeldt@gmail.com"},"bugs":{"url":"https://github.com/yeahoffline/redis-mock/issues","email":"frank.gasser@gmail.com"},"license":"MIT","readmeFilename":"README.md"}