Socket
Socket
Sign inDemoInstall

jest-serializer-html

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-serializer-html - npm Package Compare versions

Comparing version 6.0.0 to 7.0.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

<a name="7.0.0"></a>
# [7.0.0](https://github.com/rayrutjes/jest-serializer-html/compare/v6.0.0...v7.0.0) (2019-04-28)
### Features
* trim diffed HTML output ([#17](https://github.com/rayrutjes/jest-serializer-html/issues/17)) ([aa47789](https://github.com/rayrutjes/jest-serializer-html/commit/aa47789))
<a name="6.0.0"></a>

@@ -2,0 +12,0 @@ # [6.0.0](https://github.com/rayrutjes/jest-serializer-html/compare/v5.0.0...v6.0.0) (2018-12-31)

9

index.js

@@ -5,7 +5,12 @@ var toDiffableHtml = require('diffable-html');

test(object) {
return typeof object === 'string' && object.trim()[0] === '<';
if (typeof object !== 'string') {
return false;
}
const trimmed = object.trim();
return trimmed.length > 2 && trimmed[0] === '<' && trimmed[trimmed.length - 1] === '>';
},
print(val) {
return toDiffableHtml(val);
return toDiffableHtml(val).trim();
},
};
{
"name": "jest-serializer-html",
"version": "6.0.0",
"version": "7.0.0",
"description": "Jest snapshot serializer that beautifies HTML.",

@@ -5,0 +5,0 @@ "main": "index.js",

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