From a86720097e42e3dc4208d1ee6e6f769a4a58a872 Mon Sep 17 00:00:00 2001 From: Thanasis Polychronakis Date: Fri, 19 Apr 2013 15:40:53 +0300 Subject: [PATCH] added test for MULTI exception --- test.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test.js b/test.js index 07ddcf97cb..832de4062b 100644 --- a/test.js +++ b/test.js @@ -322,11 +322,15 @@ tests.MULTI_7 = function () { tests.MULTI_EXCEPTION_1 = function() { + var name = "MULTI_EXCEPTION_1"; + client.multi().set("foo").exec(function (err, reply) { - /* ... */ - console.log('CB:', arguments); + assert(Array.isArray(err), "err should be an array"); + assert.equal(2, err.length, "err should have 2 items"); + assert(err[0].message.match(/ERR/), "First error message should contain ERR"); + assert(err[1].message.match(/EXECABORT/), "First error message should contain EXECABORT"); + next(name); }); - // [Error: Error: ERR wrong number of arguments for 'set' command] }; tests.FWD_ERRORS_1 = function () {