Updating NPM dependencies

This commit is contained in:
Drew Heavner
2020-11-11 13:30:52 +00:00
committed by GitHub
parent 7a6fb66c63
commit bd487ef324
9068 changed files with 1400893 additions and 587661 deletions

View File

@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', {
});
exports.default = void 0;
var _jestGetType = _interopRequireWildcard(require('jest-get-type'));
var _jestGetType = _interopRequireDefault(require('jest-get-type'));
var _jestMatcherUtils = require('jest-matcher-utils');
@@ -13,29 +13,8 @@ var _jasmineUtils = require('./jasmineUtils');
var _utils = require('./utils');
function _interopRequireWildcard(obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) {
var desc =
Object.defineProperty && Object.getOwnPropertyDescriptor
? Object.getOwnPropertyDescriptor(obj, key)
: {};
if (desc.get || desc.set) {
Object.defineProperty(newObj, key, desc);
} else {
newObj[key] = obj[key];
}
}
}
}
newObj.default = obj;
return newObj;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
/**
@@ -181,12 +160,7 @@ const printExpectedReceivedCallsPositive = (
difference.includes('+ Received')
) {
// Omit annotation in case multiple args have diff.
lines.push(
difference
.split('\n')
.slice(3)
.join('\n') + ','
);
lines.push(difference.split('\n').slice(3).join('\n') + ',');
continue;
}
}
@@ -255,6 +229,7 @@ const printDiffCall = (expected, received, expand) =>
difference.includes('+ Received')
) {
// Display diff with indentation.
// Omit annotation in case multiple args have diff.
return (
difference
.split('\n')
@@ -292,7 +267,7 @@ const isLineDiffableArg = (expected, received) => {
return false;
}
if ((0, _jestGetType.isPrimitive)(expected)) {
if (_jestGetType.default.isPrimitive(expected)) {
return false;
}
@@ -367,7 +342,7 @@ const printReceivedResults = (
};
const createToBeCalledMatcher = matcherName =>
function(received, expected) {
function (received, expected) {
const expectedArgument = '';
const options = {
isNot: this.isNot,
@@ -429,7 +404,7 @@ const createToBeCalledMatcher = matcherName =>
};
const createToReturnMatcher = matcherName =>
function(received, expected) {
function (received, expected) {
const expectedArgument = '';
const options = {
isNot: this.isNot,
@@ -499,13 +474,13 @@ const createToReturnMatcher = matcherName =>
};
const createToBeCalledTimesMatcher = matcherName =>
function(received, expected) {
function (received, expected) {
const expectedArgument = 'expected';
const options = {
isNot: this.isNot,
promise: this.promise
};
(0, _jestMatcherUtils.ensureExpectedIsNumber)(
(0, _jestMatcherUtils.ensureExpectedIsNonNegativeInteger)(
expected,
matcherName,
options
@@ -550,13 +525,13 @@ const createToBeCalledTimesMatcher = matcherName =>
};
const createToReturnTimesMatcher = matcherName =>
function(received, expected) {
function (received, expected) {
const expectedArgument = 'expected';
const options = {
isNot: this.isNot,
promise: this.promise
};
(0, _jestMatcherUtils.ensureExpectedIsNumber)(
(0, _jestMatcherUtils.ensureExpectedIsNonNegativeInteger)(
expected,
matcherName,
options
@@ -609,7 +584,7 @@ const createToReturnTimesMatcher = matcherName =>
};
const createToBeCalledWithMatcher = matcherName =>
function(received, ...expected) {
function (received, ...expected) {
const expectedArgument = '...expected';
const options = {
isNot: this.isNot,
@@ -695,7 +670,7 @@ const createToBeCalledWithMatcher = matcherName =>
};
const createToReturnWithMatcher = matcherName =>
function(received, expected) {
function (received, expected) {
const expectedArgument = 'expected';
const options = {
isNot: this.isNot,
@@ -703,9 +678,7 @@ const createToReturnWithMatcher = matcherName =>
};
ensureMock(received, matcherName, expectedArgument, options);
const receivedName = received.getMockName();
const _received$mock = received.mock,
calls = _received$mock.calls,
results = _received$mock.results;
const {calls, results} = received.mock;
const pass = results.some(result => isEqualReturn(expected, result));
const message = pass
? () => {
@@ -781,7 +754,7 @@ const createToReturnWithMatcher = matcherName =>
};
const createLastCalledWithMatcher = matcherName =>
function(received, ...expected) {
function (received, ...expected) {
const expectedArgument = '...expected';
const options = {
isNot: this.isNot,
@@ -877,7 +850,7 @@ const createLastCalledWithMatcher = matcherName =>
};
const createLastReturnedMatcher = matcherName =>
function(received, expected) {
function (received, expected) {
const expectedArgument = 'expected';
const options = {
isNot: this.isNot,
@@ -885,9 +858,7 @@ const createLastReturnedMatcher = matcherName =>
};
ensureMock(received, matcherName, expectedArgument, options);
const receivedName = received.getMockName();
const _received$mock2 = received.mock,
calls = _received$mock2.calls,
results = _received$mock2.results;
const {calls, results} = received.mock;
const iLast = results.length - 1;
const pass = iLast >= 0 && isEqualReturn(expected, results[iLast]);
const message = pass
@@ -973,7 +944,7 @@ const createLastReturnedMatcher = matcherName =>
};
const createNthCalledWithMatcher = matcherName =>
function(received, nth, ...expected) {
function (received, nth, ...expected) {
const expectedArgument = 'n';
const options = {
expectedColor: arg => arg,
@@ -1013,6 +984,7 @@ const createNthCalledWithMatcher = matcherName =>
const message = pass
? () => {
// Display preceding and following calls,
// in case assertions fails because index is off by one.
const indexedCalls = [];
if (iNth - 1 >= 0) {
@@ -1054,6 +1026,7 @@ const createNthCalledWithMatcher = matcherName =>
// Display preceding and following calls:
// * nearest call that is equal to expected args
// * otherwise, adjacent call
// in case assertions fails because of index, especially off by one.
const indexedCalls = [];
if (iNth < length) {
@@ -1129,7 +1102,7 @@ const createNthCalledWithMatcher = matcherName =>
};
const createNthReturnedWithMatcher = matcherName =>
function(received, nth, expected) {
function (received, nth, expected) {
const expectedArgument = 'n';
const options = {
expectedColor: arg => arg,
@@ -1159,15 +1132,14 @@ const createNthReturnedWithMatcher = matcherName =>
}
const receivedName = received.getMockName();
const _received$mock3 = received.mock,
calls = _received$mock3.calls,
results = _received$mock3.results;
const {calls, results} = received.mock;
const length = results.length;
const iNth = nth - 1;
const pass = iNth < length && isEqualReturn(expected, results[iNth]);
const message = pass
? () => {
// Display preceding and following results,
// in case assertions fails because index is off by one.
const indexedResults = [];
if (iNth - 1 >= 0) {
@@ -1211,6 +1183,7 @@ const createNthReturnedWithMatcher = matcherName =>
// Display preceding and following results:
// * nearest result that is equal to expected value
// * otherwise, adjacent result
// in case assertions fails because of index, especially off by one.
const indexedResults = [];
if (iNth < length) {