Skip to content

Commit

Permalink
linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
udarrr committed Oct 1, 2023
1 parent fa60696 commit a0f2716
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion lib/driver-starter.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ async function startDriver(pathToChromeDriver, args) {
const killChromeDriver = () => {
try {
chromeDriverProcess.kill();
} catch (ignored) {}
} catch (_) {
// eslint-disable-next-line no-empty
}
};
process.on('exit', killChromeDriver);
process.on('SIGTERM', killChromeDriver);
Expand Down
2 changes: 1 addition & 1 deletion lib/processKiller.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function getConfigProcessesName(drivers) {

async function processKiller(ports, processesName) {
if (ports && ports.length) {
for (let port of ports) {
for (const port of ports) {
if (port) {
const portCast = `${port}`.startsWith(':') ? port : `:${port}`;

Expand Down
4 changes: 3 additions & 1 deletion lib/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ async function start(_opts) {
.map((d) => {
if (d === 'firefox') {
return 4444;
} else if (d === 'chrome' || d === 'chromiumedge') {
}
if (d === 'chrome' || d === 'chromiumedge') {
return 9515;
}
})
Expand Down Expand Up @@ -201,6 +202,7 @@ async function start(_opts) {
);

return chromeDriverProcess;
// eslint-disable-next-line no-else-return
} else {
const selenium = spawn(opts.javaPath, args, opts.spawnOptions);
await checkStarted(selenium, seleniumStatusUrl.toString());
Expand Down
8 changes: 5 additions & 3 deletions test/only-driver-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const checkPathsExistence = require('../lib/check-paths-existence');
const computeFsPaths = require('../lib/compute-fs-paths');
const path = require('path');

let opts = {
const opts = {
seleniumVersion: defaultConfig.version,
seleniumBaseURL: defaultConfig.baseURL,
drivers: defaultConfig.drivers,
Expand All @@ -21,7 +21,7 @@ describe('check onlyDriver downloading only driver without selenium server and o
const paths = await install(testOpt);

testOpt.drivers = {};
testOpt.drivers.chrome = opts.drivers['chrome'];
testOpt.drivers.chrome = opts.drivers.chrome;

const fsPaths = await computeFsPaths({
seleniumVersion: opts.seleniumVersion,
Expand Down Expand Up @@ -80,7 +80,9 @@ describe('check onlyDriver with certain name of driver', () => {
await install(testOpt);

assert(false);
} catch {}
} catch (_) {
// eslint-disable-next-line no-empty
}
});
});

Expand Down

0 comments on commit a0f2716

Please sign in to comment.