Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jest-snapshot-serializer-ansi

ikatyang17.1kMIT2.1.0TypeScript support: included

jest snapshot serializer for stripping ANSI escape codes

readme

jest-snapshot-serializer-ansi

npm build

jest snapshot serializer for stripping ANSI escape codes

Changelog

Install

npm install jest-snapshot-serializer-ansi

Note: This package is now pure ESM, you may want to install jest-snapshot-serializer-ansi@1 if you'd like to use it in CJS environment

Usage

In setup file or test file:

import serializerAnsi from 'jest-snapshot-serializer-ansi'
expect.addSnapshotSerializer(serializerAnsi)

Development

# lint
pnpm run lint

# build
pnpm run build

# test
pnpm run test

License

MIT © Ika

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

2.1.0 (2023-07-15)

Features

  • support serializer with default import (#188) (da3f17d)

2.0.0 (2023-07-13)

Build System

BREAKING CHANGES

  • this package is now pure ESM