MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / getTestHook

Function getTestHook

javascript/selenium-webdriver/testing/index.js:616–627  ·  view source on GitHub ↗

* @param {string} name * @return {!Function} * @throws {TypeError}

(name)

Source from the content-addressed store, hash-verified

614 * @throws {TypeError}
615 */
616function getTestHook(name) {
617 let fn = global[name]
618 let type = typeof fn
619 if (type !== 'function') {
620 throw TypeError(
621 `Expected global.${name} to be a function, but is ${type}.` +
622 ' This can happen if you try using this module when running with' +
623 ' node directly instead of using jasmine or mocha',
624 )
625 }
626 return fn
627}
628
629/**
630 * Bazel's hermetic java, from `SE_BAZEL_JAVA_LOCATION` (a file holding the `$(JAVA)` path).

Callers 1

ignoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected