How to use @wdio/utils - 2 common examples

To help you get started, we’ve selected a few @wdio/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oxygenhq / oxygen / src / runners / cucumber / index.js View on Github external
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;
github oxygenhq / oxygen / src / runners / cucumber / index.js View on Github external
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);
        };
    }

@wdio/utils

A WDIO helper utility to provide several utility functions used across the project.

MIT
Latest version published 21 days ago

Package Health Score

94 / 100
Full package analysis