Socket
Socket
Sign inDemoInstall

jest-diff

Package Overview
Dependencies
Maintainers
5
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-diff - npm Package Compare versions

Comparing version 21.0.0-alpha.2 to 21.0.0-beta.1

14

build/diff_strings.js

@@ -74,8 +74,7 @@ 'use strict';

const mark = color(part.added ? '+' : part.removed ? '-' : ' ');
return mark + ' ' + color(highlightedLine) + '\n';
return mark + ' ' + color(highlightedLine);
}).
join('');
join('\n');
}).
join('').
trim(),
join('\n'),
isDifferent };

@@ -129,5 +128,5 @@

const highlightedLine = highlightTrailingWhitespace(line, bgColor);
return color(highlightedLine) + '\n';
return color(highlightedLine);
}).
join('');
join('\n');

@@ -139,4 +138,3 @@ isDifferent = true;

}).
join('').
trim(),
join('\n'),
isDifferent };

@@ -143,0 +141,0 @@

@@ -43,2 +43,4 @@ 'use strict';

const MULTILINE_REGEXP = /[\r\n]/;
// Generate a string that will highlight the difference between two values

@@ -83,5 +85,5 @@ // with green and red. (similar to how github does code diffing)

case 'string':
const multiline = a.match(/[\r\n]/) !== -1 && b.indexOf('\n') !== -1;
const multiline = MULTILINE_REGEXP.test(a) && b.indexOf('\n') !== -1;
if (multiline) {
return (0, _diff_strings2.default)(String(a), String(b), options);
return (0, _diff_strings2.default)(a, b, options);
}

@@ -88,0 +90,0 @@ return null;

{
"name": "jest-diff",
"version": "21.0.0-alpha.2",
"version": "21.0.0-beta.1",
"repository": {

@@ -13,6 +13,5 @@ "type": "git",

"diff": "^3.2.0",
"jest-get-type": "21.0.0-alpha.2",
"jest-matcher-utils": "21.0.0-alpha.2",
"pretty-format": "21.0.0-alpha.2"
"jest-get-type": "21.0.0-beta.1",
"pretty-format": "21.0.0-beta.1"
}
}
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