Skip to content

Instantly share code, notes, and snippets.

@mtimbs
Created March 11, 2020 00:32
Show Gist options
  • Save mtimbs/1cd3ab9819edab1bf1189729188cde7e to your computer and use it in GitHub Desktop.
Save mtimbs/1cd3ab9819edab1bf1189729188cde7e to your computer and use it in GitHub Desktop.
Utility helper to generate test SQD events for integration testing lambda handlers
import sqsRecordGenerator from '@tests/utilities/sqsRecordFactory';
import { SQSEvent, SQSRecord } from 'aws-lambda';
export default (events?: SQSRecord[]): SQSEvent => ({
Records: events || [sqsRecordGenerator()],
});
@mtimbs
Copy link
Author

mtimbs commented Mar 11, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment