Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const userFn = async function (...args) {
// step
let result;
let error;
try {
result = await runFnInFiberContext(code.bind(this, ...args))();
} catch (err) {
error = err;
}
if (error) {
throw error;
}
return result;
};
return userFn;
wrapStep (code, retryTest = 0, isStep, config, id) {
const executeFn = isFunctionAsync(code) || !hasWdioSyncSupport ? executeAsync : executeSync;
const wrapWithHooks = this.wrapWithHooks.bind(this);
return function (...args) {
return executeFn.call(this, wrapWithHooks(code), retryTest, args);
};
}