1.0.10 • Published 6 years ago

@cloudcomponents/jest-cdk-snapshot v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

@cloudcomponents/jest-cdk-snapshot

Jest matcher for cdk cloudformation comparisons.

Install

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

How to use

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

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

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago