test-adaptor.js - Adding superclass methods
Adding the connect and disconnect methods for the TestAdaptor can be used for tests otherwise an exception will be thrown. Exception: Adaptor#connect method must be overwritten by descendant classes.
This commit is contained in:
parent
ac1bd1ef3f
commit
d550df34f8
|
@ -9,5 +9,14 @@ var TestAdaptor = module.exports = function TestAdaptor() {
|
|||
|
||||
Utils.subclass(TestAdaptor, Adaptor);
|
||||
|
||||
|
||||
TestAdaptor.prototype.connect = function(callback) {
|
||||
callback();
|
||||
};
|
||||
|
||||
TestAdaptor.prototype.disconnect = function(callback) {
|
||||
callback();
|
||||
};
|
||||
|
||||
TestAdaptor.adaptors = ["test"];
|
||||
TestAdaptor.adaptor = function(opts) { return new TestAdaptor(opts); };
|
||||
|
|
Loading…
Reference in New Issue