From 64ff66a7cc1dbda539e3e3b6065a0f3d3e37ec24 Mon Sep 17 00:00:00 2001 From: egavr Date: Wed, 25 Jan 2017 18:00:01 +0300 Subject: [PATCH] fix: 'global.hermione' is not defined when reading tests via 'readTests' --- lib/runner/index.js | 3 +-- lib/runner/mocha-runner/index.js | 4 ---- lib/runner/mocha-runner/mocha-adapter.js | 4 ---- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/lib/runner/index.js b/lib/runner/index.js index c144e16a2..21dc4add1 100644 --- a/lib/runner/index.js +++ b/lib/runner/index.js @@ -35,8 +35,7 @@ module.exports = class MainRunner extends QEmitter { this._pool = new BrowserPool(this._config); - this.on(RunnerEvents.RUNNER_START, () => MochaRunner.init()); - this.on(RunnerEvents.RUNNER_END, () => MochaRunner.clean()); + MochaRunner.init(); } run(tests) { diff --git a/lib/runner/mocha-runner/index.js b/lib/runner/mocha-runner/index.js index 42a033e38..82b167149 100644 --- a/lib/runner/mocha-runner/index.js +++ b/lib/runner/mocha-runner/index.js @@ -10,10 +10,6 @@ module.exports = class MochaRunner extends QEmitter { MochaAdapter.init(); } - static clean() { - MochaAdapter.clean(); - } - static create(config, browserAgent, testSkipper) { return new MochaRunner(config, browserAgent, testSkipper); } diff --git a/lib/runner/mocha-runner/mocha-adapter.js b/lib/runner/mocha-runner/mocha-adapter.js index bd26fe4d4..b85d86767 100644 --- a/lib/runner/mocha-runner/mocha-adapter.js +++ b/lib/runner/mocha-runner/mocha-adapter.js @@ -26,10 +26,6 @@ module.exports = class MochaAdapter { global.hermione = {}; } - static clean() { - delete global.hermione; - } - static create(opts, browserAgent, ctx) { return new MochaAdapter(opts, browserAgent, ctx); }