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

enzyme-matchers

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

enzyme-matchers - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

4

lib/assertions/toIncludeText.js

@@ -38,4 +38,4 @@ 'use strict';

contextualInformation: {
expected: text,
actual: actualText
expected: 'Expected HTML: "' + text + '"',
actual: 'Actual HTML: "' + actualText + '"'
}

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

@@ -17,2 +17,6 @@ 'use strict';

var _circularJsonEs = require('circular-json-es6');
var _circularJsonEs2 = _interopRequireDefault(_circularJsonEs);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -24,2 +28,3 @@

var stringifyingValue = value;
var skipCircularCheck = false;
if (Array.isArray(value)) {

@@ -30,6 +35,4 @@ var values = value.map(function (v) {

// replace value with something safe so that the JSON.stringify call won't
// complain about circular values since we've already safely dealt with those above
// eslint-disable-next-line no-param-reassign
value = [];
// Skip circular check because we have already safely dealt with it above
skipCircularCheck = true;

@@ -50,3 +53,3 @@ var joined = values.join(' ');

} else if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {
stringifyingValue = _colors2.default.gray(value.toString());
stringifyingValue = _colors2.default.gray(_circularJsonEs2.default.stringify(value));
} else if (typeof value === 'string') {

@@ -64,3 +67,5 @@ stringifyingValue = _colors2.default.gray('"' + value + '"');

// circular if you cant stringify
JSON.stringify(_defineProperty({}, key, value));
if (!skipCircularCheck) {
JSON.stringify(_defineProperty({}, key, value));
}

@@ -67,0 +72,0 @@ return [key, stringifyingValue];

{
"name": "enzyme-matchers",
"version": "4.0.1",
"version": "4.0.2",
"description": "Testing Matchers for Enzyme",

@@ -34,2 +34,3 @@ "main": "lib/index.js",

"dependencies": {
"circular-json-es6": "^2.0.1",
"deep-equal-ident": "^1.1.1"

@@ -36,0 +37,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