@cdk-utils/factories
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.62 • Public • Published

AWS-CDK Utils - Factories

Factories uses fishery to create stock factories for AWS events, helping to accelerate your testing.

Usage

With Jest

import { awsFactory } from '@cdk-utils/factories';
import { handler } from 'src/lambda.ts';

test("lambda", () => {
  const event = awsFactory.apiGatewayProxyEventV2({
    body: JSON.stringify({ message: 'test'})
  })

  const result = await handler(event)

  expect(result).toEqual({
    statusCode: 200,
    body: JSON.stringify({
      message: 'paased'
    })
  })
})

Readme

Keywords

Package Sidebar

Install

npm i @cdk-utils/factories

Weekly Downloads

0

Version

0.0.1-alpha.62

License

ISC

Unpacked Size

38 kB

Total Files

16

Last publish

Collaborators

  • simonreilly