enzyme-matchers
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82704
1063
3
+ Addedcircular-json-es6@^2.0.1
+ Addedcircular-json-es6@2.0.2(transitive)