From b48f5c3a57074d1b71d0c5810bb14ffe1b51fc5e Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Mon, 8 Sep 2014 09:31:16 -0700 Subject: [PATCH] Add no-op #connect and #start methods to built-ins --- lib/test/loopback.js | 4 ++++ lib/test/ping.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/test/loopback.js b/lib/test/loopback.js index d6b1269..fe6751f 100644 --- a/lib/test/loopback.js +++ b/lib/test/loopback.js @@ -20,4 +20,8 @@ module.exports = Loopback = function Loopback() { Utils.subclass(Loopback, Adaptor); +Loopback.prototype.connect = function(callback) { + callback(); +}; + Loopback.adaptor = function(opts) { return new Loopback(opts); }; diff --git a/lib/test/ping.js b/lib/test/ping.js index 48b767b..c6efce0 100644 --- a/lib/test/ping.js +++ b/lib/test/ping.js @@ -26,6 +26,10 @@ Ping.prototype.ping = function() { return "pong"; }; +Ping.prototype.start = function(callback) { + callback(); +}; + Ping.driver = function(opts) { return new Ping(opts); };