jest-serializer-html
Advanced tools
Comparing version 6.0.0 to 7.0.0
@@ -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) |
@@ -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", |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
6439
13
0