@wdio/utils 8.28.0 → 8.28.8
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.
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { WrapperMethods, SpecFunction, BeforeHookParam, AfterHookParam } from './types.js';
|
|
2
|
+
declare global {
|
|
3
|
+
var _wdioDynamicJasmineResultErrorList: any | undefined;
|
|
4
|
+
var _jasmineTestResult: any | undefined;
|
|
5
|
+
}
|
|
2
6
|
/**
|
|
3
7
|
* wraps test framework spec/hook function with WebdriverIO before/after hooks
|
|
4
8
|
*
|
|
@@ -12,7 +16,7 @@ import type { WrapperMethods, SpecFunction, BeforeHookParam, AfterHookParam } fr
|
|
|
12
16
|
* @param {number} timeout the maximum time (in milliseconds) to wait for
|
|
13
17
|
* @return {*} specFn result
|
|
14
18
|
*/
|
|
15
|
-
export declare const testFnWrapper: (this: unknown, args_0: string, args_1: SpecFunction, args_2: BeforeHookParam<unknown>, args_3: AfterHookParam<unknown>, args_4: string, args_5: number, args_6?: string | undefined, args_7?: number | undefined) => Promise<
|
|
19
|
+
export declare const testFnWrapper: (this: unknown, args_0: string, args_1: SpecFunction, args_2: BeforeHookParam<unknown>, args_3: AfterHookParam<unknown>, args_4: string, args_5: number, args_6?: string | undefined, args_7?: number | undefined) => Promise<any>;
|
|
16
20
|
/**
|
|
17
21
|
* wraps test framework spec/hook function with WebdriverIO before/after hooks
|
|
18
22
|
*
|
|
@@ -27,7 +31,7 @@ export declare const testFnWrapper: (this: unknown, args_0: string, args_1: Spec
|
|
|
27
31
|
* @param {number} timeout the maximum time (in milliseconds) to wait for
|
|
28
32
|
* @return {*} specFn result
|
|
29
33
|
*/
|
|
30
|
-
export declare const testFrameworkFnWrapper: (this: unknown, { executeHooksWithArgs, executeAsync }: WrapperMethods, type: string, { specFn, specFnArgs }: SpecFunction, { beforeFn, beforeFnArgs }: BeforeHookParam<unknown>, { afterFn, afterFnArgs }: AfterHookParam<unknown>, cid: string, repeatTest?: number, hookName?: string, timeout?: number) => Promise<
|
|
34
|
+
export declare const testFrameworkFnWrapper: (this: unknown, { executeHooksWithArgs, executeAsync }: WrapperMethods, type: string, { specFn, specFnArgs }: SpecFunction, { beforeFn, beforeFnArgs }: BeforeHookParam<unknown>, { afterFn, afterFnArgs }: AfterHookParam<unknown>, cid: string, repeatTest?: number, hookName?: string, timeout?: number) => Promise<any>;
|
|
31
35
|
/**
|
|
32
36
|
* Filter out internal stacktraces. exporting to allow testing of the function
|
|
33
37
|
* @param {string} stack Stacktrace
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testFnWrapper.d.ts","sourceRoot":"","sources":["../../src/test-framework/testFnWrapper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACjB,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"testFnWrapper.d.ts","sourceRoot":"","sources":["../../src/test-framework/testFnWrapper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACR,cAAc,EACd,YAAY,EACZ,eAAe,EACf,cAAc,EACjB,MAAM,YAAY,CAAA;AAEnB,OAAO,CAAC,MAAM,CAAC;IAGX,IAAI,kCAAkC,EAAE,GAAG,GAAG,SAAS,CAAA;IAEvD,IAAI,kBAAkB,EAAE,GAAG,GAAG,SAAS,CAAA;CAC1C;AAUD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,SAChB,OAAO,oNAahB,CAAA;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,sBAAsB,SACzB,OAAO,0CAC2B,cAAc,QAChD,MAAM,0BACY,YAAY,8BACR,gBAAgB,OAAO,CAAC,4BAC1B,eAAe,OAAO,CAAC,OAC5C,MAAM,kCAEA,MAAM,YACP,MAAM,iBAoDnB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,MAMhD,CAAA"}
|
|
@@ -5,6 +5,7 @@ const STACKTRACE_FILTER = [
|
|
|
5
5
|
'node_modules/webdriverio/',
|
|
6
6
|
'node_modules/@wdio/',
|
|
7
7
|
'(internal/process/task',
|
|
8
|
+
'(node:internal/process/task'
|
|
8
9
|
];
|
|
9
10
|
/**
|
|
10
11
|
* wraps test framework spec/hook function with WebdriverIO before/after hooks
|
|
@@ -48,6 +49,15 @@ export const testFrameworkFnWrapper = async function ({ executeHooksWithArgs, ex
|
|
|
48
49
|
const testStart = Date.now();
|
|
49
50
|
try {
|
|
50
51
|
result = await executeAsync.call(this, specFn, retries, specFnArgs, timeout);
|
|
52
|
+
if (globalThis._jasmineTestResult !== undefined) {
|
|
53
|
+
result = globalThis._jasmineTestResult;
|
|
54
|
+
globalThis._jasmineTestResult = undefined;
|
|
55
|
+
}
|
|
56
|
+
if (globalThis._wdioDynamicJasmineResultErrorList?.length > 0) {
|
|
57
|
+
globalThis._wdioDynamicJasmineResultErrorList[0].stack = filterStackTrace(globalThis._wdioDynamicJasmineResultErrorList[0].stack);
|
|
58
|
+
error = globalThis._wdioDynamicJasmineResultErrorList[0];
|
|
59
|
+
globalThis._wdioDynamicJasmineResultErrorList = undefined;
|
|
60
|
+
}
|
|
51
61
|
}
|
|
52
62
|
catch (err) {
|
|
53
63
|
if (err.stack) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/utils",
|
|
3
|
-
"version": "8.28.
|
|
3
|
+
"version": "8.28.8",
|
|
4
4
|
"description": "A WDIO helper utility to provide several utility functions used across the project.",
|
|
5
5
|
"author": "Christian Bromann <mail@bromann.dev>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-utils",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@puppeteer/browsers": "^1.6.0",
|
|
41
41
|
"@wdio/logger": "8.28.0",
|
|
42
|
-
"@wdio/types": "8.28.
|
|
42
|
+
"@wdio/types": "8.28.6",
|
|
43
43
|
"decamelize": "^6.0.0",
|
|
44
44
|
"deepmerge-ts": "^5.1.0",
|
|
45
45
|
"edgedriver": "^5.3.5",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "3ce19a7ceca0a038e9b1ec66f8774bbcb0e8098b"
|
|
58
58
|
}
|