Home

Awesome

jest-serializer-react-helmet

Build Status npm version Code Coverage Mentioned in Awesome Jest

Jest Snapshot serializer to ensure React Helmet side effects are included in component snapshots.

Installation

Install preset using npm:

npm install --save-dev jest-serializer-react-helmet

or yarn:

yarn add --dev jest-serializer-react-helmet

Usage

Configure Jest to use the serializer in jest.config.js:

module.exports = {
  snapshotSerializers: ["jest-serializer-react-helmet"]
};

or package.json:

{
  "jest": {
    "snapshotSerializers": ["jest-serializer-react-helmet"]
  }
}

Related Packages

License

Copyright 2019 Kepler Sticka-Jones. Licensed ISC