1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

tests: improve coverage & fix unreachable code branches

This commit is contained in:
Salakar
2020-02-09 15:44:52 +00:00
parent 43bc8df159
commit da31ade348
4 changed files with 14 additions and 22 deletions

View File

@@ -150,6 +150,10 @@ describe("The 'set' method", function () {
client.get('foo', helper.isNull(done));
});
it('calls callback with error if null value is passed', function (done) {
client.set('foo', null, helper.isError(done));
});
it('emit an error with only the key set', function (done) {
client.on('error', function (err) {
assert.equal(err.message, "ERR wrong number of arguments for 'set' command");