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

Jest snapshot serializer that beautifies HTML.


Version published
Weekly downloads
856K
increased by10.59%
Maintainers
1
Weekly downloads
 
Created

What is jest-serializer-html?

The jest-serializer-html package is a Jest serializer for HTML strings. It helps in making HTML snapshots more readable and easier to debug by formatting the HTML content in a more human-readable way.

What are jest-serializer-html's main functionalities?

HTML Serialization

This feature allows you to serialize HTML strings in your Jest tests. By adding the serializer, your HTML snapshots will be formatted in a more readable way, making it easier to identify changes and debug issues.

const serializer = require('jest-serializer-html');
expect.addSnapshotSerializer(serializer);

Customizing Serialization

This feature allows you to customize the serialization process. For example, you can collapse whitespace in the HTML output to make the snapshots more compact.

const serializer = require('jest-serializer-html');
expect.addSnapshotSerializer(serializer({ collapseWhitespace: true }));

Other packages similar to jest-serializer-html

Keywords

FAQs

Package last updated on 16 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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