Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mykola-mokhnach committed Jan 23, 2025
1 parent 6fd987d commit b060b29
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
5 changes: 2 additions & 3 deletions lib/chromedriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)}`);
}
Expand Down
9 changes: 1 addition & 8 deletions test/functional/chromedriver-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit b060b29

Please sign in to comment.