You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-04 15:02:09 +03:00
Stricten tests by always ending redis with .end(true) if possible
This commit is contained in:
@@ -61,8 +61,8 @@ describe("The 'blpop' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
bclient.end();
|
||||
client.end(true);
|
||||
bclient.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -28,8 +28,8 @@ describe("The 'client' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client2.end();
|
||||
client.end(true);
|
||||
client2.end(true);
|
||||
});
|
||||
|
||||
describe('list', function () {
|
||||
|
@@ -53,7 +53,7 @@ describe("The 'dbsize' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
it("returns a zero db size", function (done) {
|
||||
|
@@ -50,7 +50,7 @@ describe("The 'del' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -22,7 +22,7 @@ describe("The 'eval' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
it('converts a float to an integer when evaluated', function (done) {
|
||||
|
@@ -33,7 +33,7 @@ describe("The 'exits' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -35,7 +35,7 @@ describe("The 'expire' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -50,7 +50,7 @@ describe("The 'flushdb' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
describe("when there is data in Redis", function () {
|
||||
|
@@ -28,7 +28,7 @@ describe("The 'geoadd' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -56,7 +56,7 @@ describe("The 'get' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
describe("when the key exists in Redis", function () {
|
||||
|
@@ -52,7 +52,7 @@ describe("The 'getset' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
describe("when the key exists in Redis", function () {
|
||||
|
@@ -77,7 +77,7 @@ describe("The 'hgetall' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -33,7 +33,7 @@ describe("The 'hincrby' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -31,7 +31,7 @@ describe("The 'hlen' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -64,7 +64,7 @@ describe("The 'hmget' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -110,7 +110,7 @@ describe("The 'hmset' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -56,7 +56,7 @@ describe("The 'hset' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -29,7 +29,7 @@ describe("The 'incr' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
it("reports an error", function (done) {
|
||||
@@ -64,7 +64,7 @@ describe("The 'incr' method", function () {
|
||||
});
|
||||
|
||||
after(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
it("changes the last digit from 2 to 3", function (done) {
|
||||
|
@@ -63,7 +63,7 @@ describe("The 'keys' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -63,7 +63,7 @@ describe("The 'mget' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -52,7 +52,7 @@ describe("The 'mset' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
describe("and a callback is specified", function () {
|
||||
|
@@ -31,7 +31,7 @@ describe("The 'msetnx' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -28,7 +28,7 @@ describe("The 'randomkey' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -31,7 +31,7 @@ describe("The 'rename' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -34,7 +34,7 @@ describe("The 'renamenx' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -29,7 +29,7 @@ describe("The 'rpush' command", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -55,7 +55,7 @@ describe("The 'sadd' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -24,7 +24,7 @@ describe("The 'scard' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -23,7 +23,7 @@ describe("The 'script' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
it("loads script with client.script('load')", function (done) {
|
||||
|
@@ -40,7 +40,7 @@ describe("The 'sdiff' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -40,7 +40,7 @@ describe("The 'sdiffstore' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -41,7 +41,7 @@ describe("The 'select' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
it("changes the database and calls the callback", function (done) {
|
||||
|
@@ -50,7 +50,7 @@ describe("The 'set' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
describe("and a callback is specified", function () {
|
||||
|
@@ -34,7 +34,7 @@ describe("The 'setex' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -30,7 +30,7 @@ describe("The 'setnx' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -56,7 +56,7 @@ describe("The 'sinter' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -41,7 +41,7 @@ describe("The 'sinterstore' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -28,7 +28,7 @@ describe("The 'sismember' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -34,7 +34,7 @@ describe("The 'slowlog' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -31,7 +31,7 @@ describe("The 'smembers' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -33,7 +33,7 @@ describe("The 'smove' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -122,7 +122,7 @@ describe("The 'sort' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -31,7 +31,7 @@ describe("The 'spop' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -62,7 +62,7 @@ describe("The 'srem' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -39,7 +39,7 @@ describe("The 'sunion' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -42,7 +42,7 @@ describe("The 'sunionstore' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -37,7 +37,7 @@ describe.skip("The 'sync' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -31,7 +31,7 @@ describe("The 'ttl' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -48,7 +48,7 @@ describe("The 'type' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -22,7 +22,7 @@ describe("The 'watch' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
|
||||
it('does not execute transaction if watched key was modified prior to execution', function (done) {
|
||||
|
@@ -40,7 +40,7 @@ describe("The 'zadd' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -42,7 +42,7 @@ describe("The 'zscan' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -28,7 +28,7 @@ describe("The 'zscore' method", function () {
|
||||
});
|
||||
|
||||
afterEach(function () {
|
||||
client.end();
|
||||
client.end(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user