Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-serializer-html

Package Overview
Dependencies
Maintainers
5
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.

  • 7.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
901K
decreased by-10.67%
Maintainers
5
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 13 Jul 2021

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