@wdio/utils
Advanced tools
Comparing version 8.18.2 to 8.19.0
@@ -91,2 +91,6 @@ /** | ||
export declare const DEFAULT_PATH = "/"; | ||
export declare const HOOK_DEFINITION: { | ||
type: "object"; | ||
validate: (param: any) => void; | ||
}; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -91,1 +91,25 @@ /** | ||
export const DEFAULT_PATH = '/'; | ||
/* istanbul ignore next */ | ||
export const HOOK_DEFINITION = { | ||
type: 'object', | ||
validate: (param) => { | ||
/** | ||
* option must be an array | ||
*/ | ||
if (!Array.isArray(param)) { | ||
throw new Error('a hook option needs to be a list of functions'); | ||
} | ||
/** | ||
* array elements must be functions | ||
*/ | ||
for (const option of param) { | ||
/** | ||
* either a string | ||
*/ | ||
if (typeof option === 'function') { | ||
continue; | ||
} | ||
throw new Error('expected hook to be type of function'); | ||
} | ||
} | ||
}; |
@@ -10,3 +10,3 @@ import initialisePlugin from './initialisePlugin.js'; | ||
import { setupDriver, setupBrowser } from './driver/manager.js'; | ||
import { UNICODE_CHARACTERS } from './constants.js'; | ||
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js'; | ||
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, isAppiumCapability, startWebDriver, setupBrowser, setupDriver, | ||
@@ -24,3 +24,3 @@ /** | ||
*/ | ||
UNICODE_CHARACTERS }; | ||
UNICODE_CHARACTERS, HOOK_DEFINITION }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -11,3 +11,3 @@ /* istanbul ignore file */ | ||
import { setupDriver, setupBrowser } from './driver/manager.js'; | ||
import { UNICODE_CHARACTERS } from './constants.js'; | ||
import { UNICODE_CHARACTERS, HOOK_DEFINITION } from './constants.js'; | ||
export { initialisePlugin, initialiseLauncherService, initialiseWorkerService, isFunctionAsync, transformCommandLogResult, webdriverMonad, commandCallStructure, isValidParameter, getArgumentType, safeImport, canAccess, sleep, isAppiumCapability, startWebDriver, setupBrowser, setupDriver, | ||
@@ -25,2 +25,2 @@ /** | ||
*/ | ||
UNICODE_CHARACTERS }; | ||
UNICODE_CHARACTERS, HOOK_DEFINITION }; |
{ | ||
"name": "@wdio/utils", | ||
"version": "8.18.2", | ||
"version": "8.19.0", | ||
"description": "A WDIO helper utility to provide several utility functions used across the project.", | ||
@@ -35,3 +35,3 @@ "author": "Christian Bromann <mail@bromann.dev>", | ||
"@wdio/logger": "8.16.17", | ||
"@wdio/types": "8.17.0", | ||
"@wdio/types": "8.19.0", | ||
"decamelize": "^6.0.0", | ||
@@ -52,3 +52,3 @@ "deepmerge-ts": "^5.1.0", | ||
}, | ||
"gitHead": "910c79f1640f0100e763a507fdcaee9e4f52560f" | ||
"gitHead": "5179b3b3d0bced033e719890baf4517137ac1576" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
153607
3192
+ Added@wdio/types@8.19.0(transitive)
- Removed@wdio/types@8.17.0(transitive)
Updated@wdio/types@8.19.0