visreg-test
Version:
A visual regression testing solution that offers an easy setup with simple yet powerful customisation options, wrapped up in a convenient CLI runner to make assessing and accepting/rejecting diffs a breeze.
18 lines (17 loc) • 1.23 kB
JavaScript
;
var _a, _b;
Object.defineProperty(exports, "__esModule", { value: true });
exports.suitesDirectory = exports.timeouts = exports.maxViewportHeight = exports.maxViewportWidth = void 0;
const visregConfig = process.env.CYPRESS_VISREG_SETTINGS
? JSON.parse(process.env.CYPRESS_VISREG_SETTINGS)
: {};
const snapshotSettings = process.env.CYPRESS_SNAPSHOT_SETTINGS
? JSON.parse(process.env.CYPRESS_SNAPSHOT_SETTINGS)
: {};
const nonOverridableSettings = process.env.CYPRESS_NON_OVERRIDABLE_SETTINGS
? JSON.parse(process.env.CYPRESS_NON_OVERRIDABLE_SETTINGS)
: {};
exports.maxViewportWidth = ((_a = visregConfig === null || visregConfig === void 0 ? void 0 : visregConfig.maxViewport) === null || _a === void 0 ? void 0 : _a.width) || 1920;
exports.maxViewportHeight = ((_b = visregConfig === null || visregConfig === void 0 ? void 0 : visregConfig.maxViewport) === null || _b === void 0 ? void 0 : _b.height) || 1080;
exports.timeouts = (snapshotSettings === null || snapshotSettings === void 0 ? void 0 : snapshotSettings.timeouts) || {};
exports.suitesDirectory = (nonOverridableSettings === null || nonOverridableSettings === void 0 ? void 0 : nonOverridableSettings.suitesDirectory) || '';