# chai-snapshots

> Snapshot generator and matcher for chai

Latest version **1.0.7** (published 2017-07-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install chai-snapshots
pnpm add chai-snapshots
yarn add chai-snapshots
bun add chai-snapshots
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2017-07-23 |
| First published | 2017-01-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | chrismcleod |

## Links

- npm: https://www.npmjs.com/package/chai-snapshots
- Repository: https://github.com/chrismcleod/chai-snapshots
- Homepage: https://github.com/chrismcleod/chai-snapshots#readme
- Issues: https://github.com/chrismcleod/chai-snapshots/issues
- npm.io page: https://npm.io/package/chai-snapshots

## Recent versions

- 1.0.7 (latest) — 2017-07-23
- 1.0.6 — 2017-02-07
- 1.0.5 — 2017-01-30
- 1.0.4 — 2017-01-19
- 1.0.3 — 2017-01-11
- 1.0.2 — 2017-01-11
- 1.0.1 — 2017-01-11
- 1.0.0 — 2017-01-11

## README

# chai-snapshots
Snapshot generator and matcher for chai

Example Useage
```javascript
// helper.js
import * as snapshots from "chai-snapshots";

chai.use(snapshots.SnapshotMatchers({ 
  pathToSnaps: "./src/tests/snaps.json", //relative to project root
  ignoredAttributes: ["created_at", "updated_at"] //these attributes will be deeply removed from all objects in the json
}));


//component.spec.js
it("renders correctly", () => {
  const state = Immutable.fromJS({user: null});
  const login = toJSON(shallow(<Login user={state.user}/>));
  expect(login).to.matchSnapshotJSON();
});
```

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