Skip to content

Commit 1ca57d8

Browse files
committed
docs: create readme
1 parent 21cf807 commit 1ca57d8

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# jest-serializer-json-ld-script
2+
3+
[![Build Status](https://travis-ci.org/keplersj/jest-serializer-json-ld-script.svg?branch=master)](https://travis-ci.org/keplersj/jest-preset-gatsby)
4+
[![npm version](https://badge.fury.io/js/jest-serializer-json-ld-script.svg)](https://badge.fury.io/js/jest-preset-gatsby)
5+
6+
Jest Snapshot serializer to better visualize React `<script>` elements containing LD+JSON data.
7+
8+
## Installation
9+
10+
Install preset using npm:
11+
12+
```shell
13+
npm install --save-dev jest-serializer-json-ld-script
14+
```
15+
16+
or yarn:
17+
18+
```shell
19+
yarn add --dev jest-serializer-json-ld-script
20+
```
21+
22+
## Usage
23+
24+
Configure Jest to use the serializer in `jest.config.js`:
25+
26+
```js
27+
module.exports = {
28+
snapshotSerializers: ["jest-serializer-json-ld-script"]
29+
};
30+
```
31+
32+
or `package.json`:
33+
34+
```json
35+
{
36+
"jest": {
37+
"snapshotSerializers": ["jest-serializer-json-ld-script"]
38+
}
39+
}
40+
```
41+
42+
## Related Packages
43+
44+
- [`jest-runner-prettier`](https://github.com/keplersj/jest-runner-prettier) - Use Jest to check your codebase against `prettier`
45+
- [`jest-preset-gatsby`](https://github.com/keplersj/jest-preset-gatsby) - Jest preset to ease unit testing a Gatsby project
46+
- [`jest-serializer-react-helmet`](https://github.com/keplersj/jest-serializer-react-helmet) - Jest snapshot serializer to include React Helmet side effects in snapshots
47+
- [`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`
48+
49+
## License
50+
51+
Copyright 2019 Kepler Sticka-Jones. Licensed ISC

0 commit comments

Comments
 (0)