test-driver.js - Adding superclass methods

Adding the start and halt methods for the TestDriver can be used for tests otherwise an exception will be thrown.
Exception: Driver#start method must be overwritten by descendant classes.
This commit is contained in:
André Cordeiro 2016-07-26 14:19:43 -03:00 committed by GitHub
parent d550df34f8
commit f24df1ba89
1 changed files with 8 additions and 0 deletions

View File

@ -9,5 +9,13 @@ var TestDriver = module.exports = function TestDriver() {
Utils.subclass(TestDriver, Driver);
TestDriver.prototype.start = function(callback) {
callback();
};
TestDriver.prototype.halt = function(callback) {
callback();
};
TestDriver.drivers = ["test"];
TestDriver.driver = function(opts) { return new TestDriver(opts); };