UNPKG

jest-audio-reporter

Version:
34 lines (33 loc) 848 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.logOptions = exports.createLog = void 0; const store_1 = require("./store"); function createLog() { return { enabled: false, writer: console, debug(...args) { if (store_1.store.devel) return; if (this.enabled) { // istanbul ignore next this.writer.info(...args); } } }; } exports.createLog = createLog; function logOptions({ log }, raw, options) { if (!raw.configs) { log.debug('no config detected'); } else { log.debug(`configs location: ${raw.configs.map(c => ` ${c}`).join('\n')} options: ${JSON.stringify(options, undefined, 2)} `); } } exports.logOptions = logOptions; //# sourceMappingURL=log.js.map