selenium-webdriver 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/testing/index.js CHANGED
@@ -47,7 +47,7 @@ const { Builder } = require('../index')
47
47
  * Describes a browser targeted by a {@linkplain suite test suite}.
48
48
  * @record
49
49
  */
50
- function TargetBrowser() { }
50
+ function TargetBrowser() {}
51
51
 
52
52
  /**
53
53
  * The {@linkplain Browser name} of the targeted browser.
@@ -210,7 +210,7 @@ function init(force = false) {
210
210
  if (seleniumJar && seleniumUrl) {
211
211
  throw Error(
212
212
  'Ambiguous test configuration: both SELENIUM_REMOTE_URL' +
213
- ' && SELENIUM_SERVER_JAR environment variables are set'
213
+ ' && SELENIUM_SERVER_JAR environment variables are set'
214
214
  )
215
215
  }
216
216
 
@@ -218,8 +218,8 @@ function init(force = false) {
218
218
  if ((seleniumJar || seleniumUrl) && envBrowsers.length === 0) {
219
219
  throw Error(
220
220
  'Ambiguous test configuration: when either the SELENIUM_REMOTE_URL or' +
221
- ' SELENIUM_SERVER_JAR environment variable is set, the' +
222
- ' SELENIUM_BROWSER variable must also be set.'
221
+ ' SELENIUM_SERVER_JAR environment variable is set, the' +
222
+ ' SELENIUM_BROWSER variable must also be set.'
223
223
  )
224
224
  }
225
225
 
@@ -236,8 +236,7 @@ function init(force = false) {
236
236
  }
237
237
 
238
238
  const TARGET_MAP = /** !WeakMap<!Environment, !TargetBrowser> */ new WeakMap()
239
- const URL_MAP =
240
- /** !WeakMap<!Environment, ?(string|remote.SeleniumServer)> */ new WeakMap()
239
+ const URL_MAP = /** !WeakMap<!Environment, ?(string|remote.SeleniumServer)> */ new WeakMap()
241
240
 
242
241
  /**
243
242
  * Defines the environment a {@linkplain suite test suite} is running against.
@@ -250,9 +249,9 @@ class Environment {
250
249
  * Selenium server to test against.
251
250
  */
252
251
  constructor(browser, url = undefined) {
253
- browser = /** @type {!TargetBrowser} */ (
254
- Object.seal(Object.assign({}, browser))
255
- )
252
+ browser = /** @type {!TargetBrowser} */ (Object.seal(
253
+ Object.assign({}, browser)
254
+ ))
256
255
 
257
256
  TARGET_MAP.set(this, browser)
258
257
  URL_MAP.set(this, url || null)
@@ -289,7 +288,6 @@ class Environment {
289
288
 
290
289
  const realBuild = builder.build
291
290
  builder.build = function () {
292
-
293
291
  builder.withCapabilities(Capabilities[browser.name].apply(Capabilities))
294
292
 
295
293
  if (browser.capabilities) {
@@ -312,7 +310,7 @@ class Environment {
312
310
  * Configuration options for a {@linkplain ./index.suite test suite}.
313
311
  * @record
314
312
  */
315
- function SuiteOptions() { }
313
+ function SuiteOptions() {}
316
314
 
317
315
  /**
318
316
  * The browsers to run the test suite against.
@@ -487,8 +485,8 @@ function getTestHook(name) {
487
485
  if (type !== 'function') {
488
486
  throw TypeError(
489
487
  `Expected global.${name} to be a function, but is ${type}.` +
490
- ' This can happen if you try using this module when running with' +
491
- ' node directly instead of using jasmine or mocha'
488
+ ' This can happen if you try using this module when running with' +
489
+ ' node directly instead of using jasmine or mocha'
492
490
  )
493
491
  }
494
492
  return fn