From 3de50e8dd4ae9440c616aa5f2b087e724bdb085f Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 3 May 2014 21:28:19 -0700 Subject: [PATCH] Emit `restart` events for `Job` and `Tunnel`. --- test/saucelabs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/saucelabs.js b/test/saucelabs.js index 02a50e2c8..29df925ad 100644 --- a/test/saucelabs.js +++ b/test/saucelabs.js @@ -510,7 +510,9 @@ Job.prototype.restart = function(callback) { logInline(); console.log(label + ' ' + description + ' restart #%d of %d', ++this.attempts, this.retries); + _.defer(_.bind(this.emit, this, 'restart')); this.stop(_.partial(this.start, callback)); + return this; }; @@ -661,7 +663,9 @@ Tunnel.prototype.restart = function(callback) { logInline(); console.log('Tunnel ' + this.id + ': restart #%d of %d', ++this.attempts, this.retries); + _.defer(_.bind(this.emit, this, 'restart')); this.stop(_.partial(this.start, callback)); + return this; };