Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keplersj/jest-serializer-react-helmet
Serializer to display React Helmet data in Jest Snapshots
https://github.com/keplersj/jest-serializer-react-helmet
jest jest-snapshots react react-helmet seo side-effects snapshot-testing unit-testing
Last synced: 26 days ago
JSON representation
Serializer to display React Helmet data in Jest Snapshots
- Host: GitHub
- URL: https://github.com/keplersj/jest-serializer-react-helmet
- Owner: keplersj
- License: isc
- Created: 2019-08-06T19:06:06.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T02:28:03.000Z (6 months ago)
- Last Synced: 2024-10-03T20:36:55.167Z (2 months ago)
- Topics: jest, jest-snapshots, react, react-helmet, seo, side-effects, snapshot-testing, unit-testing
- Language: TypeScript
- Size: 2.73 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-jest - jest-serializer-react-helmet
README
# jest-serializer-react-helmet
[![Build Status](https://travis-ci.org/keplersj/jest-serializer-react-helmet.svg?branch=master)](https://travis-ci.org/keplersj/jest-serializer-react-helmet)
[![npm version](https://badge.fury.io/js/jest-serializer-react-helmet.svg)](https://badge.fury.io/js/jest-serializer-react-helmet)
[![Code Coverage](https://codecov.io/gh/keplersj/jest-serializer-react-helmet/branch/master/graph/badge.svg)](https://codecov.io/gh/keplersj/jest-serializer-react-helmet)
[![Mentioned in Awesome Jest](https://awesome.re/mentioned-badge.svg)](https://github.com/jest-community/awesome-jest)Jest Snapshot serializer to ensure React Helmet side effects are included in component snapshots.
## Installation
Install preset using npm:
```shell
npm install --save-dev jest-serializer-react-helmet
```or yarn:
```shell
yarn add --dev jest-serializer-react-helmet
```## Usage
Configure Jest to use the serializer in `jest.config.js`:
```js
module.exports = {
snapshotSerializers: ["jest-serializer-react-helmet"]
};
```or `package.json`:
```json
{
"jest": {
"snapshotSerializers": ["jest-serializer-react-helmet"]
}
}
```## Related Packages
- [`jest-runner-prettier`](https://github.com/keplersj/jest-runner-prettier) - Use Jest to check your codebase against `prettier`
- [`jest-preset-gatsby`](https://github.com/keplersj/jest-preset-gatsby) - Jest preset to ease unit testing a Gatsby project
- [`jest-serializer-json-ld-script`](https://github.com/keplersj/jest-serializer-json-ld-script) - Jest snapshot serializer to better visualize React `` elements containing LD+JSON data
- [`jest-raw-loader`](https://github.com/keplersj/jest-raw-loader) - Load the raw content of files in Jest, replicating the behavior of `webpack`'s `raw-loader`## License
Copyright 2019 Kepler Sticka-Jones. Licensed ISC