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

@@ -17,15 +17,16 @@ const INTERNAL_MATCHER_FLAG = Symbol.for('$$jest-internal-matcher');
exports.INTERNAL_MATCHER_FLAG = INTERNAL_MATCHER_FLAG;
if (!global.hasOwnProperty(JEST_MATCHERS_OBJECT)) {
const defaultState = {
assertionCalls: 0,
expectedAssertionsNumber: null,
isExpectingAssertions: false,
suppressedErrors: [] // errors that are not thrown immediately.
};
Object.defineProperty(global, JEST_MATCHERS_OBJECT, {
value: {
matchers: Object.create(null),
state: {
assertionCalls: 0,
expectedAssertionsNumber: null,
isExpectingAssertions: false,
suppressedErrors: [] // errors that are not thrown immediately.
}
state: defaultState
}
});
}
@@ -60,9 +61,7 @@ const setMatchers = (matchers, isInternal, expect) => {
}
asymmetricMatch(other) {
const _ref = matcher(other, ...this.sample),
pass = _ref.pass;
const {pass} = matcher(other, ...this.sample);
return this.inverse ? !pass : pass;
}
@@ -75,7 +74,7 @@ const setMatchers = (matchers, isInternal, expect) => {
}
toAsymmetricMatcher() {
return `${this.toString()}<${this.sample.join(', ')}>`;
return `${this.toString()}<${this.sample.map(String).join(', ')}>`;
}
}