MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / getTestHook

Function getTestHook

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

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

(name)

Source from the content-addressed store, hash-verified

535 * @throws {TypeError}
536 */
537function getTestHook(name) {
538 let fn = global[name]
539 let type = typeof fn
540 if (type !== 'function') {
541 throw TypeError(
542 `Expected global.${name} to be a function, but is ${type}.` +
543 ' This can happen if you try using this module when running with' +
544 ' node directly instead of using jasmine or mocha',
545 )
546 }
547 return fn
548}
549
550function locate(fileLike) {
551 if (fs.existsSync(fileLike)) {

Callers 1

ignoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected