UNPKG

1.24 kBTypeScriptView Raw
1import type { Browser } from 'webdriverio';
2import executeHooksWithArgs from './executeHooksWithArgs';
3import runFnInFiberContext from './runFnInFiberContext';
4import wrapCommand from './wrapCommand';
5declare const defaultRetries: {
6 attempts: number;
7 limit: number;
8};
9declare global {
10 var _HAS_FIBER_CONTEXT: boolean;
11 var browser: any;
12}
13/**
14 * execute test or hook synchronously
15 *
16 * @param {Function} fn spec or hook method
17 * @param {Number} retries { limit: number, attempts: number }
18 * @param {Array} args arguments passed to hook
19 * @return {Promise} that gets resolved once test/hook is done or was retried enough
20 */
21declare function executeSync(this: Browser<'async'>, fn: Function, retries?: {
22 attempts: number;
23 limit: number;
24}, args?: any[]): Promise<any>;
25/**
26 * run hook or spec via executeSync
27 */
28declare function runSync(this: any, fn: Function, repeatTest?: typeof defaultRetries, args?: any[]): (resolve: (value: any) => void, reject: (err: Error) => void) => any;
29export { executeHooksWithArgs, wrapCommand, runFnInFiberContext, executeSync, runSync, };
30export default function sync(testFn: Function): Promise<unknown>;
31//# sourceMappingURL=index.d.ts.map
\No newline at end of file