Skip to content

Fix regression, bring back socket support, fixes #950 #951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(connection): added a test to ensure socket parameter is in opt…
…ion object
  • Loading branch information
FGRibreau committed Jan 10, 2016
commit 1fde2543c62d6a8be052733911f43ef40c3def50
7 changes: 7 additions & 0 deletions test/connection.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

var assert = require("assert");
var net = require("net");
var config = require("./lib/config");
var helper = require('./helper');
var redis = config.redis;
Expand Down Expand Up @@ -339,6 +340,12 @@ describe("connection tests", function () {
assert(create_stream_string === String(redis.RedisClient.prototype.create_stream));
});

it('supports a socket parameter in options object', function () {
var socket = new net.Socket();
client = new redis.RedisClient({socket: socket});
assert.strictEqual(client.stream, socket);
});

it("throws on strange connection info", function () {
client = {
end: function() {}
Expand Down