UNPKG

testplane

Version:

Tests framework based on mocha and wdio

25 lines 1.12 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.makeVerboseScreenshotsDebug = exports.isVerboseScreenshotsDebugEnabled = void 0; const debug_1 = __importDefault(require("debug")); const isVerboseScreenshotsDebugEnabled = () => Boolean(process.env.TESTPLANE_DEBUG_SCREENSHOTS); exports.isVerboseScreenshotsDebugEnabled = isVerboseScreenshotsDebugEnabled; function makeVerboseScreenshotsDebug(namespace) { const debug = (0, debug_1.default)(namespace); const verboseDebug = ((...args) => { if ((0, exports.isVerboseScreenshotsDebugEnabled)()) { debug(...args); } }); Object.assign(verboseDebug, debug); Object.defineProperty(verboseDebug, "enabled", { get: () => (0, exports.isVerboseScreenshotsDebugEnabled)() && debug.enabled, configurable: true, }); return verboseDebug; } exports.makeVerboseScreenshotsDebug = makeVerboseScreenshotsDebug; //# sourceMappingURL=debug.js.map