From b060b299e023aebb89d943bf2a354a9b0ceddae9 Mon Sep 17 00:00:00 2001 From: Mykola Mokhnach Date: Thu, 23 Jan 2025 12:42:25 +0100 Subject: [PATCH] Update tests --- lib/chromedriver.js | 5 ++--- test/functional/chromedriver-e2e-specs.js | 9 +-------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/chromedriver.js b/lib/chromedriver.js index 62f7c067..bd0cd626 100644 --- a/lib/chromedriver.js +++ b/lib/chromedriver.js @@ -484,8 +484,8 @@ export class Chromedriver extends events.EventEmitter { `capable of automating Chrome '${chromeVersion}'.\nChoosing the most recent, '${binPath}'.`, ); this.log.debug( - 'If a specific version is required, specify it with the `chromedriverExecutable`' + - 'desired capability.', + `If a specific version is required, specify it with the 'chromedriverExecutable'` + + ` capability.`, ); return binPath; // eslint-disable-next-line no-constant-condition @@ -707,7 +707,6 @@ export class Chromedriver extends events.EventEmitter { } /** @type {any} */ const status = await this.getStatus(); - this.log.debug(JSON.stringify(status)); if (!_.isPlainObject(status) || !status.ready) { throw new Error(`The response to the /status API is not valid: ${JSON.stringify(status)}`); } diff --git a/test/functional/chromedriver-e2e-specs.js b/test/functional/chromedriver-e2e-specs.js index 59e2fe0f..0b70e21e 100644 --- a/test/functional/chromedriver-e2e-specs.js +++ b/test/functional/chromedriver-e2e-specs.js @@ -66,14 +66,7 @@ describe('chromedriver binary setup', function () { chai.should(); chai.use(chaiAsPromised.default); - let cd = new Chromedriver({}); - try { - await cd.initChromedriverPath(); - } catch (err) { - if (err.message.indexOf('Trying to use') !== -1) { - await install(); - } - } + await install(); }); it('should start with a binary that exists', async function () {