How to use the testcafe-hammerhead.RequestFilterRule.isANY 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 / custom-client-scripts / utils.ts View on Github external
contentGroups.forEach(contentGroup => {
        const pageGroups = getScriptGroupValues(contentGroup as ClientScript[], (s: ClientScript) => s.page.toString());

        if (pageGroups.length === 1 && RequestFilterRule.isANY((pageGroups[0][0] as ClientScript).page)) { /*eslint-disable-line no-extra-parens*/
            duplicatedScripts.push(pageGroups[0][0] as ClientScript);

            return;
        }

        const forAllPagesGroup = pageGroups.find(pg => RequestFilterRule.isANY((pg[0] as ClientScript).page)); /*eslint-disable-line no-extra-parens*/

        if (forAllPagesGroup) {
            pageGroups
                .filter(pg => !RequestFilterRule.isANY((pg[0] as ClientScript).page)) /*eslint-disable-line no-extra-parens*/
                .forEach(pg => {
                    duplicatedScripts.push(pg[0] as ClientScript);
                });
        }
        else {
            pageGroups
github DevExpress / testcafe / src / custom-client-scripts / utils.ts View on Github external
                .filter(pg => !RequestFilterRule.isANY((pg[0] as ClientScript).page)) /*eslint-disable-line no-extra-parens*/
                .forEach(pg => {
github DevExpress / testcafe / src / custom-client-scripts / utils.ts View on Github external
        const forAllPagesGroup = pageGroups.find(pg => RequestFilterRule.isANY((pg[0] as ClientScript).page)); /*eslint-disable-line no-extra-parens*/

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