This package has been deprecated

Author message:

This package has been moved to jest-cdk-snapshot

@cloudcomponents/jest-cdk-snapshot
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

@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

Package Sidebar

Install

npm i @cloudcomponents/jest-cdk-snapshot

Weekly Downloads

2

Version

1.0.10

License

MIT

Unpacked Size

8.81 kB

Total Files

5

Last publish

Collaborators

  • hupe1980