Updating NPM dependencies
This commit is contained in:
83
node_modules/jest-config/build/ReporterValidationErrors.js
generated
vendored
83
node_modules/jest-config/build/ReporterValidationErrors.js
generated
vendored
@@ -7,20 +7,10 @@ exports.createReporterError = createReporterError;
|
||||
exports.createArrayReporterError = createArrayReporterError;
|
||||
exports.validateReporters = validateReporters;
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function _jestValidate() {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _chalk() {
|
||||
const data = _interopRequireDefault(require('chalk'));
|
||||
|
||||
_chalk = function _chalk() {
|
||||
_chalk = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
@@ -30,7 +20,17 @@ function _chalk() {
|
||||
function _jestGetType() {
|
||||
const data = _interopRequireDefault(require('jest-get-type'));
|
||||
|
||||
_jestGetType = function _jestGetType() {
|
||||
_jestGetType = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _jestValidate() {
|
||||
const data = require('jest-validate');
|
||||
|
||||
_jestValidate = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
@@ -43,47 +43,12 @@ function _interopRequireDefault(obj) {
|
||||
return obj && obj.__esModule ? obj : {default: obj};
|
||||
}
|
||||
|
||||
function _slicedToArray(arr, i) {
|
||||
return (
|
||||
_arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest()
|
||||
);
|
||||
}
|
||||
|
||||
function _nonIterableRest() {
|
||||
throw new TypeError('Invalid attempt to destructure non-iterable instance');
|
||||
}
|
||||
|
||||
function _iterableToArrayLimit(arr, i) {
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
var _e = undefined;
|
||||
try {
|
||||
for (
|
||||
var _i = arr[Symbol.iterator](), _s;
|
||||
!(_n = (_s = _i.next()).done);
|
||||
_n = true
|
||||
) {
|
||||
_arr.push(_s.value);
|
||||
if (i && _arr.length === i) break;
|
||||
}
|
||||
} catch (err) {
|
||||
_d = true;
|
||||
_e = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_n && _i['return'] != null) _i['return']();
|
||||
} finally {
|
||||
if (_d) throw _e;
|
||||
}
|
||||
}
|
||||
return _arr;
|
||||
}
|
||||
|
||||
function _arrayWithHoles(arr) {
|
||||
if (Array.isArray(arr)) return arr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
const validReporterTypes = ['array', 'string'];
|
||||
const ERROR = `${_utils.BULLET}Reporter Validation Error`;
|
||||
/**
|
||||
@@ -103,7 +68,7 @@ function createReporterError(reporterIndex, reporterValue) {
|
||||
` ${_chalk().default.bold.red(
|
||||
(0, _jestGetType().default)(reporterValue)
|
||||
)}`;
|
||||
return new (_jestValidate()).ValidationError(
|
||||
return new (_jestValidate().ValidationError)(
|
||||
ERROR,
|
||||
errorMessage,
|
||||
_utils.DOCUMENTATION_NOTE
|
||||
@@ -127,11 +92,9 @@ function createArrayReporterError(
|
||||
` ${_chalk().default.bold.green((0, _jestGetType().default)(value))}\n` +
|
||||
` Reporter configuration:\n` +
|
||||
` ${_chalk().default.bold.green(
|
||||
JSON.stringify(arrayReporter, null, 2)
|
||||
.split('\n')
|
||||
.join('\n ')
|
||||
JSON.stringify(arrayReporter, null, 2).split('\n').join('\n ')
|
||||
)}`;
|
||||
return new (_jestValidate()).ValidationError(
|
||||
return new (_jestValidate().ValidationError)(
|
||||
ERROR,
|
||||
errorMessage,
|
||||
_utils.DOCUMENTATION_NOTE
|
||||
@@ -151,9 +114,7 @@ function validateReporters(reporterConfig) {
|
||||
}
|
||||
|
||||
function validateArrayReporter(arrayReporter, reporterIndex) {
|
||||
const _arrayReporter = _slicedToArray(arrayReporter, 2),
|
||||
path = _arrayReporter[0],
|
||||
options = _arrayReporter[1];
|
||||
const [path, options] = arrayReporter;
|
||||
|
||||
if (typeof path !== 'string') {
|
||||
throw createArrayReporterError(
|
||||
|
||||
Reference in New Issue
Block a user