diff --git a/javascript/node/selenium-webdriver/bidi/addInterceptParameters.js b/javascript/node/selenium-webdriver/bidi/addInterceptParameters.js index cd5e51025c078..c2170526bf43e 100644 --- a/javascript/node/selenium-webdriver/bidi/addInterceptParameters.js +++ b/javascript/node/selenium-webdriver/bidi/addInterceptParameters.js @@ -30,7 +30,7 @@ class AddInterceptParameters { } urlPattern(pattern) { - if (!pattern instanceof UrlPattern) { + if (!(pattern instanceof UrlPattern)) { throw new Error(`Pattern must be an instance of UrlPattern. Received: '${pattern})'`) } this.#urlPatterns.push(Object.fromEntries(pattern.asMap())) @@ -39,7 +39,7 @@ class AddInterceptParameters { urlPatterns(patterns) { patterns.forEach((pattern) => { - if (!pattern instanceof UrlPattern) { + if (!(pattern instanceof UrlPattern)) { throw new Error(`Pattern must be an instance of UrlPattern. Received:'${pattern}'`) } this.#urlPatterns.push(Object.fromEntries(pattern.asMap())) @@ -48,7 +48,7 @@ class AddInterceptParameters { } urlStringPattern(pattern) { - if (!pattern instanceof String) { + if (!(pattern instanceof String)) { throw new Error(`Pattern must be an instance of String. Received:'${pattern}'`) } @@ -58,7 +58,7 @@ class AddInterceptParameters { urlStringPatterns(patterns) { patterns.forEach((pattern) => { - if (!pattern instanceof String) { + if (!(pattern instanceof String)) { throw new Error(`Pattern must be an instance of String. Received:'${pattern}'`) } this.#urlPatterns.push({ type: 'string', pattern: pattern }) diff --git a/javascript/node/selenium-webdriver/bidi/network.js b/javascript/node/selenium-webdriver/bidi/network.js index 4d41de99c56ae..01c9688f77e68 100644 --- a/javascript/node/selenium-webdriver/bidi/network.js +++ b/javascript/node/selenium-webdriver/bidi/network.js @@ -97,7 +97,7 @@ class Network { } async addIntercept(params) { - if (!params instanceof AddInterceptParameters) { + if (!(params instanceof AddInterceptParameters)) { throw new Error(`Params must be an instance of AddInterceptParamenters. Received:'${params}'`) } diff --git a/javascript/node/selenium-webdriver/bidi/urlPattern.js b/javascript/node/selenium-webdriver/bidi/urlPattern.js index 80635817857da..8b69cee0923f4 100644 --- a/javascript/node/selenium-webdriver/bidi/urlPattern.js +++ b/javascript/node/selenium-webdriver/bidi/urlPattern.js @@ -15,8 +15,6 @@ // specific language governing permissions and limitations // under the License. -const { LocalValue } = require('./protocolValue') - class UrlPattern { #map = new Map() diff --git a/javascript/node/selenium-webdriver/lib/test/build.js b/javascript/node/selenium-webdriver/lib/test/build.js index b9fd43327fb28..b70991f086cf2 100644 --- a/javascript/node/selenium-webdriver/lib/test/build.js +++ b/javascript/node/selenium-webdriver/lib/test/build.js @@ -133,7 +133,7 @@ exports.isDevMode = isDevMode * @return {!Build} The new build. * @throws {Error} If not running in dev mode. */ -exports.of = function (var_args) { +exports.of = function (_) { // eslint-disable-line let targets = Array.prototype.slice.call(arguments, 0) return new Build(targets) diff --git a/javascript/node/selenium-webdriver/test/bidi/add_intercept_parameters_test.js b/javascript/node/selenium-webdriver/test/bidi/add_intercept_parameters_test.js index c782177d4ba9f..3ff2714a4a61e 100644 --- a/javascript/node/selenium-webdriver/test/bidi/add_intercept_parameters_test.js +++ b/javascript/node/selenium-webdriver/test/bidi/add_intercept_parameters_test.js @@ -19,7 +19,7 @@ const assert = require('assert') const firefox = require('../../firefox') -const { Browser, By, WebElement } = require('../../') +const { Browser } = require('../../') const { suite } = require('../../lib/test') const Network = require('../../bidi/network') const { AddInterceptParameters } = require('../../bidi/addInterceptParameters') diff --git a/javascript/node/selenium-webdriver/test/bidi/network_commands_test.js b/javascript/node/selenium-webdriver/test/bidi/network_commands_test.js index c38a122bc0d30..fa1aba7276e1e 100644 --- a/javascript/node/selenium-webdriver/test/bidi/network_commands_test.js +++ b/javascript/node/selenium-webdriver/test/bidi/network_commands_test.js @@ -19,7 +19,7 @@ const assert = require('assert') const firefox = require('../../firefox') -const { Browser, By, WebElement } = require('../../') +const { Browser, By } = require('../../') const { Pages, suite } = require('../../lib/test') const Network = require('../../bidi/network') const { AddInterceptParameters } = require('../../bidi/addInterceptParameters') @@ -92,7 +92,7 @@ suite( await network.cancelAuth(event.request.request) }) try { - const alert = await driver.wait(until.alertIsPresent(), 3000) + await driver.wait(until.alertIsPresent(), 3000) assert.fail('Alert should not be present') } catch (e) { assert.strictEqual(e.name, 'TimeoutError')