1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-06 02:15:48 +03:00

Fix some minor issues and add more tests

Do not mutate the options object and add some more tests
This commit is contained in:
Ruben Bridgewater
2015-10-17 00:49:41 +02:00
parent 587b1c95a0
commit 2a65ee48dd
16 changed files with 633 additions and 405 deletions

View File

@@ -37,6 +37,12 @@ describe("The 'get' method", function () {
done();
});
});
it("reports an error promisified", function () {
return client.getAsync(key).then(assert, function (err) {
assert(err.message.match(/The connection has already been closed/));
});
});
});
describe("when connected", function () {
@@ -76,7 +82,7 @@ describe("The 'get' method", function () {
}]);
});
it("should not throw on a get without callback (even if it's not useful", function (done) {
it("should not throw on a get without callback (even if it's not useful)", function (done) {
client.GET(key);
client.on('error', function(err) {
throw err;