# @cloudcomponents/jest-cdk-snapshot

> Jest matcher for cdk cloudformation comparisons.

Latest version **1.0.10** (published 2019-08-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @cloudcomponents/jest-cdk-snapshot
pnpm add @cloudcomponents/jest-cdk-snapshot
yarn add @cloudcomponents/jest-cdk-snapshot
bun add @cloudcomponents/jest-cdk-snapshot
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.10 |
| Published | 2019-08-11 |
| First published | 2019-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | hello@webappsolutions.de |
| Maintainers | hupe1980 |
| Keywords | aws, cdk, jest, cloudformation, snapshot, test |

## Links

- npm: https://www.npmjs.com/package/@cloudcomponents/jest-cdk-snapshot
- Repository: https://github.com/cloudcomponents/jest-cdk-snapshot
- Homepage: https://github.com/cloudcomponents/jest-cdk-snapshot#readme
- Issues: https://github.com/cloudcomponents/jest-cdk-snapshot/issues
- npm.io page: https://npm.io/package/@cloudcomponents/jest-cdk-snapshot

## Dependencies (4)

- [jest](https://npm.io/package/jest.md) ^24.8.0
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.13.1
- [jest-snapshot](https://npm.io/package/jest-snapshot.md) 24.8.0
- [jest-haste-map](https://npm.io/package/jest-haste-map.md) ^24.8.1

## 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
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.10 (latest) — 2019-08-11
- 1.0.9 — 2019-08-11
- 1.0.8 — 2019-08-11
- 1.0.7 — 2019-07-21
- 1.0.6 — 2019-07-21
- 1.0.5 — 2019-07-15
- 1.0.4 — 2019-07-14
- 1.0.3 — 2019-03-17
- 1.0.2 — 2019-03-06
- 1.0.1 — 2019-02-09
- 1.0.0 — 2019-02-09

## README

# @cloudcomponents/jest-cdk-snapshot

> Jest matcher for cdk cloudformation comparisons.

## Install

```bash
npm install --save-dev @cloudcomponents/jest-cdk-snapshot
```

## How to use

```javascript
import { Stack } from '@aws-cdk/core';
import { GithubWebhook } from '@cloudcomponents/cdk-github-webhook';
import '@cloudcomponents/jest-cdk-snapshot';

describe('cdk-github-webhook', () => {
  it('snapshot', () => {
    const stack = new Stack();

    new GithubWebhook(stack, 'GithubWebhook', {
      githubApiToken: 'test12',
      githubRepoUrl: 'test',
      payloadUrl: 'test',
      events: ['test']
    });

    expect(stack).toMatchCdkSnapshot();
  });
});
```

## Use YAML as snapshot format

```javascript
import { Stack } from '@aws-cdk/core';
import { GithubWebhook } from '@cloudcomponents/cdk-github-webhook';
import '@cloudcomponents/jest-cdk-snapshot';

describe('cdk-github-webhook', () => {
  it('snapshot', () => {
    const stack = new Stack();

    new GithubWebhook(stack, 'GithubWebhook', {
      githubApiToken: 'test12',
      githubRepoUrl: 'test',
      payloadUrl: 'test',
      events: ['test']
    });

    expect(stack).toMatchCdkSnapshot({ yaml: true });
  });
});
```

## License

[MIT](LICENSE)

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