Remove base Adaptor#disconnect and Driver#halt fns
Would be more useful to module developers to loudly error rather than silently not work.
This commit is contained in:
parent
9fe9700eef
commit
14d8bbab00
|
@ -41,15 +41,6 @@ Adaptor.prototype.connect = function(callback) {
|
|||
callback(null);
|
||||
};
|
||||
|
||||
// Public: Disconnects from the adaptor
|
||||
//
|
||||
// callback - function to run when the adaptor is disconnected
|
||||
//
|
||||
// Returns nothing
|
||||
Adaptor.prototype.disconnect = function(callback) {
|
||||
callback();
|
||||
};
|
||||
|
||||
// Public: Voids all command functions so they do not interact
|
||||
// with anything after disconnect has been called.
|
||||
//
|
||||
|
|
|
@ -64,12 +64,3 @@ Driver.prototype.start = function(callback) {
|
|||
Logger.info("Driver " + this.name + " started.");
|
||||
callback();
|
||||
};
|
||||
|
||||
// Public: Halts the driver
|
||||
//
|
||||
// callback - function to be triggered when the driver is halted
|
||||
//
|
||||
// Returns nothing
|
||||
Driver.prototype.halt = function(callback) {
|
||||
callback();
|
||||
};
|
||||
|
|
|
@ -47,19 +47,6 @@ describe("Adaptor", function() {
|
|||
});
|
||||
});
|
||||
|
||||
describe("#disconnect", function() {
|
||||
var callback;
|
||||
|
||||
beforeEach(function() {
|
||||
callback = spy();
|
||||
adaptor.disconnect(callback);
|
||||
});
|
||||
|
||||
it("triggers the callback", function() {
|
||||
expect(callback).to.be.called;
|
||||
})
|
||||
});
|
||||
|
||||
describe("#_noop", function() {
|
||||
var hello;
|
||||
|
||||
|
|
|
@ -98,17 +98,4 @@ describe("Driver", function() {
|
|||
expect(callback).to.be.called;
|
||||
});
|
||||
});
|
||||
|
||||
describe("#halt", function() {
|
||||
var callback;
|
||||
|
||||
beforeEach(function() {
|
||||
callback = spy();
|
||||
driver.halt(callback);
|
||||
});
|
||||
|
||||
it("triggers the callback", function() {
|
||||
expect(callback).to.be.called;
|
||||
})
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue