Newly Purchased Memories

    jest-serializer-ansi

    1.0.3 • Public • Published

    jest-serializer-ansi

    Jest serializer to strip ANSI escape codes

    Installation

    npm install --save-dev jest-serializer-ansi
    yarn add jest-serializer-ansi

    Add the serializer to snapshotSerializers field in your package.json as follows:

    {
      ...
      "jest": {
        "snapshotSerializers": [
          "jest-serializer-ansi"
        ]
      }
    }

    Or include only in individual tests:

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

    Keywords

    none

    Install

    npm i jest-serializer-ansi

    DownloadsWeekly Downloads

    5,817

    Version

    1.0.3

    License

    MIT

    Last publish

    Collaborators

    • joaogranado