Socket
Socket
Sign inDemoInstall

jasmine-enzyme

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jasmine-enzyme - npm Package Compare versions

Comparing version 3.6.1 to 3.7.0

56

lib/index.js

@@ -17,10 +17,12 @@ 'use strict';

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree. *
*
* @providesModule JasmineEnzyme
*
*/
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /**
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree. *
*
* @providesModule JasmineEnzyme
*
*/
function jasmineEnzyme() {

@@ -39,3 +41,41 @@ // Migration step for moving people from jasmine-enzyme

};
return { compare: matcherFn.bind({ equals: equals }) };
return {
compare: function compare() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var results = matcherFn.call.apply(matcherFn, [{ equals: equals }].concat(_toConsumableArray(args)));
if (results.contextualInformation.actual) {
results.message += '\nexpected: ' + results.contextualInformation.actual;
}
if (results.contextualInformation.expected) {
results.message += '\nreceived: ' + results.contextualInformation.expected;
}
return results;
},
negativeCompare: function negativeCompare() {
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
var results = matcherFn.call.apply(matcherFn, [{ equals: equals }].concat(_toConsumableArray(args)));
if (results.contextualInformation.actual) {
results.negatedMessage += '\nexpected: ' + results.contextualInformation.actual;
}
if (results.contextualInformation.expected) {
results.negatedMessage += '\nreceived: ' + results.contextualInformation.expected;
}
return {
pass: !results.pass,
message: results.negatedMessage
};
}
};
};

@@ -42,0 +82,0 @@ };

6

package.json
{
"name": "jasmine-enzyme",
"version": "3.6.1",
"version": "3.7.0",
"description": "Jasmine assertions for enzyme",

@@ -47,6 +47,6 @@ "main": "lib/index.js",

"dependencies": {
"enzyme-matchers": "^3.6.1"
"enzyme-matchers": "^3.7.0"
},
"jest": {
"testPathDirs": [
"roots": [
"<rootDir>/src"

@@ -53,0 +53,0 @@ ],

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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