1
0
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:
Ruben Bridgewater
2015-11-22 16:56:54 +01:00
parent 0913a4d521
commit 8bf794fb36
57 changed files with 83 additions and 77 deletions

View File

@@ -61,8 +61,8 @@ describe("The 'blpop' method", function () {
});
afterEach(function () {
client.end();
bclient.end();
client.end(true);
bclient.end(true);
});
});
});

View File

@@ -28,8 +28,8 @@ describe("The 'client' method", function () {
});
afterEach(function () {
client.end();
client2.end();
client.end(true);
client2.end(true);
});
describe('list', function () {

View File

@@ -53,7 +53,7 @@ describe("The 'dbsize' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
it("returns a zero db size", function (done) {

View File

@@ -50,7 +50,7 @@ describe("The 'del' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -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) {

View File

@@ -33,7 +33,7 @@ describe("The 'exits' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -35,7 +35,7 @@ describe("The 'expire' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -50,7 +50,7 @@ describe("The 'flushdb' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
describe("when there is data in Redis", function () {

View File

@@ -28,7 +28,7 @@ describe("The 'geoadd' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -56,7 +56,7 @@ describe("The 'get' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
describe("when the key exists in Redis", function () {

View File

@@ -52,7 +52,7 @@ describe("The 'getset' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
describe("when the key exists in Redis", function () {

View File

@@ -77,7 +77,7 @@ describe("The 'hgetall' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -33,7 +33,7 @@ describe("The 'hincrby' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -31,7 +31,7 @@ describe("The 'hlen' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -64,7 +64,7 @@ describe("The 'hmget' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -110,7 +110,7 @@ describe("The 'hmset' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -56,7 +56,7 @@ describe("The 'hset' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -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) {

View File

@@ -63,7 +63,7 @@ describe("The 'keys' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -63,7 +63,7 @@ describe("The 'mget' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -52,7 +52,7 @@ describe("The 'mset' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
describe("and a callback is specified", function () {

View File

@@ -31,7 +31,7 @@ describe("The 'msetnx' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -28,7 +28,7 @@ describe("The 'randomkey' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -31,7 +31,7 @@ describe("The 'rename' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -34,7 +34,7 @@ describe("The 'renamenx' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -29,7 +29,7 @@ describe("The 'rpush' command", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -55,7 +55,7 @@ describe("The 'sadd' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -24,7 +24,7 @@ describe("The 'scard' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -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) {

View File

@@ -40,7 +40,7 @@ describe("The 'sdiff' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -40,7 +40,7 @@ describe("The 'sdiffstore' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -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) {

View File

@@ -50,7 +50,7 @@ describe("The 'set' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
describe("and a callback is specified", function () {

View File

@@ -34,7 +34,7 @@ describe("The 'setex' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -30,7 +30,7 @@ describe("The 'setnx' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -56,7 +56,7 @@ describe("The 'sinter' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -41,7 +41,7 @@ describe("The 'sinterstore' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -28,7 +28,7 @@ describe("The 'sismember' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -34,7 +34,7 @@ describe("The 'slowlog' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -31,7 +31,7 @@ describe("The 'smembers' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -33,7 +33,7 @@ describe("The 'smove' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -122,7 +122,7 @@ describe("The 'sort' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -31,7 +31,7 @@ describe("The 'spop' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -62,7 +62,7 @@ describe("The 'srem' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -39,7 +39,7 @@ describe("The 'sunion' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -42,7 +42,7 @@ describe("The 'sunionstore' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -37,7 +37,7 @@ describe.skip("The 'sync' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -31,7 +31,7 @@ describe("The 'ttl' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -48,7 +48,7 @@ describe("The 'type' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -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) {

View File

@@ -40,7 +40,7 @@ describe("The 'zadd' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -42,7 +42,7 @@ describe("The 'zscan' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});

View File

@@ -28,7 +28,7 @@ describe("The 'zscore' method", function () {
});
afterEach(function () {
client.end();
client.end(true);
});
});
});