How to use the testcafe-hammerhead.wrapDomAccessors function in testcafe-hammerhead

To help you get started, we’ve selected a few testcafe-hammerhead 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 DevExpress / testcafe / src / compiler / legacy / compiler.js View on Github external
Compiler.prototype._getRemainderCode = function (ast) {
    var remainderAst = Ast.getRemainderAst(ast);

    if (remainderAst) {
        CallAnalyzer.run(remainderAst, this.filename, this.errs, true, this.sourceIndex, this.src);

        if (this.ok) {
            var remainderCode = astProcessor.gen_code(remainderAst, {beautify: true});

            return Hammerhead.wrapDomAccessors(remainderCode, true);
        }
    }

    return '';
};
github DevExpress / testcafe / src / compiler / legacy / compiler.js View on Github external
Compiler.prototype._addOutputTestStepData = function (testName, testStepData) {
    var js = astProcessor.gen_code(['array', testStepData.asts], {beautify: true});

    this.out.testsStepData[testName] = {
        names: testStepData.names,
        js: Hammerhead.wrapDomAccessors(js, true)
    };
};
github DevExpress / testcafe / src / compiler / legacy / analysis / require_analyzer.js View on Github external
Ast.construct(requireFilename, ownerFilename, function (parsingErr, requireAst, srcCode) {
        if (parsingErr)
            errs.push(parsingErr);

        else if (requireAst) {
            descriptor.jsCode = srcCode;
            analyzeRequireCode(requireAst, descriptor, errs, sourceIndex);
        }

        if (!errs.length)
            descriptor.jsCode = Hammerhead.wrapDomAccessors(descriptor.jsCode, true);

        //NOTE: User can forget ';' at the end of the require js file. In this case, an js exception may occure after
        //requires merging. So we add ';' at the end of the require code manually
        if (descriptor.jsCode && descriptor.jsCode[descriptor.jsCode.length - 1] !== ';')
            descriptor.jsCode += ';';

        descriptor.hasErrs = !!errs.length;

        callback(errs, descriptor);
    });
};

testcafe-hammerhead

A powerful web-proxy used as a core for the TestCafe testing framework (https://github.com/DevExpress/testcafe).

MIT
Latest version published 4 months ago

Package Health Score

83 / 100
Full package analysis

Similar packages