jest-serializer-react-helmet
v1.0.6
Published
Serializer to display React Helmet data in Jest Snapshots
Downloads
14
Maintainers
Readme
jest-serializer-react-helmet
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
jest-runner-prettier
- Use Jest to check your codebase againstprettier
jest-preset-gatsby
- Jest preset to ease unit testing a Gatsby projectjest-serializer-json-ld-script
- Jest snapshot serializer to better visualize React<script>
elements containing LD+JSON datajest-raw-loader
- Load the raw content of files in Jest, replicating the behavior ofwebpack
'sraw-loader
License
Copyright 2019 Kepler Sticka-Jones. Licensed ISC