# jest-serializer-enzyme

> A snapshot serializer for Ezyme

Latest version **1.0.0** (published 2016-12-13) · ISC license · 0 weekly downloads

## Install

```sh
npm install jest-serializer-enzyme
pnpm add jest-serializer-enzyme
yarn add jest-serializer-enzyme
bun add jest-serializer-enzyme
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-12-13 |
| First published | 2016-12-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 68 |
| Author | Rogelio Guzman |
| Maintainers | rogeliog |
| Keywords | jest, enzyme, test |

## Links

- npm: https://www.npmjs.com/package/jest-serializer-enzyme
- Repository: https://github.com/rogeliog/jest-serializer-enzyme
- Homepage: https://github.com/rogeliog/jest-serializer-enzyme#readme
- Issues: https://github.com/rogeliog/jest-serializer-enzyme/issues
- npm.io page: https://npm.io/package/jest-serializer-enzyme

## Dependencies (1)

- [enzyme-to-json](https://npm.io/package/enzyme-to-json.md) ^1.4.4

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-12-13
- 0.2.0 — 2016-12-07
- 0.1.3 — 2016-12-07
- 0.1.2 — 2016-12-06
- 0.1.1 — 2016-12-06

## README

# jest-serializer-enzyme

This is a serializer for Enzyme backed by [enzyme-to-json](https://github.com/adriantoine/enzyme-to-json), I suggest looking at `enzyme-to-json` for the implementation details

#### Install it
```
npm install --save-dev jest-serializer-enzyme
```

#### Add it to your jest config
```json
"jest": {
  "snapshotSerializers": ["<rootDir>/node_modules/jest-serializer-enzyme"]
}
```

More about Jest's snapshotSerializer config [here](http://facebook.github.io/jest/docs/configuration.html#snapshotserializers-array-string).

#### Enjoy

```javascript
import React from 'react';
import { shallow } from 'enzyme';

const Bar = ({ text }) => <p>{text}</p>

const Foo = () => (
  <div>
    <Bar text="The text" />
  </div>
);

it('Renders', () => {
  const wrapper = shallow(<Foo />);
  expect(wrapper).toMatchSnapshot();
});
```

---
_Source: https://npm.io/package/jest-serializer-enzyme · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
