Created
March 11, 2020 00:32
-
-
Save mtimbs/1cd3ab9819edab1bf1189729188cde7e to your computer and use it in GitHub Desktop.
Utility helper to generate test SQD events for integration testing lambda handlers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqsRecordGenerator from '@tests/utilities/sqsRecordFactory'; | |
import { SQSEvent, SQSRecord } from 'aws-lambda'; | |
export default (events?: SQSRecord[]): SQSEvent => ({ | |
Records: events || [sqsRecordGenerator()], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Used in conjunction with https://gist.github.com/mtimbs/1b93e94b0eb2541f622f754976991758