Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expect

Package Overview
Dependencies
Maintainers
7
Versions
237
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect - npm Package Compare versions

Comparing version 21.3.0-beta.12 to 21.3.0-beta.13

13

build/index.js

@@ -56,6 +56,15 @@ 'use strict';

const getPromiseMatcher = name => {
const createToThrowErrorMatchingSnapshotMatcher = function (matcher) {
return function (received, testName) {
return matcher.apply(this, [received, testName, true]);
};
};
const getPromiseMatcher = (name, matcher) => {
if (name === 'toThrow' || name === 'toThrowError') {
return (0, _to_throw_matchers.createMatcher)('.' + name, true);
} else if (name === 'toThrowErrorMatchingSnapshot') {
return createToThrowErrorMatchingSnapshotMatcher(matcher);
}
return null;

@@ -78,3 +87,3 @@ };

const matcher = allMatchers[name];
const promiseMatcher = getPromiseMatcher(name) || matcher;
const promiseMatcher = getPromiseMatcher(name, matcher) || matcher;
expectation[name] = makeThrowingMatcher(matcher, false, actual);

@@ -81,0 +90,0 @@ expectation.not[name] = makeThrowingMatcher(matcher, true, actual);

6

build/matchers.js

@@ -556,5 +556,5 @@ 'use strict';Object.defineProperty(exports, "__esModule", { value: true });

traversedPath ?
`Received:\n ${(0, _jestMatcherUtils.RECEIVED_COLOR)('object')}.${
traversedPath
}: ${(0, _jestMatcherUtils.printReceived)(lastTraversedObject)}` :
`Received:\n ${(0, _jestMatcherUtils.RECEIVED_COLOR)(
'object')
}.${traversedPath}: ${(0, _jestMatcherUtils.printReceived)(lastTraversedObject)}` :
''));

@@ -561,0 +561,0 @@

{
"name": "expect",
"version": "21.3.0-beta.12",
"version": "21.3.0-beta.13",
"repository": {

@@ -13,8 +13,8 @@ "type": "git",

"ansi-styles": "^3.2.0",
"jest-diff": "21.3.0-beta.12",
"jest-get-type": "21.3.0-beta.12",
"jest-matcher-utils": "21.3.0-beta.12",
"jest-message-util": "21.3.0-beta.12",
"jest-diff": "21.3.0-beta.13",
"jest-get-type": "21.3.0-beta.13",
"jest-matcher-utils": "21.3.0-beta.13",
"jest-message-util": "21.3.0-beta.13",
"jest-regex-util": "^21.2.0"
}
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc