Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var _assign = require('babel-runtime/core-js/object/assign');
var _assign2 = _interopRequireDefault(_assign);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var marge = require('mochawesome-report-generator');
// Grab shared base config from mochawesome-report-generator
var baseConfig = (0, _assign2.default)(marge.getBaseConfig(), {
reportFilename: 'mochawesome',
saveJson: true
});
var boolOpts = ['inlineAssets', 'autoOpen', 'enableCharts', 'enableCode', 'overwrite', 'quiet', 'dev'];
function _getOption(optToGet, options, isBool) {
var envVar = 'MOCHAWESOME_' + optToGet.toUpperCase();
// Order of precedence
// 1. Config option
// 2. Environment variable
// 3. Base config
if (options && typeof options[optToGet] !== 'undefined') {
return isBool && typeof options[optToGet] === 'string' ? options[optToGet] === 'true' : options[optToGet];
}
if (typeof process.env[envVar] !== 'undefined') {