From f24df1ba89d83488cfaf5d79e391dd9b4474f2f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cordeiro?= Date: Tue, 26 Jul 2016 14:19:43 -0300 Subject: [PATCH] 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. --- lib/test/test-driver.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/test/test-driver.js b/lib/test/test-driver.js index 248e512..b166930 100644 --- a/lib/test/test-driver.js +++ b/lib/test/test-driver.js @@ -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); };