UNPKG

@mmisty/cypress-grep

Version:

Filters tests by tags/title using substring or regular expressions (can find dynamic tags)

19 lines (18 loc) 774 B
"use strict"; /// <reference types="cypress" /> Object.defineProperty(exports, "__esModule", { value: true }); exports.publicSet = exports.publicGet = void 0; /** Prefer `expose` (Cypress 15.10+); fall back to `env` for `CYPRESS_*` / legacy merges. */ const publicGet = (config, key) => { var _a; const ex = config.expose; const en = config.env; return (_a = ex === null || ex === void 0 ? void 0 : ex[key]) !== null && _a !== void 0 ? _a : en === null || en === void 0 ? void 0 : en[key]; }; exports.publicGet = publicGet; const publicSet = (config, key, value) => { var _a; const c = config; c.expose = Object.assign(Object.assign({}, ((_a = c.expose) !== null && _a !== void 0 ? _a : {})), { [key]: value }); }; exports.publicSet = publicSet;