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

Add .command_used to errors thrown by the parser

This commit is contained in:
Ruben Bridgewater
2015-09-14 00:15:33 +02:00
parent e4bd9bf0c5
commit 1a06cfb6ec
3 changed files with 5 additions and 2 deletions

View File

@@ -94,6 +94,7 @@ describe("The 'select' method", function () {
assert.strictEqual(client.selected_db, null, "default db should be null");
client.on('error', function (err) {
assert.strictEqual(err.command_used, 'SELECT');
assert.equal(err.message, 'ERR invalid DB index');
done();
});