@wdio/utils 6.5.0 → 6.7.3
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/build/envDetector.d.ts +39 -0
- package/build/envDetector.d.ts.map +1 -0
- package/build/envDetector.js +93 -96
- package/build/index.d.ts +9 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +36 -164
- package/build/initialisePlugin.d.ts +3 -0
- package/build/initialisePlugin.d.ts.map +1 -0
- package/build/initialisePlugin.js +28 -31
- package/build/initialiseServices.d.ts +8 -0
- package/build/initialiseServices.d.ts.map +1 -0
- package/build/initialiseServices.js +73 -88
- package/build/monad.d.ts +22 -0
- package/build/monad.d.ts.map +1 -0
- package/build/monad.js +102 -140
- package/build/shim.d.ts +14 -0
- package/build/shim.d.ts.map +1 -0
- package/build/shim.js +101 -128
- package/build/test-framework/errorHandler.d.ts +2 -0
- package/build/test-framework/errorHandler.d.ts.map +1 -0
- package/build/test-framework/errorHandler.js +19 -29
- package/build/test-framework/index.d.ts +4 -0
- package/build/test-framework/index.d.ts.map +1 -0
- package/build/test-framework/index.js +6 -20
- package/build/test-framework/testFnWrapper.d.ts +4 -0
- package/build/test-framework/testFnWrapper.d.ts.map +1 -0
- package/build/test-framework/testFnWrapper.js +43 -81
- package/build/test-framework/testInterfaceWrapper.d.ts +7 -0
- package/build/test-framework/testInterfaceWrapper.d.ts.map +1 -0
- package/build/test-framework/testInterfaceWrapper.js +53 -71
- package/build/test-framework/types.d.ts +36 -0
- package/build/test-framework/types.d.ts.map +1 -0
- package/build/test-framework/types.js +2 -0
- package/build/utils.d.ts +22 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +144 -170
- package/package.json +4 -12
- package/tsconfig.json +0 -11
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { executeHooksWithArgs, executeAsync, runSync } from '../shim';
|
|
2
|
+
export declare type HookFnArgs<T> = (ctx: T) => [unknown, T];
|
|
3
|
+
export interface WrapperMethods {
|
|
4
|
+
executeHooksWithArgs: typeof executeHooksWithArgs;
|
|
5
|
+
executeAsync: typeof executeAsync;
|
|
6
|
+
runSync: typeof runSync;
|
|
7
|
+
}
|
|
8
|
+
export interface SpecFunction {
|
|
9
|
+
specFn: Function;
|
|
10
|
+
specFnArgs: any[];
|
|
11
|
+
}
|
|
12
|
+
export interface BeforeHookParam<T> {
|
|
13
|
+
beforeFn: Function;
|
|
14
|
+
beforeFnArgs: HookFnArgs<T>;
|
|
15
|
+
}
|
|
16
|
+
export interface AfterHookParam<T> {
|
|
17
|
+
afterFn: Function;
|
|
18
|
+
afterFnArgs: HookFnArgs<T>;
|
|
19
|
+
}
|
|
20
|
+
export interface JasmineContext {
|
|
21
|
+
failedExpectations: Array<Record<string, unknown>>;
|
|
22
|
+
}
|
|
23
|
+
export declare type SpecArguments = ([
|
|
24
|
+
Function
|
|
25
|
+
] | [
|
|
26
|
+
Function,
|
|
27
|
+
number
|
|
28
|
+
] | [
|
|
29
|
+
string,
|
|
30
|
+
Function
|
|
31
|
+
] | [
|
|
32
|
+
string,
|
|
33
|
+
Function,
|
|
34
|
+
number
|
|
35
|
+
]);
|
|
36
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/test-framework/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAE1E,oBAAY,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AAEpD,MAAM,WAAW,cAAc;IAC3B,oBAAoB,EAAE,OAAO,oBAAoB,CAAA;IACjD,YAAY,EAAE,OAAO,YAAY,CAAA;IACjC,OAAO,EAAE,OAAO,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,QAAQ,CAAA;IAChB,UAAU,EAAE,GAAG,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,eAAe,CAAC,CAAC;IAC9B,QAAQ,EAAE,QAAQ,CAAA;IAClB,YAAY,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;CAC9B;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAC7B,OAAO,EAAE,QAAQ,CAAA;IACjB,WAAW,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;CAC7B;AAED,MAAM,WAAW,cAAc;IAC3B,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACrD;AAED,oBAAY,aAAa,GAAG,CAIxB;IAAC,QAAQ;CAAC,GAIV;IAAC,QAAQ;IAAE,MAAM;CAAC,GAIlB;IAAC,MAAM;IAAE,QAAQ;CAAC,GAIlB;IAAC,MAAM;IAAE,QAAQ;IAAE,MAAM;CAAC,CAC7B,CAAA"}
|
package/build/utils.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="webdriverio/webdriverio-core" />
|
|
2
|
+
export declare function overwriteElementCommands(propertiesObject: {
|
|
3
|
+
'__elementOverrides__'?: {
|
|
4
|
+
value: any;
|
|
5
|
+
};
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}): void;
|
|
8
|
+
export declare function commandCallStructure(commandName: string, args: any[]): string;
|
|
9
|
+
export declare function transformCommandLogResult(result: {
|
|
10
|
+
file?: string;
|
|
11
|
+
}): "\"<Screenshot[base64]>\"" | {
|
|
12
|
+
file?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
export declare function isValidParameter(arg: any, expectedType: string): boolean;
|
|
15
|
+
export declare function getArgumentType(arg: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "null";
|
|
16
|
+
export declare function safeRequire(name: string): WebdriverIO.ServiceClass | null;
|
|
17
|
+
export declare function isFunctionAsync(fn: Function): boolean;
|
|
18
|
+
export declare function filterSpecArgs(args: any[]): any[];
|
|
19
|
+
export declare function isBase64(str: string): boolean;
|
|
20
|
+
export declare const canAccess: (file: string) => boolean;
|
|
21
|
+
export declare const sleep: (ms?: number) => Promise<unknown>;
|
|
22
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":";AASA,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE;IAAE,sBAAsB,CAAC,EAAE;QAAE,KAAK,EAAE,GAAG,CAAA;KAAE,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,QAsCzH;AAMD,wBAAgB,oBAAoB,CAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,UA+BrE;AAOD,wBAAgB,yBAAyB,CAAE,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE;;EAMnE;AASD,wBAAgB,gBAAgB,CAAE,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,WA8B/D;AAKD,wBAAgB,eAAe,CAAE,GAAG,EAAE,GAAG,wGAExC;AAQD,wBAAgB,WAAW,CAAE,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC,YAAY,GAAG,IAAI,CAoC1E;AAOD,wBAAgB,eAAe,CAAE,EAAE,EAAE,QAAQ,WAE5C;AAMD,wBAAgB,cAAc,CAAE,IAAI,EAAE,GAAG,EAAE,SAE1C;AAOD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,WAanC;AAOD,eAAO,MAAM,SAAS,SAAU,MAAM,YAWrC,CAAA;AAMD,eAAO,MAAM,KAAK,mCAAoD,CAAA"}
|
package/build/utils.js
CHANGED
|
@@ -1,195 +1,169 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.overwriteElementCommands =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
exports.isValidParameter = isValidParameter;
|
|
10
|
-
exports.getArgumentType = getArgumentType;
|
|
11
|
-
exports.safeRequire = safeRequire;
|
|
12
|
-
exports.isFunctionAsync = isFunctionAsync;
|
|
13
|
-
exports.filterSpecArgs = filterSpecArgs;
|
|
14
|
-
exports.isBase64 = isBase64;
|
|
15
|
-
exports.sleep = exports.canAccess = void 0;
|
|
16
|
-
|
|
17
|
-
var _fs = _interopRequireDefault(require("fs"));
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sleep = exports.canAccess = exports.isBase64 = exports.filterSpecArgs = exports.isFunctionAsync = exports.safeRequire = exports.getArgumentType = exports.isValidParameter = exports.transformCommandLogResult = exports.commandCallStructure = exports.overwriteElementCommands = void 0;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
21
9
|
const SCREENSHOT_REPLACEMENT = '"<Screenshot[base64]>"';
|
|
22
|
-
|
|
23
10
|
function overwriteElementCommands(propertiesObject) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
11
|
+
const elementOverrides = propertiesObject['__elementOverrides__'] ? propertiesObject['__elementOverrides__'].value : {};
|
|
12
|
+
for (const [commandName, userDefinedCommand] of Object.entries(elementOverrides)) {
|
|
13
|
+
if (typeof userDefinedCommand !== 'function') {
|
|
14
|
+
throw new Error('overwriteCommand: commands be overwritten only with functions, command: ' + commandName);
|
|
15
|
+
}
|
|
16
|
+
if (!propertiesObject[commandName]) {
|
|
17
|
+
throw new Error('overwriteCommand: no command to be overwritten: ' + commandName);
|
|
18
|
+
}
|
|
19
|
+
if (typeof propertiesObject[commandName].value !== 'function') {
|
|
20
|
+
throw new Error('overwriteCommand: only functions can be overwritten, command: ' + commandName);
|
|
21
|
+
}
|
|
22
|
+
const origCommand = propertiesObject[commandName].value;
|
|
23
|
+
delete propertiesObject[commandName];
|
|
24
|
+
const newCommand = function (...args) {
|
|
25
|
+
const element = this;
|
|
26
|
+
return userDefinedCommand.apply(element, [
|
|
27
|
+
function origCommandFunction() {
|
|
28
|
+
const context = this || element;
|
|
29
|
+
return origCommand.apply(context, arguments);
|
|
30
|
+
},
|
|
31
|
+
...args
|
|
32
|
+
]);
|
|
33
|
+
};
|
|
34
|
+
propertiesObject[commandName] = {
|
|
35
|
+
value: newCommand,
|
|
36
|
+
configurable: true
|
|
37
|
+
};
|
|
37
38
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
delete propertiesObject[commandName];
|
|
41
|
-
|
|
42
|
-
const newCommand = function (...args) {
|
|
43
|
-
const element = this;
|
|
44
|
-
return userDefinedCommand.apply(element, [function origCommandFunction() {
|
|
45
|
-
const context = this || element;
|
|
46
|
-
return origCommand.apply(context, arguments);
|
|
47
|
-
}, ...args]);
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
propertiesObject[commandName] = {
|
|
51
|
-
value: newCommand,
|
|
52
|
-
configurable: true
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
delete propertiesObject['__elementOverrides__'];
|
|
57
|
-
propertiesObject['__elementOverrides__'] = {
|
|
58
|
-
value: {}
|
|
59
|
-
};
|
|
39
|
+
delete propertiesObject['__elementOverrides__'];
|
|
40
|
+
propertiesObject['__elementOverrides__'] = { value: {} };
|
|
60
41
|
}
|
|
61
|
-
|
|
42
|
+
exports.overwriteElementCommands = overwriteElementCommands;
|
|
62
43
|
function commandCallStructure(commandName, args) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
44
|
+
const callArgs = args.map((arg) => {
|
|
45
|
+
if (typeof arg === 'string' && (arg.startsWith('!function(') || arg.startsWith('return (function'))) {
|
|
46
|
+
arg = '<fn>';
|
|
47
|
+
}
|
|
48
|
+
else if (typeof arg === 'string' &&
|
|
49
|
+
!commandName.startsWith('findElement') &&
|
|
50
|
+
isBase64(arg)) {
|
|
51
|
+
arg = SCREENSHOT_REPLACEMENT;
|
|
52
|
+
}
|
|
53
|
+
else if (typeof arg === 'string') {
|
|
54
|
+
arg = `"${arg}"`;
|
|
55
|
+
}
|
|
56
|
+
else if (typeof arg === 'function') {
|
|
57
|
+
arg = '<fn>';
|
|
58
|
+
}
|
|
59
|
+
else if (arg === null) {
|
|
60
|
+
arg = 'null';
|
|
61
|
+
}
|
|
62
|
+
else if (typeof arg === 'object') {
|
|
63
|
+
arg = '<object>';
|
|
64
|
+
}
|
|
65
|
+
else if (typeof arg === 'undefined') {
|
|
66
|
+
arg = typeof arg;
|
|
67
|
+
}
|
|
68
|
+
return arg;
|
|
69
|
+
}).join(', ');
|
|
70
|
+
return `${commandName}(${callArgs})`;
|
|
83
71
|
}
|
|
84
|
-
|
|
72
|
+
exports.commandCallStructure = commandCallStructure;
|
|
85
73
|
function transformCommandLogResult(result) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
return result;
|
|
74
|
+
if (typeof result.file === 'string' && isBase64(result.file)) {
|
|
75
|
+
return SCREENSHOT_REPLACEMENT;
|
|
76
|
+
}
|
|
77
|
+
return result;
|
|
91
78
|
}
|
|
92
|
-
|
|
79
|
+
exports.transformCommandLogResult = transformCommandLogResult;
|
|
93
80
|
function isValidParameter(arg, expectedType) {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return false;
|
|
81
|
+
let shouldBeArray = false;
|
|
82
|
+
if (expectedType.slice(-2) === '[]') {
|
|
83
|
+
expectedType = expectedType.slice(0, -2);
|
|
84
|
+
shouldBeArray = true;
|
|
85
|
+
}
|
|
86
|
+
if (shouldBeArray) {
|
|
87
|
+
if (!Array.isArray(arg)) {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
104
90
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
for (const argEntity of arg) {
|
|
110
|
-
const argEntityType = getArgumentType(argEntity);
|
|
111
|
-
|
|
112
|
-
if (!argEntityType.match(expectedType)) {
|
|
113
|
-
return false;
|
|
91
|
+
else {
|
|
92
|
+
arg = [arg];
|
|
114
93
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
94
|
+
for (const argEntity of arg) {
|
|
95
|
+
const argEntityType = getArgumentType(argEntity);
|
|
96
|
+
if (!argEntityType.match(expectedType)) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return true;
|
|
118
101
|
}
|
|
119
|
-
|
|
102
|
+
exports.isValidParameter = isValidParameter;
|
|
120
103
|
function getArgumentType(arg) {
|
|
121
|
-
|
|
104
|
+
return arg === null ? 'null' : typeof arg;
|
|
122
105
|
}
|
|
123
|
-
|
|
106
|
+
exports.getArgumentType = getArgumentType;
|
|
124
107
|
function safeRequire(name) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
108
|
+
var _a, _b, _c;
|
|
109
|
+
let requirePath;
|
|
110
|
+
try {
|
|
111
|
+
const localNodeModules = path_1.default.join(process.cwd(), '/node_modules');
|
|
112
|
+
if (!((_a = require === null || require === void 0 ? void 0 : require.main) === null || _a === void 0 ? void 0 : _a.paths.includes(localNodeModules))) {
|
|
113
|
+
(_b = require === null || require === void 0 ? void 0 : require.main) === null || _b === void 0 ? void 0 : _b.paths.push(localNodeModules);
|
|
114
|
+
const requireOpts = process.env.JEST_WORKER_ID
|
|
115
|
+
? {}
|
|
116
|
+
: { paths: (_c = require === null || require === void 0 ? void 0 : require.main) === null || _c === void 0 ? void 0 : _c.paths };
|
|
117
|
+
requirePath = require.resolve(name, requireOpts);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
requirePath = require.resolve(name);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
catch (e) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
try {
|
|
127
|
+
return require(requirePath);
|
|
128
|
+
}
|
|
129
|
+
catch (e) {
|
|
130
|
+
throw new Error(`Couldn't initialise "${name}".\n${e.stack}`);
|
|
139
131
|
}
|
|
140
|
-
} catch (e) {
|
|
141
|
-
return null;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
try {
|
|
145
|
-
return require(requirePath);
|
|
146
|
-
} catch (e) {
|
|
147
|
-
throw new Error(`Couldn't initialise "${name}".\n${e.stack}`);
|
|
148
|
-
}
|
|
149
132
|
}
|
|
150
|
-
|
|
133
|
+
exports.safeRequire = safeRequire;
|
|
151
134
|
function isFunctionAsync(fn) {
|
|
152
|
-
|
|
135
|
+
return (fn.constructor && fn.constructor.name === 'AsyncFunction') || fn.name === 'async';
|
|
153
136
|
}
|
|
154
|
-
|
|
137
|
+
exports.isFunctionAsync = isFunctionAsync;
|
|
155
138
|
function filterSpecArgs(args) {
|
|
156
|
-
|
|
139
|
+
return args.filter((arg) => typeof arg !== 'function');
|
|
157
140
|
}
|
|
158
|
-
|
|
141
|
+
exports.filterSpecArgs = filterSpecArgs;
|
|
159
142
|
function isBase64(str) {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const firstPaddingChar = str.indexOf('=');
|
|
174
|
-
return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '=';
|
|
143
|
+
var notBase64 = new RegExp('[^A-Z0-9+\\/=]', 'i');
|
|
144
|
+
if (typeof str !== 'string') {
|
|
145
|
+
throw new Error('Expected string but received invalid type.');
|
|
146
|
+
}
|
|
147
|
+
const len = str.length;
|
|
148
|
+
if (!len || len % 4 !== 0 || notBase64.test(str)) {
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
const firstPaddingChar = str.indexOf('=');
|
|
152
|
+
return firstPaddingChar === -1 ||
|
|
153
|
+
firstPaddingChar === len - 1 ||
|
|
154
|
+
(firstPaddingChar === len - 2 && str[len - 1] === '=');
|
|
175
155
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
156
|
+
exports.isBase64 = isBase64;
|
|
157
|
+
exports.canAccess = (file) => {
|
|
158
|
+
if (!file) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
try {
|
|
162
|
+
fs_1.default.accessSync(file);
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
catch (e) {
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
189
168
|
};
|
|
190
|
-
|
|
191
|
-
exports.canAccess = canAccess;
|
|
192
|
-
|
|
193
|
-
const sleep = (ms = 0) => new Promise(r => setTimeout(r, ms));
|
|
194
|
-
|
|
195
|
-
exports.sleep = sleep;
|
|
169
|
+
exports.sleep = (ms = 0) => new Promise((r) => setTimeout(r, ms));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.7.3",
|
|
4
4
|
"description": "A WDIO helper utility to provide several utility functions used across the project.",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-utils",
|
|
@@ -9,15 +9,6 @@
|
|
|
9
9
|
"engines": {
|
|
10
10
|
"node": ">=10.0.0"
|
|
11
11
|
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"tsc": "tsc",
|
|
14
|
-
"build": "run-s clean compile",
|
|
15
|
-
"clean": "rimraf ./build",
|
|
16
|
-
"compile": "babel src/ -d build/ --config-file ../../babel.config.js",
|
|
17
|
-
"test": "run-s test:*",
|
|
18
|
-
"test:eslint": "eslint src test",
|
|
19
|
-
"test:unit": "jest"
|
|
20
|
-
},
|
|
21
12
|
"repository": {
|
|
22
13
|
"type": "git",
|
|
23
14
|
"url": "git://github.com/webdriverio/webdriverio.git"
|
|
@@ -32,10 +23,11 @@
|
|
|
32
23
|
"url": "https://github.com/webdriverio/webdriverio/issues"
|
|
33
24
|
},
|
|
34
25
|
"dependencies": {
|
|
35
|
-
"@wdio/logger": "6.
|
|
26
|
+
"@wdio/logger": "6.7.3"
|
|
36
27
|
},
|
|
37
28
|
"publishConfig": {
|
|
38
29
|
"access": "public"
|
|
39
30
|
},
|
|
40
|
-
"
|
|
31
|
+
"types": "./build/index.d.ts",
|
|
32
|
+
"gitHead": "2d72a4f1be35727342bf31b750d76eab6c8b50e9"
|
|
41
33
|
}
|