Awesome
jest-serializer-json-ld-script
Jest Snapshot serializer to better visualize React <script>
elements containing LD+JSON data.
Installation
Install preset using npm:
npm install --save-dev jest-serializer-json-ld-script
or yarn:
yarn add --dev jest-serializer-json-ld-script
Usage
Configure Jest to use the serializer in jest.config.js
:
module.exports = {
snapshotSerializers: ["jest-serializer-json-ld-script"]
};
or package.json
:
{
"jest": {
"snapshotSerializers": ["jest-serializer-json-ld-script"]
}
}
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-react-helmet
- Jest snapshot serializer to include React Helmet side effects in snapshotsjest-raw-loader
- Load the raw content of files in Jest, replicating the behavior ofwebpack
'sraw-loader
License
Copyright 2019 Kepler Sticka-Jones. Licensed ISC